android 中 导SDK的apidemo的时候为什么工程SRC 报红叉,gen 包下没有R的文件。

解决方案 »

  1.   

    我编译了。windows下面的preferences,还是不好用,导其它工程的时候,没有问题啊,这个apidemo一直有问题。。
      

  2.   

    输出红色的
    [2010-08-16 17:25:48 - ApiDemos] libpng warning: Ignoring attempt to set cHRM RGB triangle with zero area
    [2010-08-16 17:25:48 - ApiDemos] D:\android_workspace\ApiDemos\res\values\strings.xml:365: error: Apostrophe not preceded by \ (in I'm on! :))
    [2010-08-16 17:25:48 - ApiDemos] D:\android_workspace\ApiDemos\res\values\strings.xml:366: error: Apostrophe not preceded by \ (in I'm off! :()
    [2010-08-16 17:25:48 - ApiDemos] D:\android_workspace\ApiDemos\res\values\strings.xml:640: error: Apostrophe not preceded by \ (in  The Android platform is a software stack for mobile devices including an
    [2010-08-16 17:25:48 - ApiDemos]  operating system, middleware and key applications. Developers can create
    [2010-08-16 17:25:48 - ApiDemos]  applications for the platform using the Android SDK. Applications are written
    [2010-08-16 17:25:48 - ApiDemos]  using the Java programming language and run on Dalvik, a custom virtual
    [2010-08-16 17:25:48 - ApiDemos]  machine designed for embedded use which runs on top of a Linux kernel.
    [2010-08-16 17:25:48 - ApiDemos] 
    [2010-08-16 17:25:48 - ApiDemos]  If you want to know how to develop applications for Android, you're in the
    [2010-08-16 17:25:48 - ApiDemos]  right place. This site provides a variety of documentation that will help you
    [2010-08-16 17:25:48 - ApiDemos]  learn about Android and develop mobile applications for the platform.
    [2010-08-16 17:25:48 - ApiDemos] 
    [2010-08-16 17:25:48 - ApiDemos]  An early look at the the Android SDK is also available. It includes sample
    [2010-08-16 17:25:48 - ApiDemos]  projects with source code, development tools, an emulator, and of course all
    [2010-08-16 17:25:48 - ApiDemos]  the libraries you'll need to build an Android application. What would it take
    [2010-08-16 17:25:48 - ApiDemos]  to build a better mobile phone?
      

  3.   

    是导入工程的时候  选择 android api版本问题      你看看你选择的是那个版本
      

  4.   

    我选择 API1.5  2.0 都试了。
      

  5.   

    我SDK是2.0的我导的是SDK1.5中的API,是这个问题吗。
    还可有办法吗。
      

  6.   

    把apidemo里面的版本改一下,好像里面有说明,忘了
      

  7.   

    项目 ==> preferences ==> java complier ==> 选1.6 试试
      

  8.   

    我觉得你可以把src里面的R文件删了,让系统自动生成到gen下面,有时候出现这种情况是因为R文件重复了
     还有就是Eclipse反应慢,加载的东西没有加载上,所以出现类似错误!
      

  9.   

    应该是不同版本解析资源文件不同,你看看你是在哪个版本里的apidemo,就用那个版本的sdk编译。