I have already update the latest Android Gradle version but still showing the error when generating the signed bundle.
generating signed bundle requires you to update the android gradle plugin to version 3.2.0 or higher
Below i have share the version details.
buildscript {
ext.kotlin_version = '1.6.21'
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.0.4'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.3.10'
}
}
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-all.zip
Android studio version
Android Studio Bumblebee | 2021.1.1 Patch 3
Build #AI-211.7628.21.2111.8309675, built on March 16, 2022
Runtime version: 11.0.11+0-b60-7772763 aarch64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 11.4
GC: G1 Young Generation, G1 Old Generation
Memory: 1280M
Cores: 8
Registry: external.system.auto.import.disabled=true
Non-Bundled Plugins: Dart (211.7817), org.jetbrains.kotlin (211-1.6.21-release-334-AS7442.40), io.flutter (66.0.1)
Flutter version
Flutter 2.10.0 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 5f105a6ca7 (3 months ago) • 2022-02-01 14:15:42 -0800
Engine • revision 776efd2034
Tools • Dart 2.16.0 • DevTools 2.9.2
Flutter editor in Android Studio doesn't have proper lint check for Android project code. You might need to access the gradle settings using Android editor for the changes to be indexed and rebuilt. To access the Android project with proper lint check, it's better to open it via Tools > Flutter > Open Android module in Android Studio
Related
I'm getting error after update the Android version and flutter version. Right now I want add the "file_picker: ^5.2.5", and "cached_network_image: ^3.2.3" plugin so getting "General error during conversion: Unsupported class file major version 63" error.
I have checked many solution but nothing one to help me.
Please help me for fix this issue.
Flutter version:-
Flutter 3.3.3 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 18a827f393 (4 months ago) • 2022-09-28 10:03:14 -0700
Engine • revision 5c984c26eb
Tools • Dart 2.18.2 • DevTools 2.15.0
Android Studio version:-
Android Studio Electric Eel | 2022.1.1
Build #AI-221.6008.13.2211.9477386, built on January 11, 2023
Runtime version: 11.0.15+0-b2043.56-8887301 aarch64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 13.1
GC: G1 Young Generation, G1 Old Generation
Memory: 1280M
Cores: 8
Registry:
external.system.auto.import.disabled=true
ide.text.editor.with.preview.show.floating.toolbar=false
Non-Bundled Plugins:
com.github.dhaval2404.material_icon_generator (1.3)
Dart (221.6091)
pl.pszklarska.pubversionchecker (1.3.5)
io.flutter (71.2.4)
Go to this location(C:\Program Files\Android\Android Studio\jbr)
Copy all the files from here
paste all the copied files in (jre) folder
Open your cmd and run flutter doctor again.
I finally found the solution of this problem :-
soo just go at your project folder and then
open android/gradle/wrapper/gradle-wrapper-properties then change this :-
distributionUrl=https://services.gradle.org/distributions/gradle-7.4-all.zip
To This :-
distributionUrl=https://services.gradle.org/distributions/gradle-7.6-all.zip
and then your issue get solved 😁
Check flutter doctor status. The issue likely is in the java bundle.
tl;dr Update Android Studio and Gradle Versions
I encountered this error while trying to run Flutter integration tests on Firebase Test Lab. I was able to solve this by updating a few things in Android Studio.
Update the Project's JDK
Open the Android Studio Project Structure page (File -> Project Structure)
Click the "SDKs" tab
Download the newest JDK version and add it to the list
Click the "Project" tab
Update the SDK field to the new JDK
Update com.android.tools.build:gradle
In android/build.gradle, update the com.android.tools.build:gradle value to the latest version found here.
dependencies {
classpath 'com.android.tools.build:gradle:7.4.1'
...
}
Update the gradle distributionUrl
In android/gradle/wrapper/gradle-wrapper.properties, update the distributionUrl property to use the latest Gradle version.
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-all.zip
I recently downloaded android studio version to Android Studio Dolphin | 2021.3.1 Patch 1 and downloaded latest flutter and dart. At time of creating new flutter project it's giving build error.
flutter --version
Flutter 3.3.7 • channel stable • https://github.com/flutter/flutter.git
Framework • revision e99c9c7cd9 (2 days ago) • 2022-11-01 16:59:00 -0700
Engine • revision 857bd6b74c
Tools • Dart 2.18.4 • DevTools 2.15.0
You have to specify a repository from which gradle can download the dependency.
Please, check your build.gradle file (application level) that contains google and mavenCentral repositories
Build script section:
...
buildscript {
repositories {
google()
mavenCentral()
}
...
}
All projects section:
...
allprojects {
repositories {
google()
mavenCentral()
}
...
}
I have just installed Android Studio. And I have this problem. Here is the screenshot.
then I clicked the link and downloaded the zip file manually. Then I installed it. Now, when I type Gradle -v on Command-Line, it shows that everything is fine with Gradle. Here it is.
Android Gradle Plugin version is 3.6.3 Here is Android Gradle Plugin Version
This is the information about the Android Studio that I am using: Android Studio 4.1.1
Build #AI-201.8743.12.41.6953283, built on November 4, 2020
Runtime version: 1.8.0_242-release-1644-b01 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0
GC: ParNew, ConcurrentMarkSweep
Memory: 1237M
Cores: 8
Registry: ide.new.welcome.screen.force=true,
external.system.auto.import.disabled=true
Probably a Compatibility issue because you are using a old plugin version with latest Gradle version .
Change plugin version in Project level gradle .
classpath 'com.android.tools.build:gradle:4.1.0'
Then try to build your project . Check the Compatible version in the documentation
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.
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'