将ApiDemos导入eclipse后,出错,src和mainfest文件都出错了,
开始是给出这样的提示
Apostrophe not preceded by \ (in I'm on! :))
Apostrophe not preceded by \ (in I'm off! :()
中间的都是这样的 Error: String types not allowed (at 'layout_width' with value 'match_parent').这是怎么回事呢 嗯 怎么弄好呢
开始是给出这样的提示
Apostrophe not preceded by \ (in I'm on! :))
Apostrophe not preceded by \ (in I'm off! :()
中间的都是这样的 Error: String types not allowed (at 'layout_width' with value 'match_parent').这是怎么回事呢 嗯 怎么弄好呢
src里面的错误是不是在src下产生了一个R文件,你可以把它删除!
换了很多版本的SDK 包,还是没能解决。
最后放弃了,重新建立一个工作空间,重新导入工程,再没出现类似问题。期待有高手的解答。
Apple\'s new magic mouse
第二个是因为match_parent是在android2.2才出现的用来代替fill_parent的,二者的意思是相同的
源文件路径\res\values\strings.xml:24: error: Apostrophe not preceded by \ (in 写入的字符串)
在其中 ' 符号前面加 \ 构成转移字符 \' 就行了7L正解!!!
这个问题往往出在使用旧版本的Android应用上。
如果在更新旧版本的Android应用时,更改了Eclipse项目文件中project.properties和default.properties文件中的target的值,或者更改了文件中的<uses-sdk android:minSdkVersion="15" />,都会出现新版本中出现的属性值,在旧版本中不能识别的问题,所以就有报出类似“String types not allowed (at 'layout_height' with value 'match_parent')”的错误。可以不使用“match_parent”,而使用“fill_parent”,就不会报错。