I am having this error when running my app on Android Q:
Here's my configuration:
my jdk version :jdk1.8.0_221
compileSdkVersion 29
buildToolsVersion '29.0.3'
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}android.useAndroidX=true
android.enableJetifier=true
classpath 'com.android.tools.build:gradle:3.6.1'
distributionUrl=https://services.gradle.org/distributions/gradle-5.6.4-all.zip
HimalayaFmLocalAppImpl$1 is a inner class which implements android/content/ServiceConnection. And only override onServiceConnected
and onServiceDisconnected
methods, don't override onBindingDied
method.
Any help is appreciated!!!
java.lang.NoClassDefFoundError: Failed resolution of: Landroid/content/ServiceConnection$-CC; at com.heytap.speechassist.skill.multimedia.fm.himalaya.HimalayaFmLocalAppImpl$1.onBindingDied(Unknown Source:0) at android.app.LoadedApk$ServiceDispatcher.doConnected(LoadedApk.java:2090) at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:2126) at android.os.Handler.handleCallback(Handler.java:883) at android.os.Handler.dispatchMessage(Handler.java:100) at android.os.Looper.loop(Looper.java:238) at android.app.ActivityThread.main(ActivityThread.java:7872) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:983) Caused by: java.lang.ClassNotFoundException: Didn't find class "android.content.ServiceConnection$-CC" on path: DexPathList[[zip file "/data/app/com.heytap.speechassist-baZt4vUeYDNjgdpEqqXK7g==/base.apk"],nativeLibraryDirectories=[/data/app/com.heytap.speechassist-baZt4vUeYDNjgdpEqqXK7g==/lib/arm64, /data/app/com.heytap.speechassist-baZt4vUeYDNjgdpEqqXK7g==/base.apk!/lib/arm64-v8a, /system/lib64, /product/lib64]] at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:196) at java.lang.ClassLoader.loadClass(ClassLoader.java:379) at java.lang.ClassLoader.loadClass(ClassLoader.java:312)