XML報錯,什麼都沒動的時候就這樣:android
Rendering Problems The following classes could not be found: android.support.v7.internal.app.WindowDecorActionBar (Fix Build Path, Create Class) Tip: Try to build the project.
The Actionbar has been deprecated and replaced by Toolbar. That being said, you can do the following if you want to continue using Actionbar for now: 1.Open styles.xml in the values folder inside the res folder. 2.Add the word Base to the beginning of the theme name so that it reads "Base.Theme.AppCompat.Light.DarkActionBar" I had the same issue today and this solution worked for me. FYI I am in Android Studio though, but hopefully the solution is similar for Eclipse. FYI here is a decent blog post on replacing the Actionbar with the Toolbar for when you are ready to do so: ...
I think you must be depending on "com.android.support:appcompat-v7:23.1.1" in your module settings. ActionBar has been deprecated. Just change your dependencies from 'com.android.support:appcompat-v7:23.1.1' to 'com.android.support:appcompat-v7:23.0.1' in "build.gradle". You can also change your style parent to "Theme.AppCompat.Light.NoActionBar". Try to use the Toolbar instead of ActionBar.
大體翻譯:如今的v7包依賴的ActionBar過時了,在"build.gradle"將依賴的版本改低點'com.android.support:appcompat-v7:23.1.1'-->'com.android.support:appcompat-v7:23.0.1'.
或者說將style改爲"Theme.AppCompat.Light.NoActionBar"
推薦各位嘗試去使用ToolBar替代ActionBarapp