开发者

Aapt tool chokes on a brand new Android project

开发者 https://www.devze.com 2023-02-26 19:54 出处:网络
This behavior has been reproduced on both a command-line and an eclipse new project.I have not touched a thing.

This behavior has been reproduced on both a command-line and an eclipse new project. I have not touched a thing.

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
apply开发者_JAVA百科FileOverlay 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'

On 64-bit Ubuntu running Android Platform-Tools version 3 with 2.3.3 SDK.

Thanks for your help! Much appreciated!


You are not including the Android framework resources. Use the -I option with the path of where to find the framework resources .apk.


I got this error, too. My solution was to fill in the full path AND the name of the android jar in the required field or variable. If aapk can't find it this is the error message it reports.

0

精彩评论

暂无评论...
验证码 换一张
取 消