Unable to build armeabi-v7a with min API 16
Created by: paidforby
While preparing release v0.21.7, I noticed that when building for the armeabi-v7a target, I get the following error,
ouinet/android/ouinet/src/main/java/ie/equalit/ouinet/OuinetBackground.kt:230: Error: Call requires API level 19 (current min is 16): android.app.ActivityManager#clearApplicationUserData [NewApi]
am.clearApplicationUserData()
~~~~~~~~~~~~~~~~~~~~~~~~
Lint found errors in the project; aborting build.
Fix the issues identified by lint, or add the following to your build script to proceed with errors:
...
android {
lintOptions {
abortOnError false
}
}
...
FAILURE: Build failed with an exception.
It seems that this clearApplicationUserData method added as part of #60 isn't supported before API level 19, but the min level for the armeabi-v7a build is 16.
@mhqz, how would you like me to resolve this? Should I just move the min API up to 19? I'm not sure that anyone is building an application with Ouinet that has a min API lower than 19 (Ceno's min API is 21). What's more, the min APIs for all the other ABIs is 21, so maybe we could just make them all the same.
Or should I come up with a work around to avoid calling this method in older android versions?