From fa031626b6902b8879c8c58bfaae711c8b3d276c Mon Sep 17 00:00:00 2001 From: jiankian Date: Fri, 11 Feb 2022 03:44:35 +0800 Subject: [PATCH 1/2] fix explicit value for android:exported to compatible Android API 32 --- android/src/main/AndroidManifest.xml | 2 ++ example/.flutter-plugins-dependencies | 2 +- example/ios/Flutter/flutter_export_environment.sh | 7 +++---- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/android/src/main/AndroidManifest.xml b/android/src/main/AndroidManifest.xml index 9f8e2a2..6fecdae 100644 --- a/android/src/main/AndroidManifest.xml +++ b/android/src/main/AndroidManifest.xml @@ -2,6 +2,8 @@ package="com.jiguang.jmessageflutter"> diff --git a/example/.flutter-plugins-dependencies b/example/.flutter-plugins-dependencies index bc25b71..a095f81 100644 --- a/example/.flutter-plugins-dependencies +++ b/example/.flutter-plugins-dependencies @@ -1 +1 @@ -{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"image_picker","path":"D:\\\\Workspace\\\\android\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.flutter-io.cn\\\\image_picker-0.7.5+2\\\\","dependencies":[]},{"name":"jmessage_flutter","path":"D:\\\\Workspace\\\\flutter\\\\jmessage-flutter-plugin\\\\","dependencies":[]},{"name":"modal_progress_hud_nsn","path":"D:\\\\Workspace\\\\android\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.flutter-io.cn\\\\modal_progress_hud_nsn-0.1.0-nullsafety-1\\\\","dependencies":[]},{"name":"video_thumbnail","path":"D:\\\\Workspace\\\\android\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.flutter-io.cn\\\\video_thumbnail-0.3.3\\\\","dependencies":[]}],"android":[{"name":"flutter_plugin_android_lifecycle","path":"D:\\\\Workspace\\\\android\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.flutter-io.cn\\\\flutter_plugin_android_lifecycle-2.0.1\\\\","dependencies":[]},{"name":"image_picker","path":"D:\\\\Workspace\\\\android\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.flutter-io.cn\\\\image_picker-0.7.5+2\\\\","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"jmessage_flutter","path":"D:\\\\Workspace\\\\flutter\\\\jmessage-flutter-plugin\\\\","dependencies":[]},{"name":"modal_progress_hud_nsn","path":"D:\\\\Workspace\\\\android\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.flutter-io.cn\\\\modal_progress_hud_nsn-0.1.0-nullsafety-1\\\\","dependencies":[]},{"name":"video_thumbnail","path":"D:\\\\Workspace\\\\android\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.flutter-io.cn\\\\video_thumbnail-0.3.3\\\\","dependencies":[]}],"macos":[],"linux":[],"windows":[],"web":[{"name":"image_picker_for_web","path":"D:\\\\Workspace\\\\android\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.flutter-io.cn\\\\image_picker_for_web-2.0.0\\\\","dependencies":[]}]},"dependencyGraph":[{"name":"flutter_plugin_android_lifecycle","dependencies":[]},{"name":"image_picker","dependencies":["flutter_plugin_android_lifecycle","image_picker_for_web"]},{"name":"image_picker_for_web","dependencies":[]},{"name":"jmessage_flutter","dependencies":[]},{"name":"modal_progress_hud_nsn","dependencies":[]},{"name":"video_thumbnail","dependencies":[]}],"date_created":"2021-06-01 11:58:00.043626","version":"2.2.0"} \ No newline at end of file +{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"image_picker","path":"/Users/jiankian/.pub-cache/hosted/pub.dartlang.org/image_picker-0.7.5+4/","dependencies":[]},{"name":"jmessage_flutter","path":"/Users/jiankian/Workspace/jmessage-flutter-plugin/","dependencies":[]},{"name":"modal_progress_hud_nsn","path":"/Users/jiankian/.pub-cache/hosted/pub.dartlang.org/modal_progress_hud_nsn-0.1.0-nullsafety-1/","dependencies":[]},{"name":"video_thumbnail","path":"/Users/jiankian/.pub-cache/hosted/pub.dartlang.org/video_thumbnail-0.3.3/","dependencies":[]}],"android":[{"name":"flutter_plugin_android_lifecycle","path":"/Users/jiankian/.pub-cache/hosted/pub.dartlang.org/flutter_plugin_android_lifecycle-2.0.5/","dependencies":[]},{"name":"image_picker","path":"/Users/jiankian/.pub-cache/hosted/pub.dartlang.org/image_picker-0.7.5+4/","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"jmessage_flutter","path":"/Users/jiankian/Workspace/jmessage-flutter-plugin/","dependencies":[]},{"name":"modal_progress_hud_nsn","path":"/Users/jiankian/.pub-cache/hosted/pub.dartlang.org/modal_progress_hud_nsn-0.1.0-nullsafety-1/","dependencies":[]},{"name":"video_thumbnail","path":"/Users/jiankian/.pub-cache/hosted/pub.dartlang.org/video_thumbnail-0.3.3/","dependencies":[]}],"macos":[],"linux":[],"windows":[],"web":[{"name":"image_picker_for_web","path":"/Users/jiankian/.pub-cache/hosted/pub.dartlang.org/image_picker_for_web-2.1.5/","dependencies":[]}]},"dependencyGraph":[{"name":"flutter_plugin_android_lifecycle","dependencies":[]},{"name":"image_picker","dependencies":["flutter_plugin_android_lifecycle","image_picker_for_web"]},{"name":"image_picker_for_web","dependencies":[]},{"name":"jmessage_flutter","dependencies":[]},{"name":"modal_progress_hud_nsn","dependencies":[]},{"name":"video_thumbnail","dependencies":[]}],"date_created":"2022-02-11 03:40:34.863439","version":"2.10.1"} \ No newline at end of file diff --git a/example/ios/Flutter/flutter_export_environment.sh b/example/ios/Flutter/flutter_export_environment.sh index 159b7cb..05c7113 100755 --- a/example/ios/Flutter/flutter_export_environment.sh +++ b/example/ios/Flutter/flutter_export_environment.sh @@ -1,11 +1,10 @@ #!/bin/sh # This is a generated file; do not edit or check into version control. -export "FLUTTER_ROOT=D:\Workspace\android\flutter" -export "FLUTTER_APPLICATION_PATH=D:\Workspace\flutter\jmessage-flutter-plugin\example" +export "FLUTTER_ROOT=/Users/jiankian/Developer/flutter" +export "FLUTTER_APPLICATION_PATH=/Users/jiankian/Workspace/jmessage-flutter-plugin/example" export "COCOAPODS_PARALLEL_CODE_SIGN=true" -export "FLUTTER_TARGET=lib\main.dart" +export "FLUTTER_TARGET=lib/main.dart" export "FLUTTER_BUILD_DIR=build" -export "SYMROOT=${SOURCE_ROOT}/../build\ios" export "FLUTTER_BUILD_NAME=1.0.0" export "FLUTTER_BUILD_NUMBER=1" export "DART_OBFUSCATION=false" From dd638e4a708d8485884cd2a00b0ffc9e6db8d7d7 Mon Sep 17 00:00:00 2001 From: jiankian Date: Fri, 11 Feb 2022 05:33:45 +0800 Subject: [PATCH 2/2] fix support for Android 12 --- android/build.gradle | 2 +- example/android/app/build.gradle | 12 ++++++------ example/android/app/src/main/AndroidManifest.xml | 1 + example/android/build.gradle | 2 +- example/android/gradle.properties | 2 +- .../android/gradle/wrapper/gradle-wrapper.properties | 2 +- 6 files changed, 11 insertions(+), 10 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index f0f6041..3b40d5d 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -38,5 +38,5 @@ android { dependencies { implementation 'cn.jiguang.sdk:jmessage:2.9.2' - implementation 'cn.jiguang.sdk:jcore:2.8.2' + implementation 'cn.jiguang.sdk:jcore:3.1.0' } \ No newline at end of file diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle index ce62977..ab2ca5b 100644 --- a/example/android/app/build.gradle +++ b/example/android/app/build.gradle @@ -25,17 +25,14 @@ apply plugin: 'com.android.application' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" android { - compileSdkVersion 28 + compileSdkVersion 31 - lintOptions { - disable 'InvalidPackage' - } defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). applicationId "com.shikk.testJpush" minSdkVersion 17 - targetSdkVersion 28 + targetSdkVersion 31 versionCode flutterVersionCode.toInteger() versionName flutterVersionName testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" @@ -60,6 +57,9 @@ android { signingConfig signingConfigs.debug } } + lint { + disable 'InvalidPackage' + } } flutter { @@ -67,7 +67,7 @@ flutter { } dependencies { - testImplementation 'junit:junit:4.12' + testImplementation 'junit:junit:4.13.2' androidTestImplementation 'com.android.support.test:runner:1.0.2' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' } diff --git a/example/android/app/src/main/AndroidManifest.xml b/example/android/app/src/main/AndroidManifest.xml index 6a2d687..075901c 100644 --- a/example/android/app/src/main/AndroidManifest.xml +++ b/example/android/app/src/main/AndroidManifest.xml @@ -22,6 +22,7 @@ android:theme="@style/LaunchTheme" android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density" android:hardwareAccelerated="true" + android:exported="true" android:windowSoftInputMode="adjustResize">