Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No resource found - Theme.AppCompat.Light.DarkActionBar

AppCompat is a library project. You need to reference the library project in your android project.

Check the topic Adding libraries with resources.

Update

Adding material theme should be the way. Check https://material.io/develop/android/docs/getting-started for more details.


If you're using Eclipse, then add the reference library into your project as the following steps:

  1. Right-click your project in the Project Explorer View.
  2. Click Properties.
  3. Click Android in the Properties window.
  4. In the Library group, click Add...
    • See the image below.
  5. Select the library. Click OK.
  6. Click the OK button again in the Properties window.

The "Add" button in the project Properties window, Android section, Library group.


If you are using Android Studio then just add the dependency

dependencies {
     implementation 'com.android.support:appcompat-v7:25.0.1'
}

to app/build.gradle. And that will work


For anyone out there using VS2015, I was getting this error too, and it turns out I hadn't added the library to the project...

Install-Package Xamarin.Android.Support.v7.AppCompat

If you are using Eclipse just copying android-support-v7-appcompat.jar to libs folder will not work if you are going to use resources.

Follow steps from here for "Adding libraries with resources".