I'm trying to update gradle from 1.3.1 to 3.5, as some of my dependencies requires version 3.3 or above.
I've seen similar questions, but none of them help.
build.gradle:
buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:3.5' } }
gradle-wrapper.properties:
distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists distributionUrl=https\://services.gradle.org/distributions/gradle-3.5-all.zip
Still i'm getting this when trying to do anything (build, clean etc):
Building and installing the app on the device (cd android && ./gradlew installDebug... FAILURE: Build failed with an exception. * What went wrong: A problem occurred configuring root project 'chat'. > Could not resolve all dependencies for configuration ':classpath'. > Could not find com.android.tools.build:gradle:3.5. Searched in the following locations: https://jcenter.bintray.com/com/android/tools/build/gradle/3.5/gradle-3.5.pom https://jcenter.bintray.com/com/android/tools/build/gradle/3.5/gradle-3.5.jar Required by: project : * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. BUILD FAILED
This kind of issue usually appears either due to a gradle misconfig or in your case, it looks more of an internet issue. Try running flutter clean in your project source and then using flutter build appbundle and check whether you're able to run the command without any errors.
It is located in the root project directory and its main function is to define the build configurations that will be applied to all the modules in the project.
The Android Gradle plugin (AGP) is the official build system for Android applications. It includes support for compiling many different types of sources and linking them together into an application that you can run on a physical Android device or an emulator.
buildscript { repositories { jcenter() google() //HAVE YOU MISS IT? } dependencies { classpath 'com.android.tools.build:gradle:3.5.0' } } allprojects { repositories { jcenter() google() //HAVE YOU MISS IT? } }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With