APK completely shadowed with multiple ABI APKs

こ雲淡風輕ζ 提交于 2019-12-02 12:28:37

The versionCode of the arm64-v8a APK should be higher than the versionCode of the armeavi-v7a APK.

To determine which APK is served, Play picks the highest versionCode that is a compatible with the given device. Because all devices supporting 64 bits (arm64-v8a) also support 32 bits (armeabi-v7a), if you put the 32-bit APK with a higher versionCode, it will also match for 64-bits devices and thus that one will be served instead of the 64-bits one. That's why Play tells you that the arm64-v8a is shadowed.

Hope that helps.

As Pierre suggested, each of the APKs (v7a, v8) contained both of the ABIs. But how could that happen you ask?

Due to JavaCV (OpenCV libraries) Gradle dependencies for both ABIs in one module:

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:26.1.0'
    implementation 'com.android.support:recyclerview-v7:26.1.0'

    api (group: 'org.bytedeco', name: 'javacv', version: '1.4.3', {
        exclude group: 'org.bytedeco.javacpp-presets', module: 'flandmark'
        exclude group: 'org.bytedeco.javacpp-presets', module: 'flycapture'
        exclude group: 'org.bytedeco.javacpp-presets', module: 'leptonica'
        exclude group: 'org.bytedeco.javacpp-presets', module: 'libdc1394'
        exclude group: 'org.bytedeco.javacpp-presets', module: 'libfreenect2'
        exclude group: 'org.bytedeco.javacpp-presets', module: 'libfreenect'
        exclude group: 'org.bytedeco.javacpp-presets', module: 'librealsense'
        exclude group: 'org.bytedeco.javacpp-presets', module: 'tesseract'
        exclude group: 'org.bytedeco.javacpp-presets', module: 'videoinput'
        exclude group: 'org.bytedeco.javacpp-presets', module: 'artoolkitplus'
    })

    // add the libraries you need depending on your mobile phone - if you get an exception or
    // "... class not found", or "didn't load library ...", try replace android-arm64 with android-arm, or with android-x86
    implementation group: 'org.bytedeco.javacpp-presets', name: 'opencv', version: '3.4.3-1.4.3', classifier: 'android-arm'
    implementation group: 'org.bytedeco.javacpp-presets', name: 'opencv', version: '3.4.3-1.4.3', classifier: 'android-arm64'
}

I commented out implementation group: 'org.bytedeco.javacpp-presets', name: 'opencv', version: '3.4.3-1.4.3', classifier: 'android-arm64', re uploaded and it worked. arm64 supports arm, but not the other way around.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!