Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API (unsupported) warning in Google play store pre-launch reports #946

Closed
arunkumarpandian opened this issue Dec 14, 2020 · 2 comments
Closed

Comments

@arunkumarpandian
Copy link

Describe the bug
I see the following API compatibility warning reported from Google play store pre-launch reports. I didn't see any issues when building and testing a release build of my app with the plugin on the emulator as well as physical devices though.

StrictMode policy violation: android.os.strictmode.NonSdkApiUsedViolation: Lsun/misc/Unsafe;->theUnsafe:Lsun/misc/Unsafe; at android.os.StrictMode.lambda$static$1(StrictMode.java:428) at android.os.-$$Lambda$StrictMode$lu9ekkHJ2HMz0jd3F8K8MnhenxQ.accept(Unknown Source:2) at java.lang.Class.getDeclaredField(Native Method) at com.google.gson.internal.l.a(Unknown Source:13) at com.google.gson.internal.c$e.<init>(Unknown Source:7) at com.google.gson.internal.c.b(Unknown Source:2) at com.google.gson.internal.c.a(Unknown Source:54) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(Unknown Source:16) at com.google.gson.Gson.a(Unknown Source:35) at com.dexterous.flutterlocalnotifications.RuntimeTypeAdapterFactory.create(Unknown Source:52) at com.google.gson.Gson.a(Unknown Source:74) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.a(Unknown Source:41) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.a(Unknown Source:123) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(Unknown Source:22) at com.google.gson.Gson.a(Unknown Source:74) at com.google.gson.Gson.a(Unknown Source:4) at com.google.gson.Gson.a(Unknown Source:8) at com.google.gson.Gson.a(Unknown Source:5) at com.google.gson.Gson.a(Unknown Source:13) at com.dexterous.flutterlocalnotifications.FlutterLocalNotificationsPlugin.zonedScheduleNotification(Unknown Source:4) at com.dexterous.flutterlocalnotifications.FlutterLocalNotificationsPlugin.zonedSchedule(Unknown Source:29) at com.dexterous.flutterlocalnotifications.FlutterLocalNotificationsPlugin.onMethodCall(Unknown Source:229) at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(Unknown Source:17) at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(Unknown Source:57) at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(Unknown Source:4) at android.os.MessageQueue.nativePollOnce(Native Method) at android.os.MessageQueue.next(MessageQueue.java:326) at android.os.Looper.loop(Looper.java:160) at android.app.ActivityThread.main(ActivityThread.java:6718) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

My setup

$ flutter doctor -v
[✓] Flutter (Channel beta, 1.24.0-10.2.pre, on Linux, locale en_GB.UTF-8)
• Flutter version 1.24.0-10.2.pre at /home/xxxx/tools/flutter/flutter
• Framework revision 022b333a08 (4 weeks ago), 2020-11-18 11:35:09 -0800
• Engine revision 07c1eed46b
• Dart version 2.12.0 (build 2.12.0-29.10.beta)

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
• Android SDK at /home/xxxx/Android/Sdk
• Platform android-30, build-tools 30.0.3
• ANDROID_HOME = /home/xxxx/Android/Sdk
• ANDROID_SDK_ROOT = /home/xxxx/Android/Sdk
• Java binary at: /usr/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.9.1+1-Ubuntu-0ubuntu1.20.04)
• All Android licenses accepted.

$ cat pubspec.yaml | grep local
flutter_local_notifications: ^3.0.1+6

proguard-rules.pro

  • Have added all the content from the example

app/build.gradle

`android {
compileSdkVersion 29

sourceSets {
    main.java.srcDirs += 'src/main/kotlin'
}

lintOptions {
    disable 'InvalidPackage'
}

defaultConfig {
    applicationId "com.xxx.yyy"
    minSdkVersion 23
    targetSdkVersion 29
    versionCode flutterVersionCode.toInteger()
    versionName flutterVersionName
}

// NOTE ref: https://flutter.dev/docs/deployment/android
signingConfigs {
    release {
        keyAlias keystoreProperties['keyAlias']
        keyPassword keystoreProperties['keyPassword']
        storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
        storePassword keystoreProperties['storePassword']
    }
}

buildTypes {
    release {
        // NOTE ref: https://flutter.dev/docs/deployment/android
        signingConfig signingConfigs.release
    }
}

}`

Apologies if the following is being caused by an incorrect setup at my end !

@MaikuB
Copy link
Owner

MaikuB commented Dec 14, 2020

This is likely the same issue that was reported in #623. It's an issue with an Android library being used and from what I've read shouldn't cause an issue and given it's from another dependency, not something I can address.

@arunkumarpandian
Copy link
Author

@MaikuB Thanks for clarifying ! Shall close this issue then as it is caused by the other dependency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants