So I've just started flutter with zero experience in mobile development . and i just created a new project and when i try build it with flutter build apk
it give's me this
Initializing gradle... 1.2s
Resolving dependencies...
* Error running Gradle:
ProcessException: Process "/media/OLB/Shared Media/Code Work Space/Visual Studio
Code/flutter_test1/android/gradlew" exited abnormally:
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'android'.
> Could not resolve all artifacts for configuration ':classpath'.
> Could not find builder.jar (com.android.tools.build:builder:3.2.1).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/com/android/tools/build/builder/3.2.1/builder-3.2.1.jar
* 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
Command: /media/OLB/Shared Media/Code Work Space/Visual Studio Code/flutter_test1/android/gradlew
app:properties
Please review your Gradle project setup in the android/ folder.
but when i copy the provided link
https://dl.google.com/dl/android/maven2/com/android/tools/build/builder/3.2.1/builder-3.2.1.jar
the file is their !
flutter doctor -v
[✓] Flutter (Channel stable, v1.5.4-hotfix.2, on Linux, locale en_US.UTF-8)
• Flutter version 1.5.4-hotfix.2 at /media/OBL/Shared Media/Code Work Space/Android/flutter
• Framework revision 7a4c33425d (4 weeks ago), 2019-04-29 11:05:24 -0700
• Engine revision 52c7a1e849
• Dart version 2.3.0 (build 2.3.0-dev.0.5 a1668566e5)
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
• Android SDK at /media/OBL/Shared Media/Code Work Space/Android/
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-28, build-tools 28.0.3
• ANDROID_HOME = /media/OBL/Shared Media/Code Work Space/Android/
• ANDROID_SDK_ROOT = /media/OBL/Shared Media/Code Work Space/Android/sdk/
• Java binary at: /usr/lib/jvm/java-8-openjdk-amd64/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_212-8u212-b03-0ubuntu1.18.04.1-b03)
• All Android licenses accepted.
[!] Android Studio (not installed)
• Android Studio not found; download from https://developer.android.com/studio/index.html
(or visit https://flutter.dev/setup/#android-setup for detailed instructions).
[✓] VS Code (version 1.34.0)
• VS Code at /usr/share/code
• Flutter extension version 3.0.2
[!] Connected device
! No devices available
! Doctor found issues in 2 categories.
I know their is no AS but i'v download all required stuff through the Android sdk directly , please help and thanx in advance .
I don't know much about it but a friend advised me to refresh the dependencies manually from /project/android/gradlew
and it worked !! like this
gradlew --refresh-dependencies
and it worked like a charm .
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments