解析失败 com.stripe:stripe-android

failed to resolve com.stripe:stripe-android

我的项目 build.gradle 好像炸了,但同步后总是出现错误消息:解析失败 com.stripe:stripe-android:+。但是,我认为条纹是 android 工作室的一种标准。请赐教....

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'

依赖项{ 编译文件树(目录:'libs',包括:'*.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{ 编译SDK版本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')
}

}

我找到了解决方案,

在下面添加

allprojects {
repositories {
    jcenter()
}

}

进入项目build.gradle,问题解决了,因为我的项目最初是从eclipse迁移到android studio,这意味着eclipse存储库基于mavenCentral()而不是jcenter()。