Android Studio Unable To Import Wearableextender Notificationmanagercompat And Remoteinput
I have a project class with the following imports: import android.app.Activity; import android.app.Fragment; import android.app.Notification; import android.app.PendingIntent; impo
Solution 1:
Make sure that you put the following entry into your application's build.gradle file to provide the necessary dependencies:
dependencies {
compile'com.android.support:support-v4:20.0+'
}
The version number is important, if you specify an older version it will be missing the new Notification code for wearables.
Solution 2:
Google has moved some of these tools into the standard libraries. For example, WearableExtender
is in Android.app.Notification
now. Try ditching the import statements giving you problems, and let Android Studio suggest what to import. Lots of Google's guides have outdated or otherwise incorrect code right now, as they have recently rolled out Google Play Services 5 and other official releases of preview products.
Post a Comment for "Android Studio Unable To Import Wearableextender Notificationmanagercompat And Remoteinput"