Manuel Lucas
Manuel Lucas

Reputation: 532

Problem with sync of gradle in Android Studio

I was developing a Space Shooter Game, and until yesterday wverything was perfectly, but today, when I try to run my app, I get the followin error

Execution failed for task ':android:mergeDebugResources'.
> Could not resolve all files for configuration ':android:_internal_aapt2_binary'.
   > Could not resolve com.android.tools.build:aapt2:4.1.0-6503028.
     Required by:
         project :android
      > No cached version of com.android.tools.build:aapt2:4.1.0-6503028 available for offline mode.
      > No cached version of com.android.tools.build:aapt2:4.1.0-6503028 available for offline mode.
      > No cached version of com.android.tools.build:aapt2:4.1.0-6503028 available for offline mode.
      > No cached version of com.android.tools.build:aapt2:4.1.0-6503028 available for offline mode.
      > No cached version of com.android.tools.build:aapt2:4.1.0-6503028 available for offline mode.

Possible solution:
 - Disable offline mode and rerun the build


So as sugest Android Studio, I Disable the offline mode, and then run, getting the following error:

``
Could not GET 'https://dl.google.com/dl/android/maven2/com/android/tools/build/aapt2/4.1.0-6503028/aapt2-4.1.0-6503028.pom'. Received status code 405 from server: Method Not Allowed
Disable Gradle 'offline mode' and sync project


And guess what?, when I disable the Gradle offline mode, I return to the firts error again, so I quite lose on this.

If you know some way to solve, I bless you.

Thanks for advance!

Upvotes: 1

Views: 1403

Answers (1)

Aaliya Saiyed
Aaliya Saiyed

Reputation: 26

Select clean project from build menu and try to run your project

Upvotes: 1

Related Questions