【问题标题】:After Update to Android Studio Arctic Fox 2020.3.1 Patch 4, Error: Could not resolve aapt2-7.0.4-7396180-windows.jar更新到 Android Studio 北极狐 2020.3.1 补丁 4 后,错误:无法解析 aapt2-7.0.4-7396180-windows.jar
【发布时间】:2022-01-21 08:47:01
【问题描述】:

更新到 Android Studio 北极狐 2020.3.1 补丁 4 后,

Error: Could not resolve aapt2-7.0.4-7396180-windows.jar (com.android.tools.build:aapt2:7.0.4-7396180): No cached version

Execution failed for task ':app:processDebugResources'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
   > Failed to transform viewbinding-7.0.4.aar (androidx.databinding:viewbinding:7.0.4) to match attributes {artifactType=android-compiled-dependencies-resources, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.libraryelements=aar, org.gradle.status=release, org.gradle.usage=java-runtime}.
.
.




Possible solution:
 - Disable offline mode and rerun the build

如果我禁用离线模式并再次同步项目。然后即使它没有构建项目,错误也会再次出现。

禁用离线模式后出错:

:app:writeDebugSigningConfigVersions

FAILURE: Build completed with 8 failures.

1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:dataBindingMergeDependencyArtifactsDebug'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
   > Could not resolve com.cuberto:liquid-swipe:1.0.0.
     Required by:
         project :app
      > Could not resolve com.cuberto:liquid-swipe:1.0.0.
         > Could not get resource 'https://dl.bintray.com/amulyakhare/maven/com/cuberto/liquid-swipe/1.0.0/liquid-swipe-1.0.0.pom'.
            > Could not HEAD 'https://dl.bintray.com/amulyakhare/maven/com/cuberto/liquid-swipe/1.0.0/liquid-swipe-1.0.0.pom'. Received status code 502 from server: Bad Gateway


.
many errors
.
.

Could not HEAD 'https://dl.bintray.com/amulyakhare/maven/com/cuberto/liquid-swipe/1.0.0/liquid-swipe-1.0.0.pom'. Received status code 502 from server: Bad Gateway
Disable Gradle 'offline mode' and sync project

甚至离线模式也被停用。

这有什么问题?

即使 Firebase 也无法通过 Android Studio 通过 Firebase 助手连接到互联网。

【问题讨论】:

    标签: firebase android-studio gradle internet-connection android-studio-arctic-fox


    【解决方案1】:

    我在我的项目中找到了罪魁祸首。 早些时候,我在 build.gradle(Exam String) 中的所有项目存储库中使用

    maven {
                url 'https://dl.bintray.com/amulyakhare/maven'
            }
    

    在早期的 Android Studio 版本中,它使用此存储库工作。

    从 build.gradle(Exam String) 中删除后。

    它开始工作正常。

    用于 Liquide swipe view pager。

    作为参考,我添加了存储库的屏幕截图。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-09-01
      • 2021-10-20
      • 1970-01-01
      • 2021-10-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多