我在项目中使用以下软件包,运行控制台后向我抛出错误,指出它与AndroidX不兼容,因此我按照https://flutter.dev/docs/development/packages-and-plugins/androidx-compatibility中给出的步骤进行操作,并说Flutter run ...控制台卡住了
已添加到project / app / gradle.build
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.example.driver_app_flutter"
minSdkVersion 21
targetSdkVersion 28
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
添加到gradle.properties中:
org.gradle.jvmargs=-Xmx1536M
android.useAndroidX=true
android.enableJetifier=true
pubspec.yaml
cloud_firestore: ^0.9.7
firebase_auth: ^0.8.1+4
google_sign_in: ^4.0.1+1
颤振医生-v
~/flutter_projects/driver_app_flutter$ flutter doctor -v
[✓] Flutter (Channel beta, v1.7.8+hotfix.3, on Linux, locale en_IN)
• Flutter version 1.7.8+hotfix.3 at /data/EMBITEL/emb-rajekri/Downloads/flutter
• Framework revision b712a172f9 (3 days ago), 2019-07-09 13:14:38 -0700
• Engine revision 54ad777fd2
• Dart version 2.4.0
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.0)
• Android SDK at /data/EMBITEL/emb-rajekri/Android/Sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-29, build-tools 29.0.0
• Java binary at: /opt/android-studio/jre/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b16-5323222)
• All Android licenses accepted.
[✓] Android Studio (version 3.4)
• Android Studio at /opt/android-studio
• Flutter plugin version 37.0.1
• Dart plugin version 183.6270
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b16-5323222)
[✓] VS Code (version 1.35.1)
• VS Code at /usr/share/code
• Flutter extension version 3.2.0
[✓] Connected device (1 available)
• Android SDK built for x86 • emulator-5554 • android-x86 • Android 9 (API 28) (emulator)
• No issues found!
答案 0 :(得分:0)
尝试在“android/app/build.gradle”中更改您的 applicationId,这对我有用..