我找到了这个问题的两个解决方案,但都不起作用。所以我决定问问你。
我正在使用 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 并重新下载,但仍然出现同样的错误。
之后我尝试下载推荐的支持库;topic 1 , topic 2。我下载 Android 支持库后,版本 23.0.1 仍然出现相同的错误。
之后,我尝试通过修复错误的第一个选项(安装存储库和同步项目)来解决我的问题。我再次找到了一些主题。我检查了“设置”中的“HTTP 代理”部分,已经选择了“无代理”。
所以,我尝试了我发现的所有内容,但仍然收到此错误。有人可以帮助我吗?