Removing Support Library in Android Studio

Android Studio generates a project that uses Support Library by default. I personally do not like to use the support library if I can help it. Here are the steps to modify the project to not use support library.

Open build.gradle from your project. Locate the dependencies section.

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile ''

Remove the line for the compatibility library. After that the section should look like this.

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])

Save and close.

By default the app uses a theme that is available from the support library. This is not available from the core API. So we need to fix that. Open res/values/styles.xml. The style tag will look something like this:

<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
        <!-- Customize your theme here. -->

Change the parent to a theme that is available from the core SDK. For example:

<style name="AppTheme" parent="android:style/Theme.Holo.Light">
        <!-- Customize your theme here. -->

Note that with the core SDK you must prefix the theme name with android:style/.

Finally, fix the generated activity code. Make the activity class extend


5 thoughts on “Removing Support Library in Android Studio

  1. After having no luck on stackoverflow I finally received the answer here, thank you very much mobiarch! I just want to mention that I had to some build errors where R could not be found but after doing a Build | Clean Project and then a rebuild it seems to be working fine.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s