I am receiving a crash with the following message while migrating an AppCompatActivity to a WearableActivity.
Caused by: java.lang.IllegalStateException: Could not find wearable shared library classes. Please add uses-library android:name="com.google.android.wearable" android:required="false" /> to the application manifest
I was following this link for enabling ambient mode in my application: Keeping Your App Visible
I have the following in my manifest and gradle respectively:
<uses-library android:name="com.google.android.wearable"
android:required="false" />
…
minSdkVersion 22
targetSdkVersion 22
compile 'com.google.android.support:wearable:1.2.0'
provided 'com.google.android.wearable:wearable:1.0.0'
compile 'com.google.android.gms:play-services-wearable:7.5.0'
I have taken these directly from the link (hope I got that right).
My device is running the following versions:
Android Wear - 1.1.1.1929530
Google Play Services - 7.5.76 (2002306-534)
Android OS - 5.1.1
I'm guessing that the library that supplies android.support.wearable.activity.WearableActivity should be bundled on the device but isn't there.