错误一:
Manifest merger failed : Attribute application@appComponentFactory value=(androidx.core.app.CoreComponentFactory) from [androidx.core:core:1.0.0-beta01] AndroidManifest.xml:22:18-86
is also present at [com.android.support:support-compat:28.0.0-alpha3] AndroidManifest.xml:22:18-91 value=(android.support.v4.app.CoreComponentFactory).
Suggestion: add 'tools:replace="android:appComponentFactory"' to <application> element at AndroidManifest.xml:11:5-49:19 to override.
这个错误是因为项目中同时使用了 androidx 和 support 。
https://blog.csdn.net/mhhyoucom/article/details/83061601
https://www.jianshu.com/p/f7a7a8765294?tdsourcetag=s_pctim_aiomsg
这两位博主都提供了相应的解决方法。
这个是官方的文档:
https://developer.android.google.cn/jetpack/androidx/migrate
如果不想用这些方法,那么就把你所有的包都退回旧版本
错误二:
在可以使用谷歌的情况下,构建项目时出现错误:Could not download auto-value.jar (com.google.auto.value:auto-value:1.5.2): No cached version availa
错误修改方法:
修改方式为在project的build.gradle修改maven地址
mavenCentral()
maven{ url'http://maven.aliyun.com/nexus/content/groups/public/' }
maven{ url'http://maven.aliyun.com/nexus/content/repositories/jcenter'}
错误三:
在项目中使用虚拟机出现错误,未解决,改用真实机型
错误四:
当我新建一个项目时,我布置的ui不显示在预览里。
修改方法,将这个styles里的
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
</style>
改为
<style name="AppTheme" parent="Base.Theme.AppCompat.Light.DarkActionBar">
</style>
原网址:https://stackoverflow.com/questions/44223687/render-error-in-android-studio-3-0-layout-editor