How to reduce the apk size of my Android app with openCv library integrated

前端 未结 2 1784
北海茫月
北海茫月 2021-01-01 03:39

I have searched for this a lot, but didn\'t get a solution and hence posting this.

Scenario: I\'m building an Android app which uses opencv library

2条回答
  •  庸人自扰
    2021-01-01 04:17

    You can enable ABI splitting in the build.gradle file like this:

        android {
        // Some other configuration here...
    
        splits {
            abi {
                enable true
                reset()
                include 'x86', 'armeabi', 'armeabi-v7a', 'mips'
                universalApk false
            }
        }
    }
    

    Refer this link https://realm.io/news/reducing-apk-size-native-libraries/

提交回复
热议问题