我的项目build.gradle喜欢自爆,但同步后总是出现错误消息:无法解析com.stripe:stripe-android:+。但是,我认为条纹是android studio中的一种标准。请赐教.....
dependencies {
compile fileTree(dir: 'libs', include: '*.jar')
compile project(':CircularImageView')
compile project(':UrlImageViewHelper')
compile project(':ViewPagerIndicator')
compile project(':DevsmartAndroid')
compile project(':DenivipVideoComponents_PT3.8')
compile project(':BluejayDbLibrary')
compile project(':google-play-services_lib')
compile project(':AmazonLib')
compile files('libs/FlurryAnalytics-5.5.0.jar')
compile files('libs/opentok-android-sdk.jar')
compile ('com.stripe:stripe-android:+')
}
完整的构建文件
申请插件:' android'
依赖{ 编译fileTree(dir:' libs',include:' * .jar') 编译项目(':CircularImageView') 编译项目(':UrlImageViewHelper') 编译项目(':ViewPagerIndicator') 编译项目(':DevsmartAndroid') 编译项目(':DenivipVideoComponents_PT3.8') 编译项目(':BluejayDbLibrary') 编译项目(':google-play-services_lib') 编译项目(':AmazonLib') 编译文件(' libs / FlurryAnalytics-5.5.0.jar') 编译文件(' libs / opentok-android-sdk.jar') 编译(' com.stripe:stripe-android:+') 编译' com.google.android.gms:play-services-analytics:8.3.0'
}
android { compileSdkVersion 19 buildToolsVersion" 22.0.1"
defaultConfig{
applicationId "com.bluejayPT.patient"
}
buildTypes {
release {
buildConfigField "boolean", "ENABLE_DEBUG", "false"
}
debug {
buildConfigField "boolean", "ENABLE_DEBUG", "true"
}
}
lintOptions {
checkReleaseBuilds false
}
sourceSets {
main {
manifest.srcFile 'AndroidManifest_PT.xml'
//manifest.srcFile 'AndroidManifest_SK.xml'
java.srcDirs = ['.apt_generated','src']
resources.srcDirs = ['.apt_generated','src']
aidl.srcDirs = ['.apt_generated','src']
renderscript.srcDirs = ['.apt_generated','src']
assets.srcDirs = ['assets']
jni.srcDirs = []
jniLibs.srcDir('libs')
}
instrumentTest.setRoot('tests')
debug.setRoot('build-types/debug')
release.setRoot('build-types/release')
}
}
答案 0 :(得分:1)
我得到了解决方案,
添加以下
allprojects {
repositories {
jcenter()
}
}
进入项目build.gradle,问题解决了,因为我的项目最初从eclipse迁移到android studio,这意味着基于mavenCentral()的eclipse存储库不是jcenter()。