Android Market multiple APK… How about different CPU architectures?

后端 未结 5 1228
野性不改
野性不改 2021-02-05 09:57

So I thought I could now upload my app using different NDK compiled libraries for targeted CPU architectures but it seems like that\'s not possible.

Anyone know how to u

5条回答
  •  广开言路
    2021-02-05 10:24

    In new Play store developer console if you want to add multiple APK than you must need to use same package name and same keystore key but different version code. You have publish app then first upload Apk e.g mobile_release and rollout for production, after when you upload another apk, you should choose option RETAIN on previous APK also with current APK.

      android {
    
            // To create different apk per abi
            splits {
                abi {
                    enable true
                    reset()
                    include 'armeabi', 'armeabi-v7a', 'x86'
                    universalApk true
                }
            }
        }
    
        import com.android.build.OutputFile
    
        // Map for the version code
        ext.versionCodes = ['armeabi': 1, 'armeabi-v7a': 2, 'x86': 3]
        android.applicationVariants.all { variant ->
    
            // assign different version code for each output
            variant.outputs.each { output ->
                int abiVersionCode = project.ext.versionCodes.get(output.getFilter(OutputFile.ABI)) ?: 0
                output.versionCodeOverride = (abiVersionCode * 1000) + android.defaultConfig.versionCode
            }
        }
    

提交回复
热议问题