问题描述
我采用了android 0.2.2工作室没有问题,但后来我升级到0.3.6,然后问题开始了。
I had no trouble using android studio 0.2.2, but then I upgraded to 0.3.6 then the issues started.
我试图寻找其他的问题,并发现了许多常见问题的Gradle,但没有设法找到将解决这种情况的解决方案。
I tried searching other questions and found many common gradle issues, but haven't managed to find a solution that would fix this instance.
Gradle: A problem occurred configuring project ':ComputerVision'.
> Failed to notify project evaluation listener.
> Could not resolve all dependencies for configuration ':ComputerVision:_DebugCompile'.
> Could not find any version that matches com.android.support:appcompat-v6:+.
Required by:
ComputerVisionProject:ComputerVision:unspecified
摇篮code
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.6.+'
}
}
apply plugin: 'android'
repositories {
mavenCentral()
}
android {
compileSdkVersion 17
buildToolsVersion "17.0.0"
defaultConfig {
minSdkVersion 7
targetSdkVersion 19
}
buildTypes {
release {
runProguard true
proguardFile getDefaultProguardFile('proguard-android-optimize.txt')
}
}
productFlavors {
defaultFlavor {
proguardFile 'proguard-rules.txt'
}
}
}
dependencies {
compile 'com.android.support:appcompat-v7:+'
}
安装的软件包
让我知道如果你想看到它的
休息
Installed Packages
Let me know if you want to see the rest of it
推荐答案
期待中的 local.properties
提交您的项目,并确保它指向同一个Android SDK中您安装的支持库,如果不是的话,安装支持库那里。 Android Studio中安装自己的本地SDK,它可能会造成混淆现有Android开发谁已经有一个SDK设置;我们正在努力改善生活的那些人。
Look in the local.properties
file for your project and make sure it's pointed at the same Android SDK you installed the support repository for, and if it's not, install the support repository there. Android Studio installs its own local SDK, which can be confusing for existing Android developers who already have an SDK set up; we're working on improving life for those folks.
如果不工作,那么你可以尝试卸载并重新安装支持库中,并且四处,并确保该文件在那里,您已经阅读权限给他们。我的目录结构是这样的:
If that doesn't work, then you could try uninstalling and reinstalling the support repository, and poking around and making sure the files are there and you have read permissions to them. The directory structure of mine looks like this:
ls -lR ~/sdk/extras/android/m2repository/com/android/support/appcompat-v7/
total 24
drwxr-x---@ 8 sbarta admin 272B Oct 30 17:04 18.0.0
-rw-r-----@ 1 sbarta admin 40B Oct 30 17:05 maven-metadata.xml.sha1
-rw-r-----@ 1 sbarta admin 32B Oct 30 17:05 maven-metadata.xml.md5
-rw-r-----@ 1 sbarta admin 343B Oct 30 17:05 maven-metadata.xml
drwxr-x---@ 8 sbarta admin 272B Oct 30 17:05 19.0.0
/Users/sbarta/sdk/extras/android/m2repository/com/android/support/appcompat-v7//18.0.0:
total 1104
-rw-r-----@ 1 sbarta admin 40B Oct 30 17:04 appcompat-v7-18.0.0.pom.sha1
-rw-r-----@ 1 sbarta admin 32B Oct 30 17:04 appcompat-v7-18.0.0.pom.md5
-rw-r-----@ 1 sbarta admin 652B Oct 30 17:04 appcompat-v7-18.0.0.pom
-rw-r-----@ 1 sbarta admin 40B Oct 30 17:04 appcompat-v7-18.0.0.aar.sha1
-rw-r-----@ 1 sbarta admin 32B Oct 30 17:04 appcompat-v7-18.0.0.aar.md5
-rw-r-----@ 1 sbarta admin 530K Oct 30 17:04 appcompat-v7-18.0.0.aar
/Users/sbarta/sdk/extras/android/m2repository/com/android/support/appcompat-v7//19.0.0:
total 1208
-rw-r-----@ 1 sbarta admin 40B Oct 30 17:05 appcompat-v7-19.0.0.pom.sha1
-rw-r-----@ 1 sbarta admin 32B Oct 30 17:05 appcompat-v7-19.0.0.pom.md5
-rw-r-----@ 1 sbarta admin 652B Oct 30 17:05 appcompat-v7-19.0.0.pom
-rw-r-----@ 1 sbarta admin 40B Oct 30 17:05 appcompat-v7-19.0.0.aar.sha1
-rw-r-----@ 1 sbarta admin 32B Oct 30 17:05 appcompat-v7-19.0.0.aar.md5
-rw-r-----@ 1 sbarta admin 582K Oct 30 17:05 appcompat-v7-19.0.0.aar
这篇关于不能编译升级Android Studio中的新项目,由于依赖的gradle的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!