apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/notice.txt'
exclude 'META-INF/ASL2.0'
}
defaultConfig {
applicationId "com.example.takeimage"
minSdkVersion 19
targetSdkVersion 23
}
android {
packagingOptions {
exclude 'META-INF/NOTICE'
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'org.springframework.android:spring-android-rest-template:2.0.0.M3'
compile 'com.fasterxml.jackson.core:jackson-databind:2.4.2'
compile 'org.glassfish.main:javax.annotation:4.0-b33'
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:design:23.1.1'
}
出了什么问题: 配置项目':app'时出现问题。
无法解析配置':app:_debugCompile'的所有依赖项。 找不到com.android.support:design:23.1.1。 在以下位置搜索: https://jcenter.bintray.com/com/android/support/design/23.1.1/design-23.1.1.pom https://jcenter.bintray.com/com/android/support/design/23.1.1/design-23.1.1.jar https://repo1.maven.org/maven2/com/android/support/design/23.1.1/design-23.1.1.pom https://repo1.maven.org/maven2/com/android/support/design/23.1.1/design-23.1.1.jar http://repo.spring.io/milestone/com/android/support/design/23.1.1/design-23.1.1.pom http://repo.spring.io/milestone/com/android/support/design/23.1.1/design-23.1.1.jar 要求: 安卓应用程序:未指定 找不到com.android.support:appcompat-v7:23.1.1。 在以下位置搜索: https://jcenter.bintray.com/com/android/support/appcompat-v7/23.1.1/appcompat-v7-23.1.1.pom https://jcenter.bintray.com/com/android/support/appcompat-v7/23.1.1/appcompat-v7-23.1.1.jar https://repo1.maven.org/maven2/com/android/support/appcompat-v7/23.1.1/appcompat-v7-23.1.1.pom https://repo1.maven.org/maven2/com/android/support/appcompat-v7/23.1.1/appcompat-v7-23.1.1.jar http://repo.spring.io/milestone/com/android/support/appcompat-v7/23.1.1/appcompat-v7-23.1.1.pom http://repo.spring.io/milestone/com/android/support/appcompat-v7/23.1.1/appcompat-v7-23.1.1.jar 要求: 安卓应用程序:未指定 找不到com.android.support:recyclerview-v7:23.1.1。 在以下位置搜索: https://jcenter.bintray.com/com/android/support/recyclerview-v7/23.1.1/recyclerview-v7-23.1.1.pom https://jcenter.bintray.com/com/android/support/recyclerview-v7/23.1.1/recyclerview-v7-23.1.1.jar https://repo1.maven.org/maven2/com/android/support/recyclerview-v7/23.1.1/recyclerview-v7-23.1.1.pom https://repo1.maven.org/maven2/com/android/support/recyclerview-v7/23.1.1/recyclerview-v7-23.1.1.jar http://repo.spring.io/milestone/com/android/support/recyclerview-v7/23.1.1/recyclerview-v7-23.1.1.pom http://repo.spring.io/milestone/com/android/support/recyclerview-v7/23.1.1/recyclerview-v7-23.1.1.jar 要求: 安卓应用程序:未指定 找不到com.google.android.gms:play-services-base:8.4.0。 在以下位置搜索: https://jcenter.bintray.com/com/google/android/gms/play-services-base/8.4.0/play-services-base-8.4.0.pom https://jcenter.bintray.com/com/google/android/gms/play-services-base/8.4.0/play-services-base-8.4.0.jar https://repo1.maven.org/maven2/com/google/android/gms/play-services-base/8.4.0/play-services-base-8.4.0.pom https://repo1.maven.org/maven2/com/google/android/gms/play-services-base/8.4.0/play-services-base-8.4.0.jar http://repo.spring.io/milestone/com/google/android/gms/play-services-base/8.4.0/play-services-base-8.4.0.pom http://repo.spring.io/milestone/com/google/android/gms/play-services-base/8.4.0/play-services-base-8.4.0.jar 要求: 安卓应用程序:未指定 找不到com.google.android.gms:play-services-plus:8.4.0。 在以下位置搜索: https://jcenter.bintray.com/com/google/android/gms/play-services-plus/8.4.0/play-services-plus-8.4.0.pom https://jcenter.bintray.com/com/google/android/gms/play-services-plus/8.4.0/play-services-plus-8.4.0.jar https://repo1.maven.org/maven2/com/google/android/gms/play-services-plus/8.4.0/play-services-plus-8.4.0.pom https://repo1.maven.org/maven2/com/google/android/gms/play-services-plus/8.4.0/play-services-plus-8.4.0.jar http://repo.spring.io/milestone/com/google/android/gms/play-services-plus/8.4.0/play-services-plus-8.4.0.pom http://repo.spring.io/milestone/com/google/android/gms/play-services-plus/8.4.0/play-services-plus-8.4.0.jar 要求: 安卓应用程序:未指定 找不到com.google.android.gms:play-services-auth:8.4.0。 在以下位置搜索: https://jcenter.bintray.com/com/google/android/gms/play-services-auth/8.4.0/play-services-auth-8.4.0.pom https://jcenter.bintray.com/com/google/android/gms/play-services-auth/8.4.0/play-services-auth-8.4.0.jar https://repo1.maven.org/maven2/com/google/android/gms/play-services-auth/8.4.0/play-services-auth-8.4.0.pom https://repo1.maven.org/maven2/com/google/android/gms/play-services-auth/8.4.0/play-services-auth-8.4.0.jar http://repo.spring.io/milestone/com/google/android/gms/play-services-auth/8.4.0/play-services-auth-8.4.0.pom http://repo.spring.io/milestone/com/google/android/gms/play-services-auth/8.4.0/play-services-auth-8.4.0.jar 要求: 安卓应用程序:未指定 找不到com.android.support:support-v13:23.1.1。 在以下位置搜索: https://jcenter.bintray.com/com/android/support/support-v13/23.1.1/support-v13-23.1.1.pom https://jcenter.bintray.com/com/android/support/support-v13/23.1.1/support-v13-23.1.1.jar https://repo1.maven.org/maven2/com/android/support/support-v13/23.1.1/support-v13-23.1.1.pom https://repo1.maven.org/maven2/com/android/support/support-v13/23.1.1/support-v13-23.1.1.jar http://repo.spring.io/milestone/com/android/support/support-v13/23.1.1/support-v13-23.1.1.pom http://repo.spring.io/milestone/com/android/support/support-v13/23.1.1/support-v13-23.1.1.jar 要求: 安卓应用程序:未指定 找不到com.google.android.gms:play-services-appindexing:8.4.0。 在以下位置搜索: https://jcenter.bintray.com/com/google/android/gms/play-services-appindexing/8.4.0/play-services-appindexing-8.4.0.pom https://jcenter.bintray.com/com/google/android/gms/play-services-appindexing/8.4.0/play-services-appindexing-8.4.0.jar https://repo1.maven.org/maven2/com/google/android/gms/play-services-appindexing/8.4.0/play-services-appindexing-8.4.0.pom https://repo1.maven.org/maven2/com/google/android/gms/play-services-appindexing/8.4.0/play-services-appindexing-8.4.0.jar http://repo.spring.io/milestone/com/google/android/gms/play-services-appindexing/8.4.0/play-services-appindexing-8.4.0.pom http://repo.spring.io/milestone/com/google/android/gms/play-services-appindexing/8.4.0/play-services-appindexing-8.4.0.jar 要求: 安卓应用程序:未指定 找不到com.google.android.gms:play-services-gcm:8.4.0。 在以下位置搜索: https://jcenter.bintray.com/com/google/android/gms/play-services-gcm/8.4.0/play-services-gcm-8.4.0.pom https://jcenter.bintray.com/com/google/android/gms/play-services-gcm/8.4.0/play-services-gcm-8.4.0.jar https://repo1.maven.org/maven2/com/google/android/gms/play-services-gcm/8.4.0/play-services-gcm-8.4.0.pom https://repo1.maven.org/maven2/com/google/android/gms/play-services-gcm/8.4.0/play-services-gcm-8.4.0.jar http://repo.spring.io/milestone/com/google/android/gms/play-services-gcm/8.4.0/play-services-gcm-8.4.0.pom http://repo.spring.io/milestone/com/google/android/gms/play-services-gcm/8.4.0/play-services-gcm-8.4.0.jar 要求: 安卓应用程序:未指定 找不到com.android.support:support-v4:[22,23的任何匹配项,因为没有com.android.support:support-v4版本可用。 在以下位置搜索: https://jcenter.bintray.com/com/android/support/support-v4/maven-metadata.xml https://jcenter.bintray.com/com/android/support/support-v4/ https://repo1.maven.org/maven2/com/android/support/support-v4/maven-metadata.xml https://repo1.maven.org/maven2/com/android/support/support-v4/ http://repo.spring.io/milestone/com/android/support/support-v4/maven-metadata.xml http://repo.spring.io/milestone/com/android/support/support-v4/ 要求: Android:app:unspecified> com.facebook.android:facebook-android-sdk:4.6.0
尝试: 使用--stacktrace选项运行以获取堆栈跟踪。使用--info或--debug选项运行以获得更多日志输出。
建立失败
答案 0 :(得分:1)
您的SDK管理器中没有安装Android Repository和Google Repository,或者它们不是最新的更新。
答案 1 :(得分:0)
很可能你有一个64位系统,但仍然缺少一些32位用于Android开发。
如果您在64位Ubuntu系统上运行,请参阅Ubuntu 64位Android开发的32位库以获取更多详细信息。
如果您在64位Fedora系统上运行,请参阅安装-android-sdk-on-64-bit-fedora /以获取更多详细信息。
为了让aapt工作(这也修复了我对avd的问题),只需运行以下两个命令: sudo apt-get install lib32stdc ++ 6 sudo apt-get install lib32z1
答案 2 :(得分:0)
看起来你需要一些本地支持库。您是否尝试过从终端运行一次?
android update sdk --no-ui --all --filter tool,extra-android-m2repository,extra-android-support,extra-google-google_play_services,extra-google-m2repository,android-23