Android FAILURE: Build failed with an exception.

时间:2024-03-21 10:05:23

build 报错如下:

Android FAILURE: Build failed with an exception.

 

FAILURE: Build failed with an exception.

* What went wrong:
Could not resolve all files for configuration ':commonlibrary:debugCompileClasspath'.
> Could not resolve com.umeng.umsdk:analytics:8.0.2.
  Required by:
      project :commonlibrary
   > Could not resolve com.umeng.umsdk:analytics:8.0.2.
      > Could not get resource 'http://repo1.maven.org/maven2/com/umeng/umsdk/analytics/8.0.2/analytics-8.0.2.pom'.
         > Could not HEAD 'http://repo1.maven.org/maven2/com/umeng/umsdk/analytics/8.0.2/analytics-8.0.2.pom'. Received status code 501 from server: HTTPS Required

解决方法:把系统build.gradle文件内连接全部改为 https (就算只改友盟自己的也会报错) 如下图:

Android FAILURE: Build failed with an exception.