I keep reading about the verifyError exception, but I can't seem to find a good solution for my problem.
The logs give me the following error:
Caused by: java.lang.VerifyError: Verifier rejected class mypackage.GraphThready: void mypackage.GraphThready.run() failed to verify: void mypackage.GraphThready.run(): [0x50BE] copy1 v2<-v398 type=Undefined cat=1 (declaration of 'mypackage.GraphThready' appears in /data/app/mypackage-2/split_lib_slice_9_apk.apk)
I don't know if it is because my class, mypackage.GraphThready is declared twice or perhaps the fact that I am testing my app on Android device with API 24(version number 7.0)
Here is what part of the app gradle file looks like:
compileSdkVersion 26
buildToolsVersion '27.0.3'
defaultConfig {
applicationId "mypackage"
minSdkVersion 16
targetSdkVersion 26
versionCode 2
versionName "2.0"
multiDexEnabled true
Perhaps I should change 'compiledSdkVersion' to 24? Any suggestions.
Android Studiowithfile -> invalidate caches & restart.compileSdkVersionis not a good option, since you won't be able to use newAPI's. Try upgrading instead. Upgrade build tools, Android Studio, Gradle Version.