解决导入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的工程结构就一样了。
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值