React-native 集成react-native-yunpeng-alipay 爬坑
问题1:按照官网添加link后运行报错
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':react-native-yunpeng-alipay'.
> Could not resolve all artifacts for configuration ':react-native-yunpeng-alipay:classpath'.
> Could not resolve com.android.tools.build:gradle:1.3.1.
Required by:
project :react-native-yunpeng-alipay
> Could not resolve com.android.tools.build:gradle:1.3.1.
> Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/1.3.1/gradle-1.3.1.pom'.
> Could not GET 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/1.3.1/gradle-1.3.1.pom'.
> sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
> Could not resolve com.android.tools.build:gradle:1.3.1.
> Could not get resource 'https://jcenter.bintray.com/com/android/tools/build/gradle/1.3.1/gradle-1.3.1.pom'.
> Could not GET 'https://jcenter.bintray.com/com/android/tools/build/gradle/1.3.1/gradle-1.3.1.pom'.
> sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
* 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.解决办法
修改react-native-yunpeng-alipay下的build.gradle文件
buildscript {
repositories {
mavenLocal()
google()
jcenter()
}
dependencies {
// classpath 'com.android.tools.build:gradle:1.3.1'
classpath 'com.android.tools.build:gradle:3.2.1'
}
}修改com.android.tools.build:gradle:1.3.1和项目android的版本保持一致
添加 mavenLocal() google()
重新运行 ,问题解决
相关推荐
chenkai00 2020-07-26
CaptainCTR 2020-05-04
StephenWong 2020-06-18
xingshen 2019-12-30
CaesarHome 2020-11-09
CaptainCTR 2020-07-09
afa0 2020-06-23
chenkai00 2020-06-13
Lucianoesu 2020-06-08
tysforwork 2020-06-05
貌似掉线 2020-05-30
tysforwork 2020-05-27
CaptainCTR 2020-05-07
貌似掉线 2020-05-03
CaptainCTR 2020-04-29
貌似掉线 2020-04-29