gradle打包apk时排除指定的so文件

ndk {
            abiFilters "armeabi", "armeabi-v7a", "arm64-v8a" // 指定要ndk需要兼容的架构(这样其他依赖包里mips之类的so会被过滤掉)
        }

排除指定架构的so文件

 

android {
    defaultConfig {
        ndk {
            abiFilters "armeabi", "armeabi-v7a", "arm64-v8a" // 指定要ndk需要兼容的架构(这样其他依赖包里mips之类的so会被过滤掉)
        }
    }

    packagingOptions {
        //排除非必须的插件
        //AI 降噪插件
        exclude 'lib/arm64-v8a/libagora_ai_denoise_extension.so'
        exclude 'lib/armeabi-v7a/libagora_ai_denoise_extension.so'
        //AV1 插件(beta 功能)
        exclude 'lib/arm64-v8a/libagora_dav1d_extension.so'
        exclude 'lib/armeabi-v7a/libagora_dav1d_extension.so'
        //JND 插件(beta 功能)
        exclude 'lib/arm64-v8a/libagora_jnd_extension.so'
        exclude 'lib/armeabi-v7a/libagora_jnd_extension.so'
        //虚拟背景插件(beta 功能)
        exclude 'lib/arm64-v8a/libagora_segmentation_extension.so'
        exclude 'lib/armeabi-v7a/libagora_segmentation_extension.so'
        //ROI 插件(beta 功能)
        exclude 'lib/arm64-v8a/libagora_fd_extension.so'
        exclude 'lib/armeabi-v7a/libagora_fd_extension.so'
        //超分辨率(beta 功能)
        exclude 'lib/arm64-v8a/libagora_super_resolution_extension.so'
        exclude 'lib/armeabi-v7a/libagora_super_resolution_extension.so'
        //美颜插件
        exclude 'lib/arm64-v8a/libagora_video_process_extension.so'
        exclude 'lib/armeabi-v7a/libagora_video_process_extension.so'
    }


}

 

posted @ 2022-10-10 09:35  迷~途  阅读(2000)  评论(0编辑  收藏  举报