在网上找的方法,试了一下,问题解决了。
首先,没有R文件是个大问题。布局有错误
查看 res/values/styles.xml 下的报错点。
<style name="AppBaseTheme" parent="Theme.AppCompat.Light">
把这个改成
<style name="AppBaseTheme" parent="android:Theme.Light">
路径: res/values-11/styles.xml
<style name="AppBaseTheme" parent="Theme.AppCompat.Light">
把这个改成
<style name="AppBaseTheme" parent="android:Theme.Holo.Light">
路径: res/values-14/styles.xml
<style name="AppBaseTheme" parent="Theme.AppCompat.Light.DarkActionBar">
把这个换成
<style name="AppBaseTheme" parent="android:Theme.Holo.Light.DarkActionBar">
main.xml中
<item
android:id="@+id/action_settings"
android:orderInCategory="100"
android:title="@string/action_settings"
app:showAsAction="never"/>
把这个中的app换成android
<item
android:id="@+id/action_settings"
android:orderInCategory="100"
android:title="@string/action_settings"
android:showAsAction="never"/>
等读完workspace后R文件还没出来的clean一下就好了