Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 546
Yunchou Li Avatar asked Oct 19 '22 20:10

Yunchou Li


1 Answers

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
like image 161
jal Avatar answered Oct 22 '22 11:10

jal