打包后的Android apk安装在真机上,资源图片不显示,安装在模拟器上打开就崩溃;未打包之前安装在真机跟模拟器都能正常打开,资源图片也能正常显示,请问下老师这是什么原因啊?
build.gradle中下面两个配置如下:
ndk{
// abiFilters “armeabi-v7a”,“arm64-v8a”,“x86_64”,"x86"
abiFilters “armeabi-v7a” //release 时只打"armeabi-v7包
}
packagingOptions{
pickFirst 'lib/x86_64/libflutter.so’
pickFirst 'lib/x86/libflutter.so’
pickFirst 'lib/arm64-v8a/libflutter.so’
pickFirst 'lib/x86_64/libapp.so’
pickFirst 'lib/armeabi-v7a/libapp.so’
pickFirst ‘lib/arm64-v8a/libapp.so’
}
解锁Flutter开发新姿势,,系统掌握Flutter开发核心技术。
了解课程