包ID平台:android-O不可用 [英] Package id platform: android-O not available
问题描述
尝试从github克隆 Android O 示例时,项目无法同步并给出以下错误. Android Studio给出了软件包不可用,该软件包无法安装缺少的平台(android o).
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 studio 2.3并克隆android o示例: https://developer.android.com/preview/o-samples.html#nc
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?
推荐答案
要将Android O项目添加到Android Studio 2.3,我不得不暂时切换到Android Studio中的Canary频道:
To add the Android O items to Android Studio 2.3, I had to temporarily switch to the Canary channel in Android Studio:
然后,在SDK Manager中,我可以下载O Developer Preview项目:
Then, in the SDK Manager, I could download the O Developer Preview items:
...以及26-rc1构建工具,平台工具和仿真器:
...along with the 26-rc1 build tools, platform tools, and emulator:
那应该使您摆脱当前的问题.
That should get you past your current problems.
该项目搞砸了,因为它引用了一个不存在的@mipmap/ic_launcher
.您需要从Application/src/main/AndroidManifest.xml
的<application>
元素中删除android:icon="@mipmap/ic_launcher"
,之后该应用程序似乎可以正常工作.
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.
这篇关于包ID平台:android-O不可用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!