[英]build Apk on physical device crash android studio flutter
当我在模拟器(android 11 API 30)上构建我的应用程序时,它工作正常,但是当我尝试在我的旧物理设备(Android Kitkat API 19)上构建它时它崩溃了。
编辑:是的开发人员选项已启用
但是当我运行终端flutter build apk --split-per-abi
或flutter run --release
它工作我可以在物理设备上运行它
我知道我需要 armeabi v7 才能让它在我的手机上工作,但是每次我想构建时都必须使用控制台很烦人
除非我做错了,否则我如何在 IDE 上构建它
编辑 2:这是我的 appbuild
minSdkVersion 19
buildTypes {
customDebugType {
debuggable true
}
release {
minifyEnabled true
signingConfig signingConfigs.debug
}
debug {
minifyEnabled true
applicationIdSuffix ".debug"
debuggable true
}
staging {
initWith debug
applicationIdSuffix ".debugStaging"
}
您可以添加自定义运行配置来执行任何 shell 脚本。
为此,请在 Android Studio、go 中运行 -> 编辑配置...
在配置 window 中,单击 + 图标和 select Shell 脚本
Once it's added, you can give the script a name and for the "Script Path" select the flutter executable (This can be found inside the flutter SDK folder specifically inside a bin folder). 对于“脚本选项”,您可以添加您希望 Flutter 执行的选项,例如build apk --split-per-abi
或run --release
此时,您可以单击应用并确定。 您现在应该在下拉菜单中看到这个自定义运行器,您可以在其中运行不同的任务。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.