Aapt工具阻碍了一个全新的Android项目

Aapt工具阻碍了一个全新的Android项目,android,aapt,Android,Aapt,这种行为已经在命令行和eclipse新项目中重现。我什么也没碰 aapt p -M AndroidManifest.xml -S res -v Locale/Vendor pairs: / / / / Files: drawable-hdpi/icon.png Src: res/drawable-hdpi/icon.png drawable-ldpi/icon.png Src: res/drawable-ldpi/icon.png d

这种行为已经在命令行和eclipse新项目中重现。我什么也没碰

aapt p -M AndroidManifest.xml -S res -v
Locale/Vendor pairs:
   /
   /
   /
   /

Files:
  drawable-hdpi/icon.png
      Src: res/drawable-hdpi/icon.png
  drawable-ldpi/icon.png
      Src: res/drawable-ldpi/icon.png
  drawable-mdpi/icon.png
      Src: res/drawable-mdpi/icon.png
  layout/main.xml
      Src: res/layout/main.xml
  values/strings.xml
      Src: res/values/strings.xml
  AndroidManifest.xml
      Src: AndroidManifest.xml
applyFileOverlay for drawable
applyFileOverlay for layout
applyFileOverlay for anim
applyFileOverlay for animator
applyFileOverlay for interpolator
applyFileOverlay for xml
applyFileOverlay for raw
applyFileOverlay for color
applyFileOverlay for menu
applyFileOverlay for mipmap
    (new resource id icon from res/drawable-hdpi/icon.png)
    (new resource id icon from res/drawable-ldpi/icon.png)
    (new resource id icon from res/drawable-mdpi/icon.png)
    (new resource id main from res/layout/main.xml)
res/layout/main.xml:2: error: No resource identifier found for attribute 'orientation' in package 'android'
res/layout/main.xml:2: error: No resource identifier found for attribute 'layout_width' in package 'android'
res/layout/main.xml:2: error: No resource identifier found for attribute 'layout_height' in package 'android'
res/layout/main.xml:7: error: No resource identifier found for attribute 'layout_width' in package 'android'
res/layout/main.xml:7: error: No resource identifier found for attribute 'layout_height' in package 'android'
res/layout/main.xml:7: error: No resource identifier found for attribute 'text' in package 'android'
在运行Android平台工具版本3和2.3.3 SDK的64位Ubuntu上


谢谢你的帮助!非常感谢

您没有包括Android框架资源。使用-I选项,路径为查找框架资源的位置。apk。

您不包括Android框架资源。将-I选项与查找framework resources.apk的路径一起使用。

我也遇到了这个错误。我的解决方案是在必填字段或变量中填写完整路径和android jar的名称。如果aapk找不到它,这是它报告的错误消息。

我也收到了这个错误。我的解决方案是在必填字段或变量中填写完整路径和android jar的名称。如果aapk找不到它,这就是它报告的错误消息。

当您让Eclipse或
ant
执行其正常构建过程时会发生什么,包括调用
aapt
?我们可以看到res/layout/main.xml吗?当您让Eclipse或
ant
执行其正常构建过程时会发生什么,包括他们调用的
aapt
?我们能看看res/layout/main.xml吗?就是这样。aapt的文档中说,“我将一个现有包添加到基本包含集”,这一点非常模糊和不透明。他们实际上是在寻找特定平台的android.jar,它不是生成的项目代码的一部分。给像我这样的新手一张便条,就是这样。aapt的文档中说,“我将一个现有包添加到基本包含集”,这一点非常模糊和不透明。他们实际上是在寻找特定平台的android.jar,它不是生成的项目代码的一部分。给像我这样的新手一张纸条。