Incorrect APKs versionCode order when building multiple APKs for both 32bit and 64 bit platforms with crosswalk

前端 未结 1 1980
遇见更好的自我
遇见更好的自我 2021-01-02 22:00

I need to build the ionic/cordova application for both 32bit (armeabi-v7a and x86) and 64bit (arm64-v8a and x86_64) platforms. I build four separate APKs using commands

相关标签:
1条回答
  • 2021-01-02 22:30

    It seems there is a bug in cordova-plugin-crosswalk-webview. This code part from platforms/android/build.gradle (used to build 32-bit):

    productFlavors {
            armv7 {
                versionCode defaultConfig.versionCode*10 + 2
                ndk {
                    abiFilters "armeabi-v7a", ""
                }
            }
            x86 {
                versionCode defaultConfig.versionCode*10 + 4
                ndk {
                    abiFilters "x86", ""
                }
            }
            all {
                ndk {
                    abiFilters "all", ""
                }
            }
        }
    

    here is versionCode*10 as seen... And this code part from platforms/android/cordova-plugin-crosswalk-webview/YOUR_APP_SUFFIX-xwalk.gradle (used to build 64-bit):

    productFlavors {
                x86_64 {
                    versionCode defaultConfig.versionCode + 6
                    ndk {
                       abiFilters "x86_64", ""
                    }
                }
                arm64 {
                    versionCode defaultConfig.versionCode + 9
                    ndk {
                        abiFilters "arm64-v8a", ""
                    }
                }
            }
    

    and here is just versionCode. So I usually change second file to versionCode*10 to solve PlayMarket issues

    0 讨论(0)
提交回复
热议问题