首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在成功的项目同步之前,设计编辑器不可用。

在成功的项目同步之前,设计编辑器不可用。
EN

Stack Overflow用户
提问于 2020-09-11 16:12:40
回答 1查看 1.9K关注 0票数 0

我是Android的新手,当我尝试在第一个应用程序的设计编辑器中设计UI时,我遇到了一个错误:“设计编辑器在成功的项目同步之后是不可用的”,然后我意识到我在同步面板中也有问题,这都是关于build.gradle中的依赖关系。我应该如何改变依赖关系来解决这个问题?下面是build.gradle中的依赖项

代码语言:javascript
复制
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'
}

下面是同步错误:

代码语言:javascript
复制
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
EN

回答 1

Stack Overflow用户

发布于 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‘

但我不知道这会不会在将来引起问题。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/63850693

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档