Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Package id platform: android-O not available

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?

like image 650
pRaNaY Avatar asked Mar 22 '17 18:03

pRaNaY


People also ask

Where is the Android SDkmanager?

To open the SDK Manager from Android Studio, click Tools > SDK Manager or click SDK Manager in the toolbar. If you're not using Android Studio, you can download tools using the sdkmanager command-line tool.

How to update Android Studio manually?

On the Android Studio landing page, select Configure > Check for Update. From your Android Studio application toolbar, select Help > Check for Updates.


1 Answers

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.

like image 86
CommonsWare Avatar answered Oct 04 '22 21:10

CommonsWare