Open eramitsharma957 opened 2 years ago
Hi @eramitsharma957, Thanks for filing the issue. Please share complete output of flutter run -v
.
Thanks.
[ +159 ms] Multiple devices found: [ +6 ms] ro.hardware = ranchu [ +18 ms] sdk gphone arm64 (mobile) • emulator-5554 • android-arm64 • Android 11 (API 30) (emulator) [ +2 ms] iPhone 13 (mobile) • EC84C795-7915-419B-B38C-7A57B221FB5E • ios • com.apple.CoreSimulator.SimRuntime.iOS-15-0 (simulator) [ +3 ms] [1]: sdk gphone arm64 (emulator-5554) [ ] [2]: iPhone 13 (EC84C795-7915-419B-B38C-7A57B221FB5E) [ +2 ms] Please choose one (To quit, press "q/Q") [ ] :
@eramitsharma957 The logs aren't complete you need to choose the android device to start the build execution.
I want to generate signed apk but not generate or flutter build apk given error but app run and build apk from android studio option generated successfully. ERROR GIVEN
Failed to apply plugin [id 'com.android.internal.version-check'] Minimum supported Gradle version is 6.5. Current version is 6.1.1. If using the gradle wrapper, try editing the distributionUrl in /Users/sudhirarora/AllenCareGit/android/gradle/wrapper/gradle-wrapper.properties to gradle-6.5-all.zip
Edit the distributionUrl to use gradle version 6.5 in gradle-wrapper.properties
In the future please avoid pasting long logs directly please share them in a text file.
Failed to apply plugin [id 'com.android.internal.version-check'] Minimum supported Gradle version is 6.5. Current version is 6.1.1. If using the gradle wrapper, try editing the distributionUrl in /Users/sudhirarora/AllenCareGit/android/gradle/wrapper/gradle-wrapper.properties to gradle-6.5-all.zip
Edit the distributionUrl to use gradle version 6.5 in
gradle-wrapper.properties
i am already use --- distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip AND
classpath 'com.android.tools.build:gradle:4.1.0' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath 'com.google.gms:google-services:4.3.10'
@eramitsharma957, Please share your pubspec.yaml
file.
@eramitsharma957, Please share the output of flutter build apk -v
in a text file.
@eramitsharma957, Please share the output of
flutter build apk -v
in a text file. text.txt
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0. [ +7 ms] Use '--warning-mode all' to show the individual deprecation warnings.
Please Run
flutter clean
flutter pub get
cd android
./gradlew clean
./gradlew build --warning-mode all
and share the output in a textfile.
./gradlew build --warning-mode all
sudhirarora@Sudhirs-MacBook-Air android % ./gradlew clean
FAILURE: Build failed with an exception.
Where: Script '/Users/sudhirarora/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 1
What went wrong: Could not compile script '/Users/sudhirarora/flutter/packages/flutter_tools/gradle/flutter.gradle'.
startup failed: script '/Users/sudhirarora/flutter/packages/flutter_tools/gradle/flutter.gradle': 1: expecting EOF, found ':' @ line 1, column 32. Script started on Thu Jan 20 14:38:43 2022 ^
1 error
FAILURE: Build failed with an exception.
Where: Build file '/Users/sudhirarora/AllenCareFlutterApp/educareadmin/android/build.gradle' line: 27
What went wrong: A problem occurred evaluating root project 'android'.
A problem occurred configuring project ':app'. Could not open proj generic class cache for build file '/Users/sudhirarora/AllenCareFlutterApp/educareadmin/android/app/build.gradle' (/Users/sudhirarora/.gradle/caches/6.7/scripts/8kecvajzybjb8a62lr0tqp4bv). BUG! exception in phase 'semantic analysis' in source unit 'BuildScript' Unsupported class file major version 61
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
Thanks for the info labeling this issue for further investigation.
Thanks for the info labeling this issue for further investigation.
above issue is resolved now coming last issue ---What is the issue when build signed apk???
Task :app:compileFlutterBuildRelease FAILED
FAILURE: Build failed with an exception.
Where: Script '/Users/sudhirarora/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 1070
What went wrong: Execution failed for task ':app:compileFlutterBuildRelease'.
Process 'command '/Users/sudhirarora/flutter/bin/flutter'' finished with non-zero exit value 1
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
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0. Use '--warning-mode all' to show the individual deprecation warnings. See https://docs.gradle.org/6.5/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 36s 1 actionable task: 1 executed
above issue is resolved now coming last issue ---What is the issue when build signed apk???
You should get more details about the issue if you run
./gradlew build --warning-mode all
But this seems to be failing in your case.
Now error when build signed apk
Caused by: org.gradle.process.internal.ExecException: Process 'command '/Users/sudhirarora/flutter/bin/flutter'' finished with non-zero exit value 1
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0. [ +7 ms] Use '--warning-mode all' to show the individual deprecation warnings.
Please Run
flutter clean flutter pub get cd android ./gradlew clean ./gradlew build --warning-mode all
and share the output in a textfile.
Thank You So Much! It fixed my issue. I just updated versions in plugins in my settings.gradle file. Then completed what you have said.
FLUTTER DOCTOR
flutter doctor -v