当前位置: 动力学知识库 > 问答 > 编程问答 >

android - Andriod:How to set lib path for aapt command?

问题描述:

I was trying to compile Android project using command line in Windows. When I use aapt to generate R file, it comes out an error as below:

 D:\SampleProject\MyApplication>aapt package -f -m -J ./gen -S ./app/src/main/res

-I "D:\ProgramInstall\Android\Android SDK\platforms\android-21\android.jar" -M

./app/src/main/AndroidManifest.xml

.\app\src\main\res\values\styles.xml:4: error: Error retrieving parent for item:

No resource found that matches the given name 'Theme.AppCompat.Light.DarkAction

Bar'.

I've found that the Theme.Appcompact.Light.DarkActionBar is related to the APPcompat_v7 floder while the floder is under in the libs floder, How can I let the complier know where to find the lib it need?

网友答案:

I know its too late or you may have already found the answer also but still posting: D:\SampleProject\MyApplication>aapt package --auto-add-overlay -f -m -J ./gen -S ./app/src/main/res -S "path_to_prebuilts\prebuilts\devtools\extras\android\support\v7\appcompat\res\" -I "D:\ProgramInstall\Android\Android SDK\platforms\android-21\android.jar" -M ./app/src/main/AndroidManifest.xml

分享给朋友:
您可能感兴趣的文章:
随机阅读: