diff --git a/README.md b/README.md index 4de810d..37b3215 100644 --- a/README.md +++ b/README.md @@ -47,9 +47,9 @@ Demo中使用到的网络请求api来源于[豆瓣API V2](https://developers.dou ## 重大更新日志 其它版本参看[Release](https://github.com/AriesHoo/FastLib/releases) -* 2.3.1 +* 2.3.2 - * 优化: 优化FastManager初始化init逻辑,FastLib自动初始化 + * 优化: 优化FastManager初始化init逻辑,FastLib自动初始化解决多进程异常问题 * 优化: 将eventbus、bga-swipebacklayout、UIWidget:tab-layout 使用compileOnly开发者根据需要导入 * 2.2.13 @@ -167,7 +167,7 @@ allprojects { ``` dependencies { - implementation 'com.github.AriesHoo:FastLib:2.3.1' + implementation 'com.github.AriesHoo:FastLib:2.3.2' } ``` @@ -186,7 +186,7 @@ dependencies { com.github.AriesHoo FastLib - 2.3.1 + 2.3.2 ``` diff --git a/apk/sample.apk b/apk/sample.apk index e71f38a..79e69e9 100644 Binary files a/apk/sample.apk and b/apk/sample.apk differ diff --git a/apk/update b/apk/update index 0d1b3e0..5b8ffe2 100644 --- a/apk/update +++ b/apk/update @@ -1,6 +1,6 @@ { - "versionCode": 245, - "versionName": "2.3.1", + "versionCode": 246, + "versionName": "2.3.2", "url": "https://raw.githubusercontent.com/AriesHoo/FastLib/dev/apk/sample.apk", "force": false, "size": "3.74M", diff --git a/app/build.gradle b/app/build.gradle index c6861b4..96348b6 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,14 +1,13 @@ apply plugin: 'com.android.application' -def ext = rootProject.ext android { - compileSdkVersion ext.compileSdkVersion + compileSdkVersion rootProject.compileSdkVersion defaultConfig { applicationId "com.aries.library.fast.demo" - minSdkVersion ext.minSdkVersion - targetSdkVersion ext.targetSdkVersion - versionCode ext.versionCode - versionName ext.versionName + minSdkVersion rootProject.minSdkVersion + targetSdkVersion rootProject.targetSdkVersion + versionCode rootProject.versionCode + versionName rootProject.versionName multiDexEnabled true testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" buildConfigField "Boolean", "LOG_ENABALE", "true" @@ -77,7 +76,7 @@ android { dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') implementation project(':library') - // implementation 'com.github.AriesHoo:FastLib:2.3.1' + // implementation 'com.github.AriesHoo:FastLib:2.3.2' debugImplementation 'com.squareup.leakcanary:leakcanary-android:1.6.3' releaseImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.6.3' testImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.6.3' diff --git a/build.gradle b/build.gradle index 8e72d71..7428a5b 100644 --- a/build.gradle +++ b/build.gradle @@ -32,6 +32,6 @@ ext{ targetSdkVersion = 28 supportVersion = "1.0.0" widgetVersion = "3.2.24" - versionCode = 245 - versionName = "2.3.1" + versionCode = 246 + versionName = "2.3.2" } diff --git a/library/src/main/java/com/aries/library/fast/FastManager.java b/library/src/main/java/com/aries/library/fast/FastManager.java index bbc3b70..edcef13 100644 --- a/library/src/main/java/com/aries/library/fast/FastManager.java +++ b/library/src/main/java/com/aries/library/fast/FastManager.java @@ -43,14 +43,15 @@ */ public class FastManager { - // 通过FastFileProvider进行初始化 -// static { -// Application application = FastUtil.getApplication(); -// if (application != null) { -// LoggerManager.i("FastManager", "initSuccess"); -// init(application); -// } -// } + //原本在Provider中默认进行初始化,如果app出现多进程使用该模式可避免调用异常出现 + static { + Application application = FastUtil.getApplication(); + if (application != null) { + LoggerManager.i("FastManager", "initSuccess"); + init(application); + } + } + private static volatile FastManager sInstance; private FastManager() { @@ -136,7 +137,7 @@ public Application getApplication() { * @return */ static FastManager init(Application application) { - LoggerManager.i("init"); + LoggerManager.i("init_mApplication:" + mApplication + ";application;" + application); //保证只执行一次初始化属性 if (mApplication == null && application != null) { mApplication = application;