CommonsWare provided the right steps, but I still fought because I lacked the details so that I knew exactly what to do (being new to Android Studio and Android).
I found a blog post that explains the details here, and it worked for me: https://mobiarch.wordpress.com/2015/04/17/removing-support-library-in-android-studio
Here's what he says (I added extra help):
Open build.gradle from your project. Find the dependency section.
dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) compile 'com.android.support:appcompat-v7:22.0.0' }
Delete 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 application uses a theme available from the support library. This cannot be obtained from the main API. Therefore, we need to fix it. Open res/values/styles.xml . The style tag will look something like this:
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> </style>
Change the parent to a theme accessible from the main SDK. For instance:
<style name="AppTheme" parent="android:style/Theme.Holo.Light"> </style>
Rename properties in activity xml files, such as app:showAsAction - android:showAsAction .
Extract activity classes from Activity instead of ActionBarActivity and AppCompatActivity . You will need to press Alt + Enter on the Activity after making the changes to add import android.app.Activity at the top of the file. See the example below:
Edit:
import android.support.v7.app.ActionBarActivity; public class DisplayMessageActivity extends ActionBarActivity { . . . }
in
import android.app.Activity; public class DisplayMessageActivity extends Activity { . . . }
And the same for any other actions that extend ActionBarActivity and AppCompatActivity
Finally, run the Build | Clean Project Build | Clean Project and Build | Rebuild Project Build | Rebuild Project to sort current build errors.