8

While trying to clone Android O sample from github, project can't able to sync and give below error. Android studio give package unavailable, which can't able to install missing platform (android o).

Android O missing package

I am using android studio 2.3 and cloning android o example: https://developer.android.com/preview/o-samples.html#nc

Can any one suggest, how can I able to run cloned example?

pRaNaY
  • 24,642
  • 24
  • 96
  • 146

1 Answers1

8

To add the Android O items to Android Studio 2.3, I had to temporarily switch to the Canary channel in Android Studio:

Android Studio Channel Settings

Then, in the SDK Manager, I could download the O Developer Preview items:

SDK Manager, Showing O Developer Preview 1

...along with the 26-rc1 build tools, platform tools, and emulator:

SDK Manager, Showing SDK Tools Tab

That should get you past your current problems.

That project is messed up, in that it refers to a @mipmap/ic_launcher that does not exist. You need to get rid of android:icon="@mipmap/ic_launcher" from the <application> element of Application/src/main/AndroidManifest.xml, after which the app appears to work.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
  • Thanks you sir for your replay. I am trying and back to you. – pRaNaY Mar 22 '17 at 19:11
  • Great. Switching to the canary Chanel and downloaded android o sdk components. Then resolved icon issue and now I am able to run example. – pRaNaY Mar 22 '17 at 20:38
  • Mark I am on Android Studio 2.4 Preview 3, I have already downloaded Android O SDK Platform and Android Sdk Build-tools 26-rc1, but still unable to download the package and it's showing the same alert. – Paresh Mayani Mar 23 '17 at 12:46
  • @PareshMayani: I do not know what to tell you. I never use a preview edition of Android Studio, and so I have not tried 2.4 Preview 3. Sorry! – CommonsWare Mar 23 '17 at 12:55
  • I just try canary version to stay updated what's coming up and I was curious to know what is coming up with Android O and new studio version. Thanks though for replying back. Appreciate – Paresh Mayani Mar 24 '17 at 06:00