简体   繁体   中英

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!

从构建菜单中选择干净的项目并尝试运行您的项目

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM