Rendering problems in Android Studio v 1.1 / 1.2

2019-01-07 07:17发布

When I add android.support.v7.widget.Toolbar or another android.support.v7.widget.* there are rendering problems.

But Support Library is up to date. And I complied in dependecies properly. I can import them in MainActivity.java

What is the problem?

11条回答
兄弟一词,经得起流年.
2楼-- · 2019-01-07 07:32

I don't know if this will help or not, but I was creating a test project (direct from the wizard, no custom code) and getting this error. Trying to modify the project structure and find the missing class didn't help.

The build failed with the following error:

***rendering problems

The following classes could not be found android.support.v7.internal.widget.ActionBarOverlayLayout***

Obviously it's not the final solution, but changing the Theme in design view from the base "project theme" to anything else allows it to build.

查看更多
兄弟一词,经得起流年.
3楼-- · 2019-01-07 07:33

I changed my app theme from "Theme.AppCompat.Light.DarkActionBar" to "Base.Theme.AppCompat.Light.DarkActionBar"

查看更多
兄弟一词,经得起流年.
4楼-- · 2019-01-07 07:36

I encountered this problem just now in Android Studio 1.2.1.0 with API 22 (Android 5.1.1) selected without changing the theme or API as suggested by others on this thread.

When I updated to the most recent version of Android Studio available via the regular update check, it works fine now. This shouldn't be a problem in the new version Android Studio 1.2.1.1

查看更多
做自己的国王
5楼-- · 2019-01-07 07:42

I changed the AppTheme above the graphical preview to Base.Theme.AppCompat and it disappeared for me. It worked on both 19 and 22 API :) ! Good Luck to all of you!

see what i did
click for larger image

查看更多
Animai°情兽
6楼-- · 2019-01-07 07:44

Changing app theme to Base.Theme.App.Compat worked for me.

查看更多
Anthone
7楼-- · 2019-01-07 07:44
  • Clean project
  • Rebuild project
  • Sync Gradle
查看更多
登录 后发表回答