Andriod: How to set lib path for aapt command?

I was trying to compile an Android project using the command line on Windows. When I use aapt to generate R file, it throws an error like 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 found that Theme.Appcompact.Light.DarkActionBar is associated with the APPcompat_v7 flopper while the floder is in the libs. How can I let the compiler know where to find the library I want?

+3


source to share


1 answer


I know it too late or you may have found the answer already, but post anyway:



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

      

+2


source







All Articles