2

I'm trying to use Theme from AppCompat as parent for mine but seems like I am unable to include resources. eg:

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <style name="CustomActionBarTheme"
           parent="@style/Theme.AppCompat.Light.DarkActionBar">
    </style>
</resources>

gives me an error:

Error:Execution failed for task ':processDebugResources'. com.android.ide.common.internal.LoggedErrorException: Failed to run command: G:\Android\android-studio\sdk\build-tools\19.0.3\aapt.exe package -f --no-crunch -I G:\Android\android-studio\sdk\platforms\android-19\android.jar -M E:\Studio\Git\face_rec_android\build\manifests\debug\AndroidManifest.xml -S E:\Studio\Git\face_rec_android\build\res\all\debug -A E:\Studio\Git\face_rec_android\build\assets\debug -m -J E:\Studio\Git\face_rec_android\build\source\r\debug -F E:\Studio\Git\face_rec_android\build\libs\face_rec_android-debug.ap_ --debug-mode --custom-package in.amolgupta.helpingfaceless Error Code: 1 Output: E:\Studio\myapp\build\res\all\debug\values\values.xml:127: error: Error retrieving parent for item: No resource found that matches the given name '@style/Theme.AppCompat.Light.DarkActionBar'.

I have tried including the jar file which apparently doesn't have resources but mainly played around with build.gradle like

dependencies {
        compile 'com.android.support:appcompat-v7:19.1.+'
    }

Any way I can make this work? Couldn't import as module from extra because of there was no build.gradle file there.

hypd09
  • 1,183
  • 1
  • 15
  • 23

1 Answers1

0

You need to download this lib from SDK Manager which placed in Android SDK folder then go to the sdk folder/extras/android/v7/ find .jar lib file and put this file into library folder of your project.

Govtart
  • 332
  • 1
  • 9