Reputation: 231
I am using below packages in my project, after running console threw me error saying its incompatible with AndroidX, So i followed the steps given in https://flutter.dev/docs/development/packages-and-plugins/androidx-compatibility and said flutter run ...console just stucks
Added in 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
}
Added in 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
flutter doctor -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!
Upvotes: 0
Views: 5492
Reputation: 13870
Run the app by running flutter run -v
in console.
it prints the reason why it can't launch the app.
Upvotes: 1
Reputation: 681
This process helped me to solve the issue(Using cmd)-
1.Connect to the device with ADB
2.Use "adb uninstall com.example.application.name"
Upvotes: 2
Reputation: 1
Try changing your applicationId inside "android/app/build.gradle", that worked for me..
Upvotes: 0