React Native 个推安卓引用依赖项失败 ERROR: Unable to resolve dependency for
问题
公司的 React Native 的项目以前集成了 react-native-getui 个推推送,后来升级到了 1.1.35 版本,个推模块的build.gradle
如下:
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "com.android.support:support-v4:25+"
implementation "com.facebook.react:react-native:+" // From node_modules
implementation 'com.getui:sdk-for-google-play:4.3.5.9'
implementation 'com.getui:mzp-for-google-play:1.0.9'
implementation 'com.getui:xmp-for-google-play:1.0.6'
implementation 'com.getui:hwp-for-google-play:1.0.6'
}
但是在android studio编译的时候,出现以下错误,无法解析依赖项。
ERROR: Unable to resolve dependency for ':react-native-getui@debug/compileClasspath': Could not resolve com.getui:sdk-for-google-play:4.3.5.9.
Show Details
Affected Modules: android-react-native-getui
ERROR: Unable to resolve dependency for ':react-native-getui@debug/compileClasspath': Could not resolve com.getui:mzp-for-google-play:1.0.9.
Show Details
Affected Modules: android-react-native-getui
ERROR: Unable to resolve dependency for ':react-native-getui@debug/compileClasspath': Could not resolve com.getui:xmp-for-google-play:1.0.6.
Show Details
Affected Modules: android-react-native-getui
ERROR: Unable to resolve dependency for ':react-native-getui@debug/compileClasspath': Could not resolve com.getui:hwp-for-google-play:1.0.6.
Show Details
Affected Modules: android-react-native-getui
ERROR: Unable to resolve dependency for ':react-native-getui@debugAndroidTest/compileClasspath': Could not resolve com.getui:sdk-for-google-play:4.3.5.9.
Show Details
Affected Modules: android-react-native-getui
ERROR: Unable to resolve dependency for ':react-native-getui@debugAndroidTest/compileClasspath': Could not resolve com.getui:mzp-for-google-play:1.0.9.
Show Details
Affected Modules: android-react-native-getui
ERROR: Unable to resolve dependency for ':react-native-getui@debugAndroidTest/compileClasspath': Could not resolve com.getui:xmp-for-google-play:1.0.6.
Show Details
Affected Modules: android-react-native-getui
ERROR: Unable to resolve dependency for ':react-native-getui@debugAndroidTest/compileClasspath': Could not resolve com.getui:hwp-for-google-play:1.0.6.
Show Details
Affected Modules: android-react-native-getui
ERROR: Unable to resolve dependency for ':react-native-getui@debugUnitTest/compileClasspath': Could not resolve com.getui:sdk-for-google-play:4.3.5.9.
Show Details
Affected Modules: android-react-native-getui
ERROR: Unable to resolve dependency for ':react-native-getui@debugUnitTest/compileClasspath': Could not resolve com.getui:mzp-for-google-play:1.0.9.
Show Details
Affected Modules: android-react-native-getui
ERROR: Unable to resolve dependency for ':react-native-getui@debugUnitTest/compileClasspath': Could not resolve com.getui:xmp-for-google-play:1.0.6.
Show Details
Affected Modules: android-react-native-getui
ERROR: Unable to resolve dependency for ':react-native-getui@debugUnitTest/compileClasspath': Could not resolve com.getui:hwp-for-google-play:1.0.6.
Show Details
Affected Modules: android-react-native-getui
ERROR: Unable to resolve dependency for ':react-native-getui@release/compileClasspath': Could not resolve com.getui:sdk-for-google-play:4.3.5.9.
Show Details
Affected Modules: android-react-native-getui
ERROR: Unable to resolve dependency for ':react-native-getui@release/compileClasspath': Could not resolve com.getui:mzp-for-google-play:1.0.9.
Show Details
Affected Modules: android-react-native-getui
ERROR: Unable to resolve dependency for ':react-native-getui@release/compileClasspath': Could not resolve com.getui:xmp-for-google-play:1.0.6.
Show Details
Affected Modules: android-react-native-getui
ERROR: Unable to resolve dependency for ':react-native-getui@release/compileClasspath': Could not resolve com.getui:hwp-for-google-play:1.0.6.
Show Details
Affected Modules: android-react-native-getui
ERROR: Unable to resolve dependency for ':react-native-getui@releaseUnitTest/compileClasspath': Could not resolve com.getui:sdk-for-google-play:4.3.5.9.
Show Details
Affected Modules: android-react-native-getui
ERROR: Unable to resolve dependency for ':react-native-getui@releaseUnitTest/compileClasspath': Could not resolve com.getui:mzp-for-google-play:1.0.9.
Show Details
Affected Modules: android-react-native-getui
ERROR: Unable to resolve dependency for ':react-native-getui@releaseUnitTest/compileClasspath': Could not resolve com.getui:xmp-for-google-play:1.0.6.
Show Details
Affected Modules: android-react-native-getui
ERROR: Unable to resolve dependency for ':react-native-getui@releaseUnitTest/compileClasspath': Could not resolve com.getui:hwp-for-google-play:1.0.6.
Show Details
Affected Modules: android-react-native-getui
解决
回头看了 react-native-getui 的文档说明:
本插件采用maven方式引入sdk,故需要在android/build.gradle
中添加 maven 地址
maven {
url "http://mvn.gt.igexin.com/nexus/content/repositories/releases/"
}
非特殊说明,本网站所有文章均为原创。如若转载,请注明出处:https://mip.cpming.top/p/react-native-getui-resolve-dependency-error