Flutter issues with Android Firebase dependencies after Dependency Upgrades - android

i recently decided to upgrade my Flutter dependencies and pubspec.yaml all to newest versions according to pub.dev.
As i mainly tested with iOS i just realised pretty late, that my android build did not work any longer. The Error Message unfortunately was very low on direct information.
Gradle sync failed: Could not resolve all dependencies for configuration ':app:debugRuntimeClasspath'.
Problems reading data from Binary store in /private/var/folders/mw/s9362rr10qv43x_yh6qgm17w0000gn/T/gradle8805841490318013448.bin offset 286370 exists? true
Consult IDE log for more details (Help | Show Log) (25 s 303 ms)
I however decided to also provide my android studio an update to 4.1 and upgraded also the gradle dependencies.
dependencies {
classpath 'com.android.tools.build:gradle:4.1.2' // 3.5.1
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.3.4' // 4.3.3
}
The new attempt in android studio was providing a more relatable error in reference to Firebase
Gradle sync failed: Problems reading data from Binary store in /private/var/folders/mw/s9362rr10qv43x_yh6qgm17w0000gn/T/gradle1329056569736096566.bin offset 296201 exists? true
Corrupt serialized resolution result. Cannot find selected module (224) for constraint platform-runtime -> com.google.firebase:firebase-iid:21.0.1
Consult IDE log for more details (Help | Show Log) (10 m 18 s 294 ms)
My Flutter Doctor -v gives me confidence that everything is fine. (the Plugin Errors are an existing and known issue by the Flutter team with Android Studio 4.1 and not related)
[✓] Flutter (Channel stable, 1.22.6, on macOS 11.1 20C69 darwin-x64, locale de-DE)
• Flutter version 1.22.6 at /Users/kaibaier/development/flutter
• Framework revision 9b2d32b605 (5 days ago), 2021-01-22 14:36:39 -0800
• Engine revision 2f0af37152
• Dart version 2.10.5
• Pub download mirror https://pub.flutter-io.cn
• Flutter download mirror https://storage.flutter-io.cn
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
• Android SDK at /Users/kaibaier/Library/Android/sdk
• Platform android-30, build-tools 30.0.2
• ANDROID_HOME = /Users/kaibaier/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 12.4)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 12.4, Build version 12D4e
• CocoaPods version 1.9.3
[!] Android Studio (version 4.1)
• Android Studio at /Applications/Android Studio.app/Contents
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
[✓] VS Code (version 1.52.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.18.1
[✓] Connected device (1 available)
• Redmi Note 8 (mobile) • 18d3ce30 • android-arm64 • Android 10 (API 29)
For the sake of completion i also add the pubspec.yaml dependencieswith the previous used Version. You will notice the big Version jump in Firebase and Google Maps
dependencies:
flutter:
sdk: flutter
permission_handler: ^5.0.1+1
cupertino_icons: ^1.0.0 #^0.1.3
firebase_core: ^0.7.0 # ^0.5.0
firebase_auth: ^0.20.0+1 # ^0.18.0+1
firebase_storage: ^7.0.0 # ^4.0.0
cloud_firestore: ^0.16.0 #^0.14.0+2
provider: ^4.3.3 #^4.3.2
flutter_spinkit: ^4.1.2+1
flutter_vector_icons: ^0.2.1
intl: ^0.16.1
image_cropper: ^1.3.1
image_picker: ^0.6.7+21 #^0.6.7+11
searchable_dropdown: ^1.1.3
flutter_colorpicker: ^0.3.5 #^0.3.4
flutter_masked_text: ^0.8.0
shared_preferences: ^0.5.12+4 #^0.5.8
path_provider: ^1.6.27 #^1.6.11
location: ^3.2.4 #^3.0.2
table_calendar: ^2.3.3 #^2.2.3
url_launcher: ^5.7.10 #^5.6.0
google_maps_flutter: ^1.1.1 #^0.5.32
flutter_google_places: ^0.2.6
http: ^0.12.2 #^0.12.1
uuid: ^2.2.2 #^2.0.4
flutter_appcenter_bundle: ^3.2.0+2
preload_page_view: ^0.1.4
device_preview: ^0.5.5 #^0.4.8
wakelock: ^0.2.1+1 #^0.1.4+2
Any help / ideas or thoughts are very welcome :)
UPDATE:
After trying to run the Test again on my android phone i run into another related error.
Note: /Users/kaibaier/development/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_core-0.7.0/android/src/main/java/io/flutter/plugins/firebase/core/FlutterFirebaseCorePlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugResources'.
> Problems reading data from Binary store in /private/var/folders/mw/s9362rr10qv43x_yh6qgm17w0000gn/T/gradle3299415366350440389.bin offset 0 exists? true
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
UPDATE #2:
I also posted the issue over here in GitHub
https://github.com/FirebaseExtended/flutterfire/issues/4848
UPDATE #3:
Ok i was able to figure out that this file: /private/var/folders/mw/s9362rr10qv43x_yh6qgm17w0000gn/T/gradle3299415366350440389.bin
only exists during a build phase. After the error is thrown, it is directly gone again.
Update #4:
I rolled back to the old firebase dependencies for now. Just upgraded the firebase storage. All runs smoothly after some pod and Grasflecks clean.
My issue still exists, as I hope to get back to the new versions of firebase dependencies . But for now I can build again .

I had exactly the same issue after a firebase upgrade. Along with pubspec.yaml There is another (somewhat hidden) dependency you need to upgrade in app/build.gradle. I changed mine from 17.x to this and all builds and runs.
implementation 'com.google.firebase:firebase-analytics:18.0.2'

Related

Failed to apply plugin [id 'com.android.internal.version-check']

I am experiencing issues building an android application on flutter. The IOS app complies with no problems.
The issue seems to be along the lines of Gradle versioning for the flutter's plugin. However, the plugin itself shouldn't be a problem because (I) I can import it in an empty project without issues, (II) if I remove it, then something else fails along the similar lines.
FAILURE: Build failed with an exception.
* Where:
Build file '/Users/rsirokov/.pub-cache/hosted/pub.dartlang.org/devicelocale-0.3.1/android/build.gradle' line: 22
* What went wrong:
A problem occurred evaluating root project 'devicelocale'.
> Failed to apply plugin [id 'com.android.internal.version-check']
> Minimum supported Gradle version is 5.6.4. Current version is 5.6.2. If using the gradle wrapper, try editing the distributionUrl in /Users/rsirokov/.pub-cache/hosted/pub.dartlang.org/devicelocale-0.3.1/android/gradle/wrapper/gradle-wrapper.properties to gradle-5.6.4-all.zip
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 6s
Exception: The plugin devicelocale could not be built due to the issue above.
Tried:
flutter pub cache repair;
flutter pub upgrade;
Different versions of Gradle for the main project;
Switched to Flutter stable channel of 1.17.4;
The aforementioned log proposes a solution to switch Gradle version in the plugin's project directory. However, I don't think this would be a good idea since this directory, .pub-cache, is handled automatically by package manager and any manual changes could only make it worse.
[✓] Flutter (Channel stable, v1.17.4, on Mac OS X 10.15.4 19E287, locale en-NO)
• Flutter version 1.17.4 at /Users/rsirokov/Projects/Plugins/flutter
• Framework revision 1ad9baa8b9 (3 weeks ago), 2020-06-17 14:41:16 -0700
• Engine revision ee76268252
• Dart version 2.8.4
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
• Android SDK at /Users/rsirokov/Library/Android/sdk
• Platform android-30, build-tools 29.0.2
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 11.5)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 11.5, Build version 11E608c
• CocoaPods version 1.9.3
[✓] Android Studio (version 4.0)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 47.1.2
• Dart plugin version 193.7361
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
[✓] IntelliJ IDEA Ultimate Edition (version 2019.1.3)
• IntelliJ at /Applications/IntelliJ IDEA.app
• Flutter plugin version 39.0.3
• Dart plugin version 191.8423
[✓] Connected device (1 available)
• Android SDK built for x86 • emulator-5554 • android-x86 • Android 10 (API 29) (emulator)
• No issues found!
The issue was indeed in the package, but not in the one Flutter was complaining about, not in devicelocale. The problem was in flutter_statusbar_manager. It is not natively migrated to AndroidX (and seems it won't be ever; the package is abandoned, so get rid of it if you're still using it). I actually saw in the logs automatic attempt to migrate it but didn't pay attention to it. It didn't throw any errors, so thought it was migrated successfully.
For more, I have a conversation in the flutter's repo HERE. The problem is that: (I) automatic AndroidX migration of the package by flutter has failed without throwing an error (?), (II) flutter provided misleading error saying that the problem is in the different package.

Flutter run release fails: Minimum supported Gradle version is 5.6.4. Current version is 5.6.2

When trying to run my app with flutter run --release it throws an error:
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\Users\Chris\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\device_info-0.4.2+1\android\build.gradle' line: 22
* What went wrong:
A problem occurred evaluating root project 'device_info'.
> Failed to apply plugin [id 'com.android.internal.version-check']
> Minimum supported Gradle version is 5.6.4. Current version is 5.6.2. If using the gradle wrapper, try editing the distributionUrl in C:\Users\Chris\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\device_info-0.4.2+1\android\gradle\wrapper\gradle-wrapper.properties to gradle-5.6.4-all.zip
If I remove this device_info plugin, I get the same error just pointing to Gradle current version to be 4.10.2 due to another plugin flutter_plugin_android_lifecycle.
I don't understand. I tried updating my gradle-wrapper.properties to
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip
Previously it was set to 5.6.2, but this changed nothing. Also tried with 4.10.2, but it equally just get's ignored.
I updated the gradle version in my build.gradle to
buildscript {
ext.kotlin_version = '1.3.61'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.6.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
I created a new flutter project, just copied my pages and the pubspec... I tried in console, I tried with android studio. flutter clean, flutter build appBundle, deleting gradle versions, I tried everything I could think of or that I have read somewhere...
Nothing could help to get rid of this error, gradle insists that its current version is 5.6.2.
A new "virgin" flutter project however, I can run in release mode, without problems.
It appears these plugins will download their own gradle version. I could see it in Android Studio how an old gradle version is downloaded in contrary to the actual gradle version stated in my settings. Either way after 3 days with this, I'm running out of options and ideas.
Does anyone know how to solve this or to narrow the problem down? I also would be glad for an explanation on what's going on here.
My flutter doctor output:
[√] Flutter (Channel master, v1.17.1-pre.23, on Microsoft Windows [Version 10.0.18362.720], locale de-DE)
• Flutter version 1.17.1-pre.23 at C:\flutter
• Framework revision a2e6c30b44 (12 hours ago), 2020-04-03 20:26:01 -0700
• Engine revision 09bc1fc45e
• Dart version 2.8.0 (build 2.8.0-dev.19.0 e736495eb7)
[√] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
• Android SDK at C:\Users\Chris\AppData\Local\Android\sdk
• Platform android-R, build-tools 29.0.3
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)
• All Android licenses accepted.
[√] Android Studio (version 3.6)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin version 45.0.1
• Dart plugin version 192.7761
• Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)
[√] VS Code (version 1.43.2)
• VS Code at C:\Users\Chris\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.9.0
[√] Connected device (1 available)
• Lenovo A6020l36 • 32aac289 • android-arm64 • Android 5.1.1 (API 22)
• No issues found!
I found the problem.
It was a totally different plugin unique_identifier 0.0.3 that caused the error. After removing it, the app compiles dine again.
If you have a similar case: I had to test for every single package installed until I found it.

Image_picker dependency in Flutter doesn't let me compile my app with an Error message

I wanted to add the image_picker library for my App registration, where the user can pick an image when he clicks on a button. My dependecies:
dependencies:
flutter:
sdk: flutter
provider: ^3.2.0
firebase_auth: ^0.15.2
password_strength: ^0.1.2
keyboard_avoider: ^0.1.2
image_picker: ^0.6.2+3
Everything worked nice but after adding the image_picker in the pubspec.yaml i get the error:
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:preDebugBuild'.
Android dependency 'androidx.lifecycle:lifecycle-runtime' has different version for the compile (2.0.0-rc01) and runtime (2.0.0) classpath. You should manually set the same version via DependencyResolution
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 1s
The built failed likely due to AndroidX incompatibilities in a plugin. The tool is about to try using Jetfier to solve the incompatibility.
Building plugin firebase_auth...
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring root project 'firebase_auth'.
SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable.
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 0s
The plugin firebase_auth could not be built due to the issue above.
Exited (sigterm)
Edit:
Flutter doctor -v Output
PS D:\Flutter Projekte\helper> flutter doctor -v
[√] Flutter (Channel stable, v1.12.13+hotfix.5, on Microsoft Windows [Version 10.0.18362.535], locale de-DE)
• Flutter version 1.12.13+hotfix.5 at C:\src\flutter
• Framework revision 27321ebbad (6 days ago), 2019-12-10 18:15:01 -0800
• Engine revision 2994f7e1e6
• Dart version 2.7.0
[!] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
• Android SDK at C:\Users\Ozan\AppData\Local\Android\sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-29, build-tools 29.0.2
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)
! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses
[√] Android Studio (version 3.5)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin version 40.2.2
• Dart plugin version 191.8593
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)
[!] IntelliJ IDEA Community Edition (version 2019.2)
• IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2019.2.2
X Flutter plugin not installed; this adds Flutter specific functionality.
X Dart plugin not installed; this adds Dart specific functionality.
• For information about installing plugins, see
https://flutter.dev/intellij-setup/#installing-the-plugins
[√] VS Code (version 1.41.0)
• VS Code at C:\Users\Ozan\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.7.1
[√] Connected device (1 available)
• Android SDK built for x86 • emulator-5554 • android-x86 • Android 10 (API 29) (emulator)
! Doctor found issues in 2 categories.
flutter doctor -- android-licenses output
flutter doctor --android-licenses
Warning: Observed package id 'extras;intel;Hardware_Accelerated_Execution_Manager' in inconsistent location 'C:\Users\Ozan\AppData\Local\Android\Sdk\.temp\PackageOperation01' (Expected 'C:\Users\Ozan\AppData\Local\Android\Sdk\extras\intel\Hardware_Accelerated_Execution_Manager')
Warning: Observed package id 'extras;intel;Hardware_Accelerated_Execution_Manager' in inconsistent location 'C:\Users\Ozan\AppData\Local\Android\Sdk\.temp\PackageOperation01' (Expected 'C:\Users\Ozan\AppData\Local\Android\Sdk\extras\intel\Hardware_Accelerated_Execution_Manager')
Warning: File C:\Users\Ozan\.android\repositories.cfg could not be loaded.
All SDK package licenses accepted.======] 100% Computing updates...
local.properties file
sdk.dir=C:\\Users\\Ozan\\AppData\\Local\\Android\\sdk
flutter.sdk=C:\\src\\flutter
flutter.buildMode=debug
flutter.versionName=1.0.0
flutter.versionCode=1
Update flutter to version 1.12 which uses AndroidX by default:
https://flutter.dev/docs/development/tools/sdk/release-notes/release-notes-1.12.13#android
You can upgrade by executing the following command:
flutter upgrade
After doing flutter upgrade, then add the sdk path to android_home:
export ANDROID_HOME="YOUR_SDK_PATH"
Also upgrade both the android gradle in the build.gradle and the kotlin version:
dependencies {
classpath 'com.android.tools.build:gradle:3.3.1'
}

Build error with map_view, flutter & gradle

I get a build error using flutter version 1.2.2 and map_view version 0.0.14.
I tried to use this code in build.gradle
classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.1.2-4'
I followed all the steps here https://pub.dartlang.org/packages/map_view#-readme-tab-
I have an api-key but get the following build error
Error running Gradle: ProcessException: Process “C:UsersAlmoit PCDesktopMyAppMapflutter_app2androidgradlew.bat” exited
abnormally:
Configure project :map_view
WARNING: The specified Android SDK Build Tools version (27.0.3) is ignored, as it is below the minimum supported version (28.0.3) for Android Gradle Plugin 3.2.1.
Android SDK Build Tools 28.0.3 will be used.
To suppress this warning, remove “buildToolsVersion ‘27.0.3’” from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.
FAILURE: Build failed with an exception.
What went wrong: The Android Gradle plugin supports only Kotlin Gradle plugin version 1.2.51 and higher. Project ‘android’ is using
version 1.1.2-4.
Try: Run with –stacktrace option to get the stack trace. Run with –info or –debug option to get more log output. Run with –scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 10s Command: C:UsersAlmoit
PCDesktopMyAppMapflutter_app2androidgradlew.bat app:properties
With flutter doctor, everything seems fine.
flutter doctor -v
[√] Flutter (Channel stable, v1.2.1, on Microsoft Windows [Version 10.0.17763.437], locale en-AI)
• Flutter version 1.2.1 at C:flutter
• Framework revision 8661d8aecd (10 weeks ago), 2019-02-14 19:19:53 -0800
• Engine revision 3757390fa4
• Dart version 2.1.2 (build 2.1.2-dev.0.0 0a7dcf17eb)
[√] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
• Android SDK at C:Sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-28, build-tools 28.0.3
• ANDROID_HOME = C:Sdk
• Java binary at: C:Program FilesAndroidAndroid Studiojrebinjava
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)
• All Android licenses accepted.
[√] Android Studio (version 3.3)
• Android Studio at C:Program FilesAndroidAndroid Studio
• Flutter plugin version 33.4.1
• Dart plugin version 182.5215
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)
[√] Connected device (1 available)
• SPH L520 • 2d81b4cf • android-arm • Android 4.4.2 (API 19)
• No issues found!
I searched it everywhere but can't find the answer. Please help me regarding this.
In your /android/build.gradle try increasing the version of the kotlin gradle plugin like so:
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.0'
I read somewhere that flutter now only support version 1.3+.
I just tried it and now I can at least build my app for android.
PS: Since you are using an older version of flutter maybe the kotlin plugin will work with an older version as mentioned in the error messages:
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.51'

Flutter Unable to read manifest info from app.apk

i have upgraded the flutter four days earlier and since then i am facing issue, the workspace has no errors as other collaborator's code is running fine.
Error is:
Error running com.xxxxxxxx.signals. Default activity not found
Unable to read manifest info from F:\Projects\xxxxxxxx-mobile\xxxxxxxx-mobile\build\app\outputs\apk\app.apk.
No application found for TargetPlatform.android_x86.
Is your project missing an android\app\src\main\AndroidManifest.xml?
Consider running "flutter create ." to create one.
i ran following commands in Visual Studio Code Terminal:
flutter clean
flutter run
the solutions i applied which unfortunately didnt work are:
Then i changed branch of the repository i have working in
Switched to dev, beta branches of flutter
Re installed emulator
attached real device
My flutter doctor is as follows:
[√] Flutter (Channel dev, v1.3.13, on Microsoft Windows [Version 10.0.17134.648], locale en-US)
• Flutter version 1.3.13 at C:\src\flutter
• Framework revision 59ce7d6bff (2 days ago), 2019-03-18 11:20:10 -0700
• Engine revision e75f6de01f
• Dart version 2.2.1 (build 2.2.1-dev.1.1 None)
[√] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
• Android SDK at C:\Users\jabir\AppData\Local\Android\sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-28, build-tools 28.0.3
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)
• All Android licenses accepted.
[√] Android Studio (version 3.3)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin version 32.0.1
• Dart plugin version 182.5124
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)
[√] VS Code (version 1.32.3)
• VS Code at C:\Users\jabir\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 2.24.0
[√] Connected device (1 available)
• Android SDK built for x86 • emulator-5554 • android-x86 • Android 8.1.0 (API 27) (emulator)
• No issues found!
I encountered a similar problem and o fixed it by deleting the app.apk in the build/app/outputs/apk directory and it worked.
I resolved this by these step.
upgraded flutter
created new other project using flutter create foo
compared foo project with my project
removed kotlin setting from my project
changed androidx to android.support packages in gradle dependencies
copied and modified *.iml files for my project (although these files are ignored)
flutter clean
flutter run
I used VS editor.
My Project dependencies. pubspec
dependencies:
flutter:
sdk: flutter
flutter_localizations:
sdk: flutter
intl: ^0.15.7
http: ^0.12.0+1
firebase_core: ^0.3.4
firebase_analytics: ^2.1.1
firebase_auth: ^0.8.4+2
firebase_remote_config: ^0.1.0+2
firebase_database: ^2.0.2
firebase_storage: ^2.1.0+1
video_player: ^0.10.0+4
chewie: ^0.9.7
in my case it happened cause I defined an intent filter for notification inside main application tag in manifest and declared an application service that receives it in manifest after main application tag and that is wrong
The right to change main application tage name to the new application tag not to put the both
This Error is because the flutter does not find the SDK path. You just need to set the SDK Path by following the command using the terminal.
flutter config --android-sdk $SDK_PATH

Categories

Resources