我是Android的新手,当我尝试在第一个应用程序的设计编辑器中设计UI时,我遇到了一个错误:“设计编辑器在成功的项目同步之后是不可用的”,然后我意识到我在同步面板中也有问题,这都是关于build.gradle中的依赖关系。我应该如何改变依赖关系来解决这个问题?下面是build.gradle中的依赖项
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
}下面是同步错误:
ERROR:Failed to resolve:junit
ERROR:Failed to resolve:epresso-idling-source
ERROR:Failed to resolve:runner
ERROR:Failed to resolve:core
ERROR:Failed to resolve:epresso-core
ERROR:Failed to resolve:monitor发布于 2020-09-11 17:19:33
我刚从依赖项中删除了下面的这些行,它起了作用,
testImplementation 'junit:junit:4.12‘androidTestImplementation 'androidx.test.ext:junit:1.1.1’androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0‘
但我不知道这会不会在将来引起问题。
https://stackoverflow.com/questions/63850693
复制相似问题