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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With