1

更新至 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 Assistant 连接到互联网。

4

1 回答 1

0

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

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

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

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

它开始工作正常。

它用于液体滑动视图寻呼机。

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

于 2021-12-19T11:48:54.867 回答