Unable to build - gradle version
nebis-software opened this issue · 4 comments
Hi,
I am getting an error while building a simple example. Do you know how I can solve this? thanks!
How to replicate:
flutter upgrade
Flutter is already up to date on channel stable
Flutter 3.10.5 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 796c8ef792 (3 weeks ago) • 2023-06-13 15:51:02 -0700
Engine • revision 45f6e00911
Tools • Dart 3.0.5 • DevTools 2.23.1
flutter create test_three_dart
I add three_dart: ^0.0.16 to pubspec.yaml , then
dart pub get
flutter run -v
.........
[ +103 ms] FAILURE: Build failed with an exception.
[ +3 ms] * What went wrong:
[ ] The Android Gradle plugin supports only Kotlin Gradle plugin version 1.5.20 and higher.
[ ] The following dependencies do not satisfy the required version:
[ ] project ':flutter_gl' -> org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.61
[ ] * Try:
[ ] > Run with --debug option to get more log output.
[ ] > Run with --scan to get full insights.
[ ] * Exception is:
[ ] com.android.builder.errors.EvalIssueException: The Android Gradle plugin supports only Kotlin Gradle plugin version 1.5.20 and higher.
[ ] The following dependencies do not satisfy the required version:
[ ] project ':flutter_gl' -> org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.61
Hi @nebis-software,
This is a new error due to an update in the flutter sdk. Please go to your
pub.dev/flutter_gl-0.0.21/android/build.gradle
change line 5 from
ext.kotlin_version = '1.3.61'
to
ext.kotlin_version = '1.5.20'
hope this helps.
Hi
thanks, we are improving, but now I get a different error:
[ +98 ms] Resource missing. [HTTP GET: https://dl.google.com/dl/android/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.5.30/kotlin-stdlib-jdk8-1.5.30.pom]
[ ] Downloading https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.5.30/kotlin-stdlib-jdk8-1.5.30.pom to
/home/user/.gradle/.tmp/gradle_download8040791618823712939bin
[ +99 ms] work action null (Thread[Execution worker Thread 3,5,main]) completed. Took 6.358 secs.
[ ] > Task :app:checkDebugAarMetadata FAILED
[ ] :app:checkDebugAarMetadata (Thread[Execution worker Thread 2,5,main]) completed. Took 4.588 secs.
[ +97 ms] FAILURE: Build failed with an exception.
[ +7 ms] * What went wrong:
[ ] Execution failed for task ':app:checkDebugAarMetadata'.
[ ] > Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
[ ] > Could not find :threeegl:.
[ ] Searched in the following locations:
[ ] - file:/home/user/project/test_three_dart/android/app/libs/aars/threeegl.aar
[ ] Required by:
[ ] project :app > project :flutter_gl
[ ] * Try:
[ ] > Run with --debug option to get more log output.
[ ] > Run with --scan to get full insights.
[ ] * Exception is:
[ ] org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:checkDebugAarMetadata'.
[ ] at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:38)
[ ] at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:77)
Hi @nebis-software,
This error looks like you are missing the threeegl.aar file.
Navigate to
project_name
/android/app/libs/aars
and make sure the threeegle.aar file is in there. If it is missing pull it from
three_dart/example/android/app/libs/aars
Thanks for the hint, now it works 😄
I have still issues with the provided example but that's for another day..