`
kh477kh
  • 浏览: 35813 次
社区版块
存档分类
最新评论

解决导入Android-sample出错问题

 
阅读更多

解决导入Android-sample出错问题
2011年07月26日
  1、错误信息:
  [2011-07-26 17:18:25 - ApiDemos] F:\android\android-sdk_r12-windows\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-07-26 17:18:25 - ApiDemos]  operating system, middleware and key applications. Developers can create
  [2011-07-26 17:18:25 - ApiDemos]  applications for the platform using the Android SDK. Applications are written
  [2011-07-26 17:18:25 - ApiDemos]  using the Java programming language and run on Dalvik, a custom virtual
  [2011-07-26 17:18:25 - ApiDemos]  machine designed for embedded use which runs on top of a Linux kernel.
  [2011-07-26 17:18:25 - ApiDemos]
  [2011-07-26 17:18:25 - ApiDemos]  If you want to know how to develop applications for Android, you\'re in the
  [2011-07-26 17:18:25 - ApiDemos]  right place. This site provides a variety of documentation that will help you
  [2011-07-26 17:18:25 - ApiDemos]  learn about Android and develop mobile applications for the platform.
  [2011-07-26 17:18:25 - ApiDemos]
  [2011-07-26 17:18:25 - ApiDemos]  An early look at the the Android SDK is also available. It includes sample
  [2011-07-26 17:18:25 - ApiDemos]  projects with source code, development tools, an emulator, and of course all
  [2011-07-26 17:18:25 - ApiDemos]  the libraries you'll need to build an Android application. What would it take
  [2011-07-26 17:18:25 - ApiDemos]  to build a better mobile phone?
  [2011-07-26 17:18:25 - ApiDemos] )
  [2011-07-26 17:18:25 - ApiDemos] F:\android\android-sdk_r12-windows\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-07-26 17:18:25 - ApiDemos] F:\android\android-sdk_r12-windows\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-07-26 17:18:25 - ApiDemos] F:\android\android-sdk_r12-windows\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-07-26 17:18:25 - ApiDemos] F:\android\android-sdk_r12-windows\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').
  解决办法:修改文件ApiDemos\res\values\strings.xml 把该文件中所有 ' 转义成 \'
  涉及的行数:
      365行:I\'m off!
      366行:I\'m on!
      635行:If you want to know how to develop applications for Android, you\'re in the
      641行:the libraries you\'ll need to build an Android application. What would it take
  2、关于Conversion to Dalvik format failed with error 1错误的解决:
  A:我的办法,直接把引用错误的jar删掉。
  B:网上转载:
  android低版本工程(如1.5)放到高版本环境中(如2.2)可能会上述错误,解决方法如下:
  1。 如果不修改android sdk版本,则使用project clean 命令作用于某工程即可。
  (该处理方式只是在高版本中兼容了低版本工程,未真正意义上的升级)
  2。 如果修改android sdk版本,则需要以下几个步骤:
  1)修改SDK
  选择工程,build path --> configure build path ---> library 删除引用的低版本SDK,
  然后add External JARs,选择高版本SDK,OK,保存
  2)修改classpath文件
  该文件可能存在该项:
  3) 修改AndroidManifest.xml
  在AndroidManifest.xml文件中,application标签后添加
  4) 修改default.properties(很重要)
  该文件最后一行(前面没用#的)target=android-3 该成target=android-8,保存。
  再看看你的工程和新建的android 2.2的工程结构就一样了。
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics