Package id platform: android-O not available

2019-02-17 07:11发布

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?

1条回答
一纸荒年 Trace。
2楼-- · 2019-02-17 07:35

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.

查看更多
登录 后发表回答