Diaconu Liviu Diaconu Liviu - 4 months ago 22
Android Question

Upload multiple apk from multiple cpu?

Fail to upload multiple apk , for multiple cpu.
Must each apk to have a different version?
it is necessary to add and

versionName '2.29.011.Sonia'
versionCode 32


from every apk ?

My configuration.

compileSdkVersion 24
buildToolsVersion '24.0.0'
defaultConfig {
applicationId 'xx.yyy.zzzzzz'
minSdkVersion 19
targetSdkVersion 24 //21 ca sa nu mai dea errorare
versionName '2.29.011.Sonia'
versionCode 32
// Enabling multidex support.
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
// ndk {
// abiFilters "armeabi", "armeabi-v7a", "arm64-v8a", "x86", "x86_64"
//}
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
signingConfig signingConfigs.config1
}

productFlavors {
cpu_86 {
minSdkVersion 19
signingConfig signingConfigs.config1
targetSdkVersion 22
ndk {
abiFilters "x86"
}

}
armeabi_cpu {
minSdkVersion 19
signingConfig signingConfigs.config1
targetSdkVersion 24
ndk {
abiFilters "armeabi"
}

}
armeabi_v7a_cpu {
minSdkVersion 19
signingConfig signingConfigs.config1
targetSdkVersion 24
ndk {
abiFilters "armeabi-v7a"
}

}
arm64_v8a_cpu {
minSdkVersion 19
signingConfig signingConfigs.config1
targetSdkVersion 24
ndk {
abiFilters "arm64-v8a"
}

}
x86_64_cpu {
minSdkVersion 19
signingConfig signingConfigs.config1
targetSdkVersion 24
ndk {
abiFilters "x86_64"
}

}
}

Answer

fixed from change minSdkVersion and add versionCode

code:

    productFlavors {
    cpu_86 {
        minSdkVersion 17
        signingConfig signingConfigs.config1
        targetSdkVersion 24
        ndk {
            abiFilters "x86"
        }
        versionCode 46
        versionName '2.41.011.Sonia'
    }
    armeabi_cpu {
        minSdkVersion 18
        signingConfig signingConfigs.config1
        targetSdkVersion 24
        ndk {
            abiFilters "armeabi"
        }
        versionCode 47
        versionName '2.42.011.Sonia'
    }
    armeabi_v7a_cpu {
        minSdkVersion 19
        signingConfig signingConfigs.config1
        targetSdkVersion 24
        ndk {
            abiFilters "armeabi-v7a"
        }
        versionCode 48
        versionName '2.43.011.Sonia'
    }
    x86_64_cpu {
        minSdkVersion 20
        signingConfig signingConfigs.config1
        targetSdkVersion 24
        ndk {
            abiFilters "x86_64"
        }
        versionCode 49
        versionName '2.44.011.Sonia'
    }
    arm64_v8a_cpu {
        minSdkVersion 21
        signingConfig signingConfigs.config1
        targetSdkVersion 24
        ndk {
            abiFilters "arm64-v8a"
        }
        versionCode 50
        versionName '2.45.011.Sonia'
        multiDexEnabled true
    }