How to fix build error of weired Android API version mismatch
-
wrote on 13 Mar 2022, 21:11 last edited by
I need to use a Java library, that requires a minimum API level 24. My Manifest file has defined the minimum API version 28 and a target API version 29. Nevertheless, an error occurs:
D8: Static interface methods are only supported starting with Android N (--min-api 24): android.hidl.base.V1_0.IBase android.hidl.base.V1_0.IBase.asInterface(android.os.IHwBinder) com.android.builder.dexing.DexArchiveBuilderException: com.android.builder.dexing.DexArchiveBuilderException: Failed to process /Users/adam/.gradle/caches/transforms-1/files-1.1/sdk_patched_28.aar/7d9976866220f25f9e1cac6996be3287/jars/classes.jar
This error message doesn't makes sense for me. However in the Kit management for my project I can see the value "android-21" for the property "ANDROID_NDK_PLATFORM". But changing the value manually has no impact.
Under the Qt Creator settings for devices I can see the message, that Android settings are correct. I use the SDK version 26.1.1 and NDK Version 21.3.6525147.
Has someone any idea?
-
wrote on 15 Mar 2022, 16:25 last edited by
I was able to solve this issue by extending the build.grandle in the automatically created part under the first line, I have quoted in my snippet:
compileSdkVersion androidCompileSdkVersion.toInteger() defaultConfig { minSdkVersion = 28 }
1/2