我第一次下载Android Studio,遇到了一个问题:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.1'
testCompile 'junit:junit:4.12'在另一个码头上出现了:
ERROR: Failed to resolve: com.android.support.constraint:constraint-layout:1.0.1
Show in Project Structure dialog
Affected Modules: app我可以在哪里以及如何解决这个问题?
我相信这个错误是由于constraint-layout:1.0.1,但我似乎找不到解决方案。
发布于 2019-12-20 22:46:55
你应该连接到互联网,并同步项目与gradle和gradle将下载必要的files.if你有问题,连接到互联网下载gradle,你可以这样设置http代理:
文件->设置->搜索代理->选择手动代理配置->HTTP主机名:您的主机端口号:您的端口
您需要将主机名更改为您使用的代理
发布于 2019-12-21 00:41:01
错误:无法解决: com.android.support.constraint:constraint-layout:1.0.1在项目结构对话框中显示受影响的模块:应用程序
这可能是因为与最近的Android Studio不兼容。您可以尝试将1.0.2版与以下内容一起使用:
implementation 'com.android.support.constraint:constraint-layout:1.0.2'不要忘记将google() maven添加到您的build.gradle中。
请参阅https://mvnrepository.com/artifact/com.android.support.constraint/constraint-layout上的工件
但是,您应该考虑将您的项目升级到AndroidX。请参见迁移到AndroidX。
https://stackoverflow.com/questions/59426835
复制相似问题