diff --git a/android/app/build.gradle b/android/app/build.gradle index c2a7685a..5a9f81ab 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -100,6 +100,10 @@ android { } } + lintOptions { + checkReleaseBuilds false + } + defaultConfig { applicationId "com.zsw.huixiang" minSdkVersion 21 @@ -109,7 +113,7 @@ android { ndk { /// 选择要添加的对应.so 库。 - abiFilters 'armeabi', 'armeabi-v7a', 'arm64-v8a' + abiFilters 'armeabi-v7a', 'arm64-v8a' } manifestPlaceholders = mfph @@ -137,19 +141,25 @@ android { buildTypes { release { +// debuggable true +// shrinkResources false +// minifyEnabled false signingConfig signingConfigs.config - proguardFiles getDefaultProguardFile('proguard-android.txt'), - 'proguard-rules.pro' +// proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } debug { +// debuggable true +// shrinkResources false +// minifyEnabled false signingConfig signingConfigs.config - proguardFiles getDefaultProguardFile('proguard-android.txt'), - 'proguard-rules.pro' +// proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } profile { +// debuggable true +// shrinkResources false +// minifyEnabled false signingConfig signingConfigs.config - proguardFiles getDefaultProguardFile('proguard-android.txt'), - 'proguard-rules.pro' +// proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } diff --git a/android/app/libs/arm64-v8a/libBaiduMapSDK_base_v7_1_0.so b/android/app/libs/arm64-v8a/libBaiduMapSDK_base_v7_1_0.so new file mode 100644 index 00000000..1babe0df Binary files /dev/null and b/android/app/libs/arm64-v8a/libBaiduMapSDK_base_v7_1_0.so differ diff --git a/android/app/libs/arm64-v8a/libBaiduMapSDK_map_v7_1_0.so b/android/app/libs/arm64-v8a/libBaiduMapSDK_map_v7_1_0.so new file mode 100644 index 00000000..eae2136d Binary files /dev/null and b/android/app/libs/arm64-v8a/libBaiduMapSDK_map_v7_1_0.so differ diff --git a/android/app/libs/arm64-v8a/libflutter.so b/android/app/libs/arm64-v8a/libflutter.so new file mode 100644 index 00000000..4854b583 Binary files /dev/null and b/android/app/libs/arm64-v8a/libflutter.so differ diff --git a/android/app/libs/arm64-v8a/libgnustl_shared.so b/android/app/libs/arm64-v8a/libgnustl_shared.so new file mode 100644 index 00000000..be99b75a Binary files /dev/null and b/android/app/libs/arm64-v8a/libgnustl_shared.so differ diff --git a/android/app/libs/arm64-v8a/libindoor.so b/android/app/libs/arm64-v8a/libindoor.so new file mode 100644 index 00000000..bfb6f75d Binary files /dev/null and b/android/app/libs/arm64-v8a/libindoor.so differ diff --git a/android/app/libs/arm64-v8a/liblocSDK8a.so b/android/app/libs/arm64-v8a/liblocSDK8a.so new file mode 100644 index 00000000..cd47e164 Binary files /dev/null and b/android/app/libs/arm64-v8a/liblocSDK8a.so differ diff --git a/android/app/libs/armeabi-v7a/libBaiduMapSDK_base_v7_1_0.so b/android/app/libs/armeabi-v7a/libBaiduMapSDK_base_v7_1_0.so new file mode 100644 index 00000000..4c2ad646 Binary files /dev/null and b/android/app/libs/armeabi-v7a/libBaiduMapSDK_base_v7_1_0.so differ diff --git a/android/app/libs/armeabi-v7a/libBaiduMapSDK_map_v7_1_0.so b/android/app/libs/armeabi-v7a/libBaiduMapSDK_map_v7_1_0.so new file mode 100644 index 00000000..165cccf5 Binary files /dev/null and b/android/app/libs/armeabi-v7a/libBaiduMapSDK_map_v7_1_0.so differ diff --git a/android/app/libs/armeabi-v7a/libflutter.so b/android/app/libs/armeabi-v7a/libflutter.so new file mode 100644 index 00000000..25a45fc9 Binary files /dev/null and b/android/app/libs/armeabi-v7a/libflutter.so differ diff --git a/android/app/libs/armeabi-v7a/libgnustl_shared.so b/android/app/libs/armeabi-v7a/libgnustl_shared.so new file mode 100644 index 00000000..96c22a25 Binary files /dev/null and b/android/app/libs/armeabi-v7a/libgnustl_shared.so differ diff --git a/android/app/libs/armeabi-v7a/libindoor.so b/android/app/libs/armeabi-v7a/libindoor.so new file mode 100644 index 00000000..b59be91e Binary files /dev/null and b/android/app/libs/armeabi-v7a/libindoor.so differ diff --git a/android/app/libs/armeabi-v7a/liblocSDK8a.so b/android/app/libs/armeabi-v7a/liblocSDK8a.so new file mode 100644 index 00000000..0c6e58c5 Binary files /dev/null and b/android/app/libs/armeabi-v7a/liblocSDK8a.so differ diff --git a/android/app/libs/armeabi/libBaiduMapSDK_base_v7_1_0.so b/android/app/libs/armeabi/libBaiduMapSDK_base_v7_1_0.so new file mode 100644 index 00000000..d514fcdb Binary files /dev/null and b/android/app/libs/armeabi/libBaiduMapSDK_base_v7_1_0.so differ diff --git a/android/app/libs/armeabi/libBaiduMapSDK_map_v7_1_0.so b/android/app/libs/armeabi/libBaiduMapSDK_map_v7_1_0.so new file mode 100644 index 00000000..73736219 Binary files /dev/null and b/android/app/libs/armeabi/libBaiduMapSDK_map_v7_1_0.so differ diff --git a/android/app/libs/armeabi/libgnustl_shared.so b/android/app/libs/armeabi/libgnustl_shared.so new file mode 100644 index 00000000..5cf6d20f Binary files /dev/null and b/android/app/libs/armeabi/libgnustl_shared.so differ diff --git a/android/app/libs/armeabi/libindoor.so b/android/app/libs/armeabi/libindoor.so new file mode 100644 index 00000000..a0879cfd Binary files /dev/null and b/android/app/libs/armeabi/libindoor.so differ diff --git a/android/app/libs/armeabi/liblocSDK8a.so b/android/app/libs/armeabi/liblocSDK8a.so new file mode 100644 index 00000000..52869965 Binary files /dev/null and b/android/app/libs/armeabi/liblocSDK8a.so differ diff --git a/android/app/libs/x86/libAMapSDK_MAP_v7_9_1.so b/android/app/libs/x86/libAMapSDK_MAP_v7_9_1.so deleted file mode 100644 index 5657ef13..00000000 Binary files a/android/app/libs/x86/libAMapSDK_MAP_v7_9_1.so and /dev/null differ diff --git a/android/app/libs/x86_64/libAMapSDK_MAP_v7_9_1.so b/android/app/libs/x86_64/libAMapSDK_MAP_v7_9_1.so deleted file mode 100644 index 35d70448..00000000 Binary files a/android/app/libs/x86_64/libAMapSDK_MAP_v7_9_1.so and /dev/null differ diff --git a/android/app/proguard-rules.pro b/android/app/proguard-rules.pro index 1ab628de..bfaef61f 100644 --- a/android/app/proguard-rules.pro +++ b/android/app/proguard-rules.pro @@ -1,6 +1,19 @@ + +# Flutter wrapper + -keep class io.flutter.app.** { *; } + -keep class io.flutter.plugin.** { *; } + -keep class io.flutter.util.** { *; } + -keep class io.flutter.view.** { *; } + -keep class io.flutter.** { *; } + -keep class io.flutter.plugins.** { *; } +# -keep class com.google.firebase.** { *; } // uncomment this if you are using firebase in the project + -dontwarn io.flutter.embedding.** + -ignorewarnings + # Build the ephemeral app in a module project. # Prevents: Warning: library class depends on program class io.flutter.plugin.** # This is due to plugins (libraries) depending on the embedding (the program jar) + -dontwarn io.flutter.plugin.** # The android.** package is provided by the OS at runtime. @@ -30,6 +43,9 @@ -keep class com.tencent.bigdata.baseapi.** {*;} -keep class com.tencent.bigdata.mqttchannel.** {*;} +-keepclassmembers class * extends io.flutter.embedding.engine.plugins.FlutterPlugin {} +-keepclassmembers class * implements io.flutter.plugin.common.MethodChannel.MethodCallHandler {} + #andResGuard { # whiteList = [ # "R.layout.mob_authorize_*", diff --git a/android/gradle.properties b/android/gradle.properties index 68c48bb2..42c318de 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -1,4 +1,5 @@ -org.gradle.jvmargs=-Xmx1536M +#org.gradle.jvmargs=-Xmx1536M +org.gradle.jvmargs=-Xmx4096m android.useAndroidX=true android.enableJetifier=true MobSDK.mobEnv=x \ No newline at end of file diff --git a/lib/main.dart b/lib/main.dart index b0a4e8e7..f263c8f5 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -67,6 +67,7 @@ import 'mine/manage_address_page.dart'; import 'mine/roll_center_page.dart'; void main() async { + if (Platform.isAndroid) { SystemChrome.setSystemUIOverlayStyle( SystemUiOverlayStyle(statusBarColor: Colors.transparent)); @@ -75,7 +76,6 @@ void main() async { SystemChrome.setPreferredOrientations([ DeviceOrientation.portraitUp, ]); - SharedPreferences sharedPreferences = await SharedPreferences.getInstance(); Locale locale; if (sharedPreferences.containsKey("language") && @@ -84,7 +84,6 @@ void main() async { } else { locale = Locale.fromSubtags(languageCode: 'zh', countryCode: 'TW'); } - initSdk(); bool isFirst = sharedPreferences.getBool("isFirst"); print("isFirst:$isFirst"); diff --git a/lib/retrofit/retrofit_api.dart b/lib/retrofit/retrofit_api.dart index 700e9905..a571b348 100644 --- a/lib/retrofit/retrofit_api.dart +++ b/lib/retrofit/retrofit_api.dart @@ -61,7 +61,6 @@ abstract class ApiService { debugPrint("code = ${response.statusCode}"); p(jsonEncode(response.data)); Map map = response.data; - if (map["code"] == 40005 || map["code"] == 40001) { SmartDialog.show( widget: LoginTips( diff --git a/pubspec.lock b/pubspec.lock index 7914582b..93a0a37d 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -405,7 +405,7 @@ packages: name: fluwx url: "https://pub.flutter-io.cn" source: hosted - version: "3.5.0" + version: "3.5.1" glob: dependency: transitive description: @@ -1056,7 +1056,7 @@ packages: name: win32 url: "https://pub.flutter-io.cn" source: hosted - version: "2.0.5" + version: "2.2.5" xdg_directories: dependency: transitive description: @@ -1079,5 +1079,5 @@ packages: source: hosted version: "3.1.0" sdks: - dart: ">=2.12.0 <3.0.0" + dart: ">=2.13.0 <3.0.0" flutter: ">=2.0.0"