When I try to install the android application on API 26. I am getting this error.
First I have tried with build tool version
- 25.3.1
encounter same issue as shown in the below image.
and then I have updated build tools version
to 26.0.1
and support library version to 26.0.0
.
with recent Google Play Service Version - 11.0.4
.
I have checked whether android libraries which I am using have native code i.e., C++ code but every library library I used is written in Java expect one library with bits of PHP,Python and Ruby.
I am Using
I have tried including ABI Splits in my Gradle file as mentioned here
splits {
abi {
enable true
reset()
include 'x86', 'armeabi-v7a'
universalApk true
}
}
But encountered same error everytime.
Emulator Device Details :
Based from this thread, this problem occurs when your app uses ARM architecture and the device or emulator that you are trying to install the app support otherwise such as x86. Try installing it on ARM emulator. Also, if your app is built with the ARMv7 architecture in mind, be sure to only use system images with ABI: armeabi-v7a.
Additional references:
Hope this helps!
This problem occurs when ADB can not install the proper APK according to the phone or emulator you are using. ABI split can resolve this easily.
splits {
abi {
enable true
reset()
include 'x86', 'x86_64', 'armeabi-v7a'
universalApk true
}
}
But if it can not (this seems as your case too), then it looks like some of the libraries you are using does not support the API level of the phone or emulator. To ensure this is the case, try installing your app on different API level emulators or phone and you will notice that it runs on few and doesn't support few others. There might be some native libraries that isn't compatible with all Android versions.
In my case I was successful in running the app on phones with android other than android Oreo and Pie. Reason was my gradle had this below implementation that did not support mentioned API levels (28 and above).
implementation 'org.apache.directory.studio:org.apache.commons.io:2.4'
If you have any such library that might not support all versions then try changing it's version to newer ones or just remove it if you can achieve your functionality without it. In my case I was lucky enough that I did not needed it at all and removing it resolved the issue.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With