今天在我导入一些安卓项目的源码的时候会出现style.xml 和MAIN.xml 等错误, 网上的方法试了各种clean各种fix等方法都是不能解决。最后去国外论坛得到解决

来源:互联网 发布:手机时间同步软件 编辑:程序博客网 时间:2024/06/04 19:35
方法如下     首先,没有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一下就好了
1 0
原创粉丝点击