Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/233.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 无法解析com.commonware.cwac:camera:0.6.&x2B;_Android_Android Studio_Gradle_Android Gradle Plugin - Fatal编程技术网

Android 无法解析com.commonware.cwac:camera:0.6.&x2B;

Android 无法解析com.commonware.cwac:camera:0.6.&x2B;,android,android-studio,gradle,android-gradle-plugin,Android,Android Studio,Gradle,Android Gradle Plugin,我已经在我的应用程序中添加了来自 但现在几周来,当我尝试将gradle与internet同步时,出现了这个错误 Error:A problem occurred configuring project ':app'. > Could not resolve all dependencies for configuration ':app:_debugApkCopy'. > Could not resolve com.commonsware.cwac:camera:0.6.+. Req

我已经在我的应用程序中添加了来自

但现在几周来,当我尝试将gradle与internet同步时,出现了这个错误

Error:A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugApkCopy'.
> Could not resolve com.commonsware.cwac:camera:0.6.+.
Required by: YourApp:app:unspecified > com.github.ParkSangGwon:TedPicker:v1.0.10
> Could not resolve com.commonsware.cwac:camera:0.6.+.
> Failed to list versions for com.commonsware.cwac:camera.
> Unable to load Maven meta-data from https://repo.commonsware.com.s3.amazonaws.com/com/commonsware/cwac/camera/maven-metadata.xml.
> Could not GET https://repo.commonsware.com.s3.amazonaws.com/com/commonsware/cwac/camera/maven-metadata.xml'.
> Host name 'repo.commonsware.com.s3.amazonaws.com' does not match the certificate subject provided by the peer (CN=*.s3.amazonaws.com, O=Amazon.com Inc., L=Seattle, ST=Washington, C=US)
但如果我在gradle中切换到脱机模式,效果很好

这也是我的应用程序的buid.gradle

buildscript {
repositories {
    mavenCentral()
}

dependencies {
    classpath 'com.jakewharton.hugo:hugo-plugin:1.2.1'
}
} apply plugin: 'com.android.application'
apply plugin: 'com.jakewharton.hugo'

android {
compileSdkVersion 24
buildToolsVersion "24.0.2"

defaultConfig {
    applicationId "org.urapp.urapp"
    minSdkVersion 19
    targetSdkVersion 22
    versionCode 2
    multiDexEnabled true
    versionName "1.1"
}
packagingOptions {
    exclude 'META-INF/DEPENDENCIES'
    exclude 'META-INF/NOTICE'
    exclude 'META-INF/LICENSE'
    exclude 'META-INF/LICENSE.txt'
    exclude 'META-INF/NOTICE.txt'
    exclude 'META-INF/ASL2.0'}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
dexOptions {
    maxProcessCount 4
    javaMaxHeapSize "4g"
}
} 
repositories {
mavenCentral()
jcenter()
maven {
    url "https://repo.commonsware.com.s3.amazonaws.com"
}
maven { url "https://jitpack.io" }
}

android {
useLibrary 'org.apache.http.legacy'
}

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile project(':flexjson-2.1')
compile('org.apache.httpcomponents:httpmime:4.2.6') {
    exclude module: 'httpclient'
}
compile project(':Android-AdvancedWebView')
compile project(':flexjson-2.1')
compile 'com.google.firebase:firebase-messaging:9.4.0'
compile 'com.google.firebase:firebase-core:9.4.0'
compile 'com.google.android.gms:play-services-auth:9.6.0'
compile 'com.google.android.gms:play-services-identity:9.6.0'
compile 'com.android.support:appcompat-v7:24.2.1'
compile 'org.apache.httpcomponents:httpclient:4.3.5'
compile 'com.android.support:design:24.2.1'
compile 'net.opacapp:multiline-collapsingtoolbar:1.2.2'
compile 'com.android.support:palette-v7:24.2.1'
compile 'com.github.ParkSangGwon:TedPicker:v1.0.10'
compile 'com.theartofdev.edmodo:android-image-cropper:2.3.+'
compile 'com.android.support:cardview-v7:24.2.1'
compile 'com.android.support:recyclerview-v7:24.2.1'
compile 'com.google.guava:guava:18.0'
compile 'com.github.oliveiradev:image-zoom:0.3.0'
compile 'com.android.support:percent:24.2.1'
compile 'com.android.support:multidex:1.0.1'
compile 'com.android.volley:volley:1.0.0'
compile 'de.hdodenhof:circleimageview:2.1.0'
compile 'com.toptoche.searchablespinner:searchablespinnerlibrary:1.3.1'
compile 'com.google.firebase:firebase-crash:9.4.0'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'com.squareup.picasso:picasso:2.5.2'
}

afterEvaluate {
tasks.matching {
    it.name.startsWith('dex')
}.each { dx ->
    if (dx.additionalParameters == null) {
        dx.additionalParameters = ['--multi-dex']
    } else {
        dx.additionalParameters += '--multi-dex'
    }
}
}
subprojects {
project.plugins.whenPluginAdded { plugin ->
    if ("com.android.build.gradle.AppPlugin".equals(plugin.class.name)) {
        project.android.dexOptions.preDexLibraries = false
    } else if ("com.android.build.gradle.LibraryPlugin".equals(plugin.class.name)) {
        project.android.dexOptions.preDexLibraries = false
    }
}
}
apply plugin: 'com.google.gms.google-services' 
我已经在我的应用程序中添加了tedpicker

我不建议使用该库,因为它依赖于已停止使用的库(即我的CWAC相机库)

但现在几周来,当我尝试将gradle与internet同步时,出现了这个错误

Error:A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugApkCopy'.
> Could not resolve com.commonsware.cwac:camera:0.6.+.
Required by: YourApp:app:unspecified > com.github.ParkSangGwon:TedPicker:v1.0.10
> Could not resolve com.commonsware.cwac:camera:0.6.+.
> Failed to list versions for com.commonsware.cwac:camera.
> Unable to load Maven meta-data from https://repo.commonsware.com.s3.amazonaws.com/com/commonsware/cwac/camera/maven-metadata.xml.
> Could not GET https://repo.commonsware.com.s3.amazonaws.com/com/commonsware/cwac/camera/maven-metadata.xml'.
> Host name 'repo.commonsware.com.s3.amazonaws.com' does not match the certificate subject provided by the peer (CN=*.s3.amazonaws.com, O=Amazon.com Inc., L=Seattle, ST=Washington, C=US)
更改
url“https://repo.commonsware.com.s3.amazonaws.com“
url”https://s3.amazonaws.com/repo.commonsware.com“

我已经在我的应用程序中添加了tedpicker

我不建议使用该库,因为它依赖于已停止使用的库(即我的CWAC相机库)

但现在几周来,当我尝试将gradle与internet同步时,出现了这个错误

Error:A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugApkCopy'.
> Could not resolve com.commonsware.cwac:camera:0.6.+.
Required by: YourApp:app:unspecified > com.github.ParkSangGwon:TedPicker:v1.0.10
> Could not resolve com.commonsware.cwac:camera:0.6.+.
> Failed to list versions for com.commonsware.cwac:camera.
> Unable to load Maven meta-data from https://repo.commonsware.com.s3.amazonaws.com/com/commonsware/cwac/camera/maven-metadata.xml.
> Could not GET https://repo.commonsware.com.s3.amazonaws.com/com/commonsware/cwac/camera/maven-metadata.xml'.
> Host name 'repo.commonsware.com.s3.amazonaws.com' does not match the certificate subject provided by the peer (CN=*.s3.amazonaws.com, O=Amazon.com Inc., L=Seattle, ST=Washington, C=US)

更改
url“https://repo.commonsware.com.s3.amazonaws.com“
url”https://s3.amazonaws.com/repo.commonsware.com“

'repo.commonware.com.s3.amazonaws.com'与对等方提供的证书主题不匹配
这不是编程问题。。。但是*.s3.amazonaws.com证书的问题
'repo.commonware.com.s3.amazonaws.com'与对等方提供的证书主题不匹配
这不是编程问题。。。但是关于*.s3.amazonaws.com的问题,请告诉我,你知道更好的替代库吗@CommonsWare@Nilabja:对不起,我从未使用过picker库。没问题,我最终会改用imagepicker Intent。谢谢您的建议,您知道其他更好的库吗@CommonsWare@Nilabja:对不起,我从未使用过picker库。没问题,我最终将切换回使用imagepicker