Search code examples
androidintellij-ideaandroid-support-libraryintellij-14

Add Android Support Library to get access to AppCompatActivity


Sorry for my ignorance, but I'm a complete noob in developing Android applications.

I'm using IDEA 14 and have a tiny working application (using SDK API 25, targeting Android 4.1.2) where the main activity derives from Activity. Now I want it to derive from AppCompatActivity, but this class is not found. What package I need to install using the SDK Manager and what changes I need to do in my (ANT-, not Gradle-based) IDEA project to use the AppCompatActivity.


Solution

  • use this on your app gradle file

    compile 'com.android.support:appcompat-v7:25.1.0'