Compare commits

...

9 Commits

Author SHA1 Message Date
048433b422 <appbase>APK 15.20.20 release Publish. 2026-05-20 16:12:13 +08:00
LaizyBoy
1b02e96088 <libappbase>修复borderCornerRadius属性缺失导致Release构建verifyReleaseResources失败 2026-05-20 16:10:31 +08:00
fd45d0de01 <libappbase>Library Release 15.20.19 2026-05-20 14:46:48 +08:00
9b2e5f152b <appbase>APK 15.20.19 release Publish. 2026-05-20 14:46:35 +08:00
3b6e7586be 添加https://jitpack.io网站编译配置文件 2026-05-20 14:30:24 +08:00
13f5ad2a6b 更新联系邮箱 2026-05-20 11:17:51 +08:00
2b2fb495b6 <libappbase>Library Release 15.20.18 2026-05-20 03:13:56 +08:00
71fd0ae1da <appbase>APK 15.20.18 release Publish. 2026-05-20 03:13:41 +08:00
LaizyBoy
003e1ccca2 修复调试模式初始化顺序及LogUtils空指针崩溃
- GlobalApplication: 调整restoreDebugStatus在initCoreComponents之前执行,确保调试标志先恢复再初始化日志

- LogUtils: init/setLogLevel/setTAG方法增加未初始化保护

- LogViewThread: getLogCacheDir空判断防止NPE
2026-05-20 03:09:27 +08:00
10 changed files with 64 additions and 17 deletions

4
.gitignore vendored
View File

@@ -97,8 +97,8 @@ lint-results.html
## WinBoLL 基础应用(避免上传敏感配置)
/winboll.properties
/local.properties
/settings.gradle
/gradle.properties
#/settings.gradle
#/gradle.properties
## APPBase 项目配置

View File

@@ -20,7 +20,7 @@ WinBoLL 安卓手机端安卓应用开发基础类库。
1. Fork 本仓库
2. 新建 Feat_xxx 分支
3. 提交代码 : ZhanGSKen(ZhanGSKen<zhangsken@188.com>)
3. 提交代码 : ZhanGSKen(ZhanGSKen<ZhanGSKen@QQ.COM>)
4. 新建 Pull Request

View File

@@ -1,8 +1,8 @@
#Created by .winboll/winboll_app_build.gradle
#Tue May 19 18:49:18 GMT 2026
stageCount=18
#Wed May 20 16:12:13 HKT 2026
stageCount=21
libraryProject=libappbase
baseVersion=15.20
publishVersion=15.20.17
buildCount=19
baseBetaVersion=15.20.18
publishVersion=15.20.20
buildCount=0
baseBetaVersion=15.20.21

21
gradle.properties Normal file
View File

@@ -0,0 +1,21 @@
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx2048m
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
# AndroidX package structure to make it clearer which packages are bundled with the
# Android operating system, and which are packaged with your app"s APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=false
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=false
# 保持与旧版Gradle插件的兼容
android.disableAutomaticComponentCreation=true

View File

@@ -1,8 +1,8 @@
#Created by .winboll/winboll_app_build.gradle
#Tue May 19 18:49:18 GMT 2026
stageCount=18
#Wed May 20 16:12:13 HKT 2026
stageCount=21
libraryProject=libappbase
baseVersion=15.20
publishVersion=15.20.17
buildCount=19
baseBetaVersion=15.20.18
publishVersion=15.20.20
buildCount=0
baseBetaVersion=15.20.21

View File

@@ -129,11 +129,10 @@ public class GlobalApplication extends Application {
// 初始化单例实例(确保在所有初始化操作前完成)
sInstance = this;
restoreDebugStatus();
// 初始化基础组件日志、崩溃处理、Toast
initCoreComponents();
// 恢复/初始化调试模式状态(从本地文件读取,无文件则默认关闭调试
restoreDebugStatus();
// 新增:初始化服务器地址(从 SP 读取到内存,提高后续访问效率)
// 初始化服务器地址(从 SP 读取到内存,提高后续访问效率
initWinbollHost();
LogUtils.d(TAG, "GlobalApplication 初始化完成,单例实例已创建");

View File

@@ -71,6 +71,9 @@ public class LogUtils {
}
public static void init(final Context context, final LOG_LEVEL logLevel) {
if (!GlobalApplication.isDebugging()) {
return;
}
Log.d(TAG, "init 执行日志工具初始化");
_mContext = context;
@@ -247,6 +250,9 @@ public class LogUtils {
}
public static void setTAGListEnable(final String tag, final boolean isEnable) {
if (!_IsInited) {
return;
}
final Iterator<Map.Entry<String, Boolean>> iterator = mapTAGList.entrySet().iterator();
while (iterator.hasNext()) {
final Map.Entry<String, Boolean> entry = iterator.next();
@@ -260,6 +266,9 @@ public class LogUtils {
}
public static void setALlTAGListEnable(final boolean isEnable) {
if (!_IsInited) {
return;
}
for (final Map.Entry<String, Boolean> entry : mapTAGList.entrySet()) {
entry.setValue(isEnable);
}
@@ -269,6 +278,10 @@ public class LogUtils {
// ====================== 日志级别控制 ======================
public static void setLogLevel(final LOG_LEVEL logLevel) {
if (_mLogUtilsBean == null) {
Log.d(TAG, "setLogLevel LogUtils未初始化忽略设置日志级别");
return;
}
_mLogUtilsBean.setLogLevel(logLevel);
_mLogUtilsBean.saveBeanToFile(_mfLogUtilsBeanFile.getPath(), _mLogUtilsBean);
}

View File

@@ -1,6 +1,7 @@
package cc.winboll.studio.libappbase;
import android.os.FileObserver;
import java.io.File;
import java.lang.ref.WeakReference;
/**
@@ -54,7 +55,12 @@ public class LogViewThread extends Thread {
// 调试状态进行日志输出任务
if (GlobalApplication.isDebugging()) {
// 获取日志缓存目录路径(从 LogUtils 统一获取,确保路径一致性)
String logDirPath = LogUtils.getLogCacheDir().getPath();
File logDir = LogUtils.getLogCacheDir();
if (logDir == null) {
LogUtils.d(TAG, "日志缓存目录未初始化,线程退出");
return;
}
String logDirPath = logDir.getPath();
LogUtils.d(TAG, "启动日志文件监听,监听目录:" + logDirPath);
// 初始化日志文件监听器(监听目标目录的文件事件)

View File

@@ -60,4 +60,7 @@
<!-- DebugLogStyle 应用调试日志样式属性 -->
<attr name="debugTextColor" format="color"/>
<!-- 边框圆角属性 -->
<attr name="borderCornerRadius" format="dimension"/>
</resources>

5
settings.gradle Normal file
View File

@@ -0,0 +1,5 @@
// APPBase 项目编译设置
include ':appbase'
include ':libappbase'
rootProject.name = "appbase"