我是 Android 新手,我想在我的应用中添加支付选项。所以,我使用了 instamojo。我在 gradle 文件中包含了 instamojo 库。但是 gradle 文件抛出错误。
错误:
Error:Failed to resolve: in.juspay:godel:0.6.11.0823
我的gradle文件:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:support-v4:23.2.0'
compile 'de.hdodenhof:circleimageview:1.2.1'
compile 'com.android.support:appcompat-v7:23.2.0'
compile 'com.android.support:recyclerview-v7:23.2.0'
compile 'com.loopj.android:android-async-http:1.4.7'
compile 'org.apache.httpcomponents:httpclient-android:4.3.5.1'
compile('com.googlecode.json-simple:json-simple:1.1.1') {
exclude group: 'org.hamcrest', module: 'hamcrest-core'
}
compile 'com.android.support:multidex:1.0.0'
compile 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1'
compile 'com.android.support:design:23.1.1'
compile 'com.google.gms:google-services:3.0.0'
compile 'com.google.android.gms:play-services-gcm:8.4.0'
compile 'com.google.android.gms:play-services-location:8.4.0'
compile 'com.instamojo:android-sdk:1.2.4'
}
如果我在单独的应用程序中运行 instamojo sdk 意味着工作完美。如果我与我的应用程序集成意味着超越 gradle 错误。
请大家帮忙解决
提前致谢。
最佳答案
Error:Failed to resolve: in.juspay:godel:0.6.11.0823
你应该有一个 allprojects
block ,其中包含像这样的一些行
// Add to build.gradle
repositories {
jcenter() // <-- should already be there
mavenCentral()
maven {
url "https://s3-ap-southeast-1.amazonaws.com/godel-release/godel/"
}
}
并且在app/build.gradle
dependencies {
// compile 'in.juspay:godel:0.6.12.0823' // maybe need this?
compile 'com.instamojo:android-sdk:1.2.4'
// your other dependencies
...
...
}
另外,这条线不需要存在。 编译 'com.google.gms:google-services:3.0.0'
It should be in the classpath
of the buildscript
dependencies
block.
并且 'com.android.support:design:23.1.1'
应该使用 23.2.0
来匹配其他 Android 支持版本。
关于“ list 合并失败”,你can search to find something similar ,并从删除这一行开始,因为它与其他依赖项是多余的。
compile 'com.android.support:support-v4:23.2.0'
关于android - 如何将 instamojo 集成到 android 中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40603502/