导入ApiDemos项目报错的解决方法

九月 15, 2011

最近开始学习Android,拿着一本书就开始鼓捣,一开始看了书本的内容后,导入ApiDemo的项目,谁知道控制台就报错了:

[2011-09-11 19:30:29 - ApiDemos] D:\Android\android-sdk-windows\platforms\android-4\samples\ApiDemos\res\values\strings.xml:365: error: Apostrophe not preceded by \ (in I'm on! :))
[2011-09-11 19:30:29 - ApiDemos] D:\Android\android-sdk-windows\platforms\android-4\samples\ApiDemos\res\values\strings.xml:366: error: Apostrophe not preceded by \ (in I'm off! :()
[2011-09-11 19:30:29 - ApiDemos] D:\Android\android-sdk-windows\platforms\android-4\samples\ApiDemos\res\values\strings.xml:643: error: Apostrophe not preceded by \ (in  The Android platform is a software stack for mobile devices including an
[2011-09-11 19:30:29 - ApiDemos]  operating system, middleware and key applications. Developers can create
[2011-09-11 19:30:29 - ApiDemos]  applications for the platform using the Android SDK. Applications are written
[2011-09-11 19:30:29 - ApiDemos]  using the Java programming language and run on Dalvik, a custom virtual
[2011-09-11 19:30:29 - ApiDemos]  machine designed for embedded use which runs on top of a Linux kernel.
[2011-09-11 19:30:29 - ApiDemos]
[2011-09-11 19:30:29 - ApiDemos]  If you want to know how to develop applications for Android, you're in the
[2011-09-11 19:30:29 - ApiDemos]  right place. This site provides a variety of documentation that will help you
[2011-09-11 19:30:29 - ApiDemos]  learn about Android and develop mobile applications for the platform.
[2011-09-11 19:30:29 - ApiDemos]
[2011-09-11 19:30:29 - ApiDemos]  An early look at the the Android SDK is also available. It includes sample
[2011-09-11 19:30:29 - ApiDemos]  projects with source code, development tools, an emulator, and of course all
[2011-09-11 19:30:29 - ApiDemos]  the libraries you'll need to build an Android application. What would it take
[2011-09-11 19:30:29 - ApiDemos]  to build a better mobile phone?
[2011-09-11 19:30:29 - ApiDemos] )
[2011-09-11 19:30:29 - ApiDemos] D:\Android\android-sdk-windows\platforms\android-4\samples\ApiDemos\res\layout\scrollbar3.xml:87: error: Error: No resource found that matches the given name (at 'text' with value '@string/scrollbar_3_text').
[2011-09-11 19:30:29 - ApiDemos] D:\Android\android-sdk-windows\platforms\android-4\samples\ApiDemos\res\layout\scrollbar3.xml:100: error: Error: No resource found that matches the given name (at 'text' with value '@string/scrollbar_3_text').
[2011-09-11 19:30:29 - ApiDemos] D:\Android\android-sdk-windows\platforms\android-4\samples\ApiDemos\res\layout\scrollbar3.xml:117: error: Error: No resource found that matches the given name (at 'text' with value '@string/scrollbar_3_text').
[2011-09-11 19:30:29 - ApiDemos] D:\Android\android-sdk-windows\platforms\android-4\samples\ApiDemos\res\layout\scrollbar3.xml:129: error: Error: No resource found that matches the given name (at 'text' with value '@string/scrollbar_3_text').
[2011-09-11 19:30:29 - ApiDemos] D:\Android\android-sdk-windows\platforms\android-4\samples\ApiDemos\res\xml\advanced_preferences.xml:32: error: Error: No resource found that matches the given name (at 'summaryOn' with value '@string/summary_on_advanced_toggle_preference').
[2011-09-11 19:30:29 - ApiDemos] D:\Android\android-sdk-windows\platforms\android-4\samples\ApiDemos\res\xml\advanced_preferences.xml:32: error: Error: No resource found that matches the given name (at 'summaryOff' with value '@string/summary_off_advanced_toggle_preference').

 

一开始看到这个,居然有点不值所错了,于是上网搜索,发现遇到这个问题的人还真不少,但是没有人说怎么解决。没办法,自己看错误信息,一看,差点晕死….他一开始就告诉我什么问题了【Apostrophe not preceded by \】,单引号前面没有【\】,就这么简单……..手动打开strings.xml,然后把【’】改成【\’】,刷新一次,不报错了……

[2011-09-11 19:30:29 - ApiDemos] D:\Android\android-sdk-windows\platforms\android-4\samples\ApiDemos\res\values\strings.xml:365: error: Apostrophe not preceded by \ (in I'm on! :))

posted in Android, 学习日志 by 暗黑游侠

Follow comments via the RSS Feed | 留下评论 | Trackback URL

2 Comments to "导入ApiDemos项目报错的解决方法"

  1. U盘安全管理 wrote:

    敲代码的就更要细心啊

  2. 暗黑游侠 wrote:

    确实,作为一个程序员,犯下如此错误让我自己都觉得汗颜 [YCT:23]

Leave Your Comment

[YCT:33] [YCT:32] [YCT:31] [YCT:30] [YCT:29] [YCT:28] [YCT:27] [YCT:26] [YCT:25] [YCT:24] [YCT:23] [YCT:22] [YCT:21] [YCT:20] [YCT:19] [YCT:18] [YCT:17] [YCT:16] [YCT:15] [YCT:14] [YCT:13] [YCT:12] [YCT:11] [YCT:10] [YCT:09] [YCT:08] [YCT:07] [YCT:06] [YCT:05] [YCT:04] [YCT:03] [YCT:02] [YCT:01]
 
首页 | Google | 百度 |  全部文章 |  关于我 | 
Creative Commons License
本博客采用创作共用协议,转载要求: 署名-非商业性使用-相同方式共享 3.0 Unported License
Powered by Wordpress and MySQL. Theme by Shlomi Noach, openark.org