最近突然出现了一个问题,只需将依赖项包含在 pubspec.yaml 中的“位置”中,例如:
dependencies:
flutter:
sdk: flutter
location: ^1.2.0 <------------------------ culprit
firebase_auth: ^0.5.10
cloud_firestore: ^0.7.2
the app crashes immediately upon startup.
“位置”包本身在示例应用程序中单独运行时可以工作。
我当前没有导入,即使用位置包中包含的任何功能,但是当我删除该条目时,一切都很好。
不幸的是,从观看颤振日志中没有任何线索......
我面临着同样的问题。我所做的是插入行multiDexEnabled true
in my build.gradle
应用程序的。像这样:
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.example"
minSdkVersion 16
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true //Insert this line
}
尝试这个并运行命令flutter clean
, flutter build apk
and flutter run
。它必须解决你的问题。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)