appcompat-v7:21.0.0′: No resource found that matches the given name: attr ‘android:actionModeShareDrawable’

This is likely because you haven’t set your compileSdkVersion to 21 in your build.gradle file. You also probably want to change your targetSdkVersion to 21. android { //… compileSdkVersion 21 defaultConfig { targetSdkVersion 21 } //… } This requires you to have downloaded the latest SDK updates to begin with. Once you’ve downloaded all the … Read more

How to use the new SD card access API presented for Android 5.0 (Lollipop)?

Lots of good questions, let’s dig in. 🙂 How do you use it? Here’s a great tutorial for interacting with the Storage Access Framework in KitKat: https://developer.android.com/guide/topics/providers/document-provider.html#client Interacting with the new APIs in Lollipop is very similar. To prompt the user to pick a directory tree, you can launch an intent like this: Intent intent … Read more

This Activity already has an action bar supplied by the window decor

I think you’re developing for Android Lollipop, but anyway include this line: <item name=”windowActionBar”>false</item> to your theme declaration inside of your app/src/main/res/values/styles.xml. Also, if you’re using AppCompatActivity support library of version 22.1 or greater, add this line: <item name=”windowNoTitle”>true</item> Your theme declaration may look like this after all these additions: <!– Base application theme. –> … Read more

tech