Androidプロジェクトをantでビルドしていたのですが、以下のエラーが発生してコンパイルできない現象が発生。
[renderscript] No RenderScript files to compile.
[echo] ----------
[echo] Handling Resources...
[aapt] Generating resource IDs...
[aapt] /path/to/Project/res/layout/about.xml:31: error: No resource identifier found for attribute 'contentDescription' in package 'android'
[aapt] /path/to/Project/res/layout/about.xml:2: error: Error: String types not allowed (at 'layout_width' with value 'match_parent').
[aapt] /path/to/Project/res/layout/about.xml:2: error: Error: String types not allowed (at 'layout_height' with value 'match_parent').
なんという事はない。android update projectコマンドに渡す–targetオプションでSDKのレベルを指定してやれば良かったのでした。
Updates an Android project (must already have an AndroidManifest.xml).
Options:
-l --library : Directory of an Android library to add, relative to this
project's directory.
-p --path : The project's directory. [required]
-n --name : Project name.
-t --target : Target ID to set for the project.
-s --subprojects: Also updates any projects in sub-folders, such as test
projects.
この説明ではターゲットに何を設定すればいいのかわからなくて…
–target 9を指定して、2.3を対象にしました。
それもそもそも
Error: The project either has no target set or the target is invalid. Please provide a --target to the 'android update' command.
このエラーが出たためにtarget指定することになったわけですが。

HOMMA Teppei

