Whenever trying to import my LIBGDX project to eclipse that I just now created I get this error from eclipse:
The error was really long so I made a pastebin
First bit of the error:
Synchronize Gradle projects with workspace failed due to an error in the referenced Gradle build.
Could not run build action using Gradle distribution 'https://services.gradle.org/distributions/gradle-4.6-bin.zip'.
A problem occurred configuring root project 'Endro'.
Could not resolve all artifacts for configuration ':classpath'.
Could not find aapt2-proto.jar (com.android.tools.build:aapt2-proto:0.3.1).
Searched in the following locations:
https://jcenter.bintray.com/com/android/tools/build/aapt2-proto/0.3.1/aapt2-proto-0.3.1.jar
org.gradle.tooling.BuildException: Could not run build action using Gradle distribution 'https://services.gradle.org/distributions/gradle-4.6-bin.zip'.
I'm new to this area of programing and I have no clue how to go about fixing this stuff. Any help is appreciated!
After more searching I found this error in my stack trace:
Could not find aapt2-proto.jar (com.android.tools.build:aapt2-proto:0.3.1).
and found a post with an answer that fixed the issue here:
Android CI build: Could not find aapt2-proto.jar
Related
A colleague of mine, when trying to sync gradle, is getting the error below:
Gradle sync failed: Could not find com.google.code.gson:gson:2.8.5.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/google/code/gson/gson/2.8.5/gson-2.8.5.pom
If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
Required by:
project :app > com.google.gms:google-services:4.3.3
project :app > com.google.firebase:firebase-crashlytics-gradle:2.3.0 > com.google.firebase:firebase-crashlytics-buildtools:2.3.0 (48 s 278 ms)
We are running the same project and with the same version of Android Studio, 4.2.1. I'm not getting any errors on my machine but she seems to have a problem. Her OS is windows 10 and I'm using a mac.
I should mention that I've seen this thread: https://github.com/google/gson/issues/1637 and followed the instructions here https://github.com/firebase/quickstart-android/blob/master/messaging/build.gradle. However, it doesn't seem to solve the problem. Actually if it did I would be concerned since without changing the gradle file works for me.
Does anyone know what might be the issue here? Thank you.
Also I should mention, when I tried to click on the link in the error message, it's a dead link.
I also have this problem after updating to 4.2.2. - AS 4.2.2 display a code error: Cannot resolve symbol 'Gson' but the code compiles correctly and runs.
I am using Android Studio version - 4.2.0.24. When I create a new project in it, it says Gradle Project sync failed.
It also shows an error:
A problem occurred configuring root project 'ChatTutorial'.
Could not resolve all artifacts for configuration ':classpath'.
Could not find org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.0-release-764.
Searched in the following locations:
-https://dl.google.com/dl/android/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin/1.5.0-release-764/kotlin-gradle-plugin-1.5.0-release-764.pom
-
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin/1.5.0-release-764/kotlin-gradle-plugin-1.5.0-release-764.pom
Required by:
project :
Possible solution:
Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html
Please help with this problem!!!
I am getting this error:
Could not find com.android.tools.build:gradle:3.0.1.
Searched in the following locations:
https://repo1.maven.org/maven2/com/android/tools/build/gradle/3.0.1/gradle-3.0.1.pom
https://repo1.maven.org/maven2/com/android/tools/build/gradle/3.0.1/gradle-3.0.1.jar
Required by:
project :hellocharts-libraryNew
I had the same issue while running my app for first time on newly installed android studio. I checked the
Tools Menu->SDK Manager->Android Studio ->Enable Embedded Maven repository checkBox.
Now it will resolved the error! Try it out!
After I updated my Android Studio to v2.3.3 and with it updated the required build tools and sdk version, have been getting the following error when I run ./gradlew assemble --stacktrace:
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring project ':OpenEdXMobile'.
Could not resolve all dependencies for configuration ':OpenEdXMobile:_prodDebugApkCopy'.
Could not find com.android.databinding:baseLibrary:2.3.3.
Searched in the following locations:
file:/usr/local/android-sdk/extras/android/m2repository/com/android/databinding/baseLibrary/2.3.3/baseLibrary-2.3.3.pom
file:/usr/local/android-sdk/extras/android/m2repository/com/android/databinding/baseLibrary/2.3.3/baseLibrary-2.3.3.jar
file:/home/travis/build/edx/edx-app-android/sdk-manager/com/android/databinding/baseLibrary/2.3.3/baseLibrary-2.3.3.jar
Required by:
project :OpenEdXMobile
Could not find com.android.databinding:baseLibrary:2.3.3.
Searched in the following locations:
file:/usr/local/android-sdk/extras/android/m2repository/com/android/databinding/baseLibrary/2.3.3/baseLibrary-2.3.3.pom
file:/usr/local/android-sdk/extras/android/m2repository/com/android/databinding/baseLibrary/2.3.3/baseLibrary-2.3.3.jar
file:/home/travis/build/edx/edx-app-android/sdk-manager/com/android/databinding/baseLibrary/2.3.3/baseLibrary-2.3.3.jar
Required by:
project :OpenEdXMobile > com.android.databinding:library:1.3.1
project :OpenEdXMobile > com.android.databinding:adapters:1.3.1
Full report from Travis-CI can be found here.
Here are some relevant details:
The gradle's distribution url: distributionUrl=https://services.gradle.org/distributions/gradle-3.3-all.zip
Gradle version in my module's build.gradle is v2.3.3.
My full build.gradle is kinda big so here's the link to it.
https://github.com/edx/edx-app-android/blob/f899aeca945dea9a010af727e2b3ff1176e86f4e/build.gradle
Do mention if I have missed any details :)
Sadly I wasn't able to find a solution that worked with the settings and versions mentioned in the question.
Quick Fix:
I just had to downgrade my gradle version to v2.3.0 and everything worked just fine.
Future plan:
Will update this answer once I find a solution, for now I've mentioned the quick fix, so that the community can benefit.
I am pretty new to Android Studio.
I have converted my Eclipse project to Android Studio successfully. everything worked fine, until today I updated my SDK and suddenly it started giving me error
> Error: A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugCompile'.
> Could not find com.android.support:multidex:1.0.1.
Searched in the following locations:
https://jcenter.bintray.com/com/android/support/multidex/1.0.1/multidex-1.0.1.pom
https://jcenter.bintray.com/com/android/support/multidex/1.0.1/multidex-1.0.1.jar
https://jitpack.io/com/android/support/multidex/1.0.1/multidex-1.0.1.pom
https://jitpack.io/com/android/support/multidex/1.0.1/multidex-1.0.1.jar
file:/C:/Users/as/AppData/Local/Android/sdk/extras/android/m2repository/com/android/support/multidex/1.0.1/multidex-1.0.1.pom
file:/C:/Users/as/AppData/Local/Android/sdk/extras/android/m2repository/com/android/support/multidex/1.0.1/multidex-1.0.1.jar
file:/C:/Users/as/AppData/Local/Android/sdk/extras/google/m2repository/com/android/support/multidex/1.0.1/multidex-1.0.1.pom
file:/C:/Users/as/AppData/Local/Android/sdk/extras/google/m2repository/com/android/support/multidex/1.0.1/multidex-1.0.1.jar
Required by:
ElalaSeller:app:unspecified
when I rebuild my project. it says
Error:(25, 13) Failed to resolve: com.android.support:multidex:1.0.1
Install Repository and sync project
Show in File
Show in Project Structure dialog
I checked Android support repository is installed.
Any help will be appreciated.
Thank you.
Update : I have checked this Question. most upvoted answer says install Android Support Repository. but in my case i already have installed it. you can see in screenshot i have uploaded. but still getting same error.
I have cleaned my project but still no change.