Currently there are two apk files that I need so that I can run a test on AWS device farm:
- app.apk
- app-androidTest.apk
app.apk is generated fine as I intended
$ ./aapt list -a .../apk/app-debug.apk | grep SdkVersion
A: android:minSdkVersion(0x0101020c)=(type 0x10)0x10
A: android:targetSdkVersion(0x01010270)=(type 0x10)0x19
A: android:maxSdkVersion(0x01010271)=(type 0x10)0x19
but app-androidTest.apk has a sdk version fixed to 0x19(25) no matter what I do
$ ./aapt list -a .../apk/app-debug-androidTest.apk | grep SdkVersion
A: android:minSdkVersion(0x0101020c)=(type 0x10)0x19
A: android:targetSdkVersion(0x01010270)=(type 0x10)0x19
I have my gradle setting as below:
compileSdkVersion 25
buildToolsVersion '25.0.2'
lintOptions {
checkReleaseBuilds false
// Or, if you prefer, you can continue to check for errors in release builds,
// but continue the build even when errors are found:
abortOnError false
}
defaultConfig {
applicationId "com.thisclicks.appdataroom"
minSdkVersion 16
targetSdkVersion 25
versionCode versCode as Integer
versionName versName
multiDexEnabled true
testInstrumentationRunner}
I need a testing apk with minSdk 0x10, targetSdk 0x19. but it doesn't follow my gradle setting and get overridden by something else. however there are no gradle or androidManifest that interferes. My guess is that when I generate the testing apk, I do it by manually running on an emulator with API 25. It automatically generates the apk. Is this a possible reason that my testing apk is tied to the sdk version of 25 (min and target)? If then do you know how can resolve this?