我正在使用Debian 8 Jessie和Android Studio 1.4。
我刚刚创建了一个新项目,当我尝试启动它时,出现了一个错误:“无法解析:com.android.support:appcompat-v7:15.+”,并给了我3个选项。
1)安装存储库并同步项目
当我尝试安装时,出现了这样的错误:
Loading SDK information...
Ignoring unknown package filter 'extra-android-m2repository'Warning: The package filter removed all packages. There is nothing to install.
Please consider trying to update again without a package filter.
窗户下方:
Install failed. Please check your network connection and try again. You may continue with creating your project, but it will not complete correctly without the missing components.
2)在文件中显示
这是我的 build.gradle 依赖项:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:15.+'
}
这行代码存在错误:
compile 'com.android.support:appcompat-v7:15.+'
3) 在“项目结构”对话框中显示
依赖项窗口已打开,关于此行再次说明:
compile 'com.android.support:appcompat-v7:15.+'
尝试的解决方案:
首先,我尝试重新下载版本sdk。我删除了Android 4.0.3并重新下载,但仍然出现相同的错误。
之后我尝试下载建议在主题1和主题2中支持库。当我下载Android Support Library,rev 23.0.1时仍然遇到相同的错误。
之后我尝试通过修复错误的第一选项来解决问题(安装存储库并同步项目)。我再次查找了一些主题。我在设置中检查了我的HTTP代理部分,已经选择“无代理”。
所以,我尝试了一切我能找到的办法,但还是遇到了这个错误。请问有人能帮我吗?
compile 'com.android.support:appcompat-v7:23.0.1'
- AlbAtNf