Could not resolve com.android.support:support-v4:24.1.1+.

D:\app\platforms\android\gradlew: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.

* What went wrong:
Could not resolve all files for configuration ':app:releaseCompileClasspath'.
> Could not resolve com.android.support:support-v4:24.1.1+.
  Required by:
      project :app
   > Failed to list versions for com.android.support:support-v4.
      > Unable to load Maven meta-data from https://maven.google.com/com/android/support/support-v4/maven-metadata.xml.
         > Could not HEAD 'https://maven.google.com/com/android/support/support-v4/maven-metadata.xml'.
            > Connect to maven.google.com:443 [maven.google.com/216.58.200.238] failed: Connection timed out: connect
> Could not resolve com.android.support:support-v4:26.+.
  Required by:
      project :app
   > Failed to list versions for com.android.support:support-v4.
      > Unable to load Maven meta-data from https://maven.google.com/com/android/support/support-v4/maven-metadata.xml.
         > Could not HEAD 'https://maven.google.com/com/android/support/support-v4/maven-metadata.xml'.
            > Connect to maven.google.com:443 [maven.google.com/172.217.160.78] failed: Connection timed out: connect

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

控制台报错图如下:

 

解决办法:

其实这个你就可以理解问版发错误,对不上,修改一下地方:

D:\app\platforms\android\project.properties

将cordova.system.library.x=com.android.support:support-vx:xx.+对应的版本都注解掉,这样就不会报错了,控制台报什么保本,你这个里就注解那个版本,加#号注解就行。

上一个我修改好的图给大家看看,这个就是之前报错,后面注解掉了就不报错的图

正在加载评论...