TheDevMan
TheDevMan

Reputation: 5954

Android Wear error

I am trying out an Android wear project on syncing build.gradle I am getting below error.

Error:
uses-sdk:minSdkVersion 8 cannot be smaller than version 9 declared in library com.google.android.gms:play-services-wearable:5.0.77
Error:Execution failed for task ':mobile:processDebugManifest'.
> Manifest merger failed : uses-sdk:minSdkVersion 8 cannot be smaller than version 9 declared in library com.google.android.gms:play-services-wearable:5.0.77

Does this mean if I implement android wear for API 18 and more then I will not be able to support API 8 phones? (I know Android wear supports API 18 and more)

This is something strange...

Thanks!

Upvotes: 0

Views: 741

Answers (2)

Sam Dozor
Sam Dozor

Reputation: 40734

As of version 4.0 of Google Play Services, froyo (API 8) is no longer supported. That said, you have options. You can still build an app that uses the latest APIs in Google Play Services, but you must:

  1. The error you're receiving is from the manifest merger - it sees that there's a discrepancy between the uses-sdk declaration in the manifest of Google Play Services, and the min-sdk declaration in your application's manifest - so it fails to merge them. Use the APIs available in the Gradle Manifest merger to force it to accept your value. I believe Markers is what you're looking for: docs.
  2. You must make sure, by checking Build.VERSION.SDK_INT at runtime, that Froyo devices will not try to use any APIs in Google Play Services. This would cause a crash.

Upvotes: 5

ataulm
ataulm

Reputation: 15334

It means that your min-sdk must be set to 9, because one of your dependencies has a min-sdk of 9.


At the time of writing this, active devices with API8 make up 0.7% of all active devices.

Dashboard

Upvotes: 1

Related Questions