为什么我的Google API无法正确安装到Android Studio AVD?红色图标

时间:2016-08-10 03:42:22

标签: android-studio google-api avd

AVD不会在虚拟设备上运行许多API级别。但我在SDK Manager中安装了API。它们也显示为已安装但在Extras - 文件夹中,它们有这个红色图标,您可以在屏幕截图中看到

here in the Screenshot

我错过了什么?

2 个答案:

答案 0 :(得分:1)

这是由错误/丢失source.properties文件引起的,例如:我的Google API 23相同且缺少

source.properties

### Android Tool: Source of this archive.
#Fri Aug 19 04:03:37 CEST 2016
Addon.NameDisplay=Google APIs
Addon.NameId=google_apis
Addon.VendorDisplay=Google Inc.
Addon.VendorId=google
AndroidVersion.ApiLevel=23
Pkg.Desc=Android + Google APIs
Pkg.License=Terms and Conditions.... (here was licence but I removed it because it was too big)
Pkg.LicenseRef=android-sdk-license
Pkg.Revision=1
Pkg.SourceUrl=https\://dl.google.com/android/repository/addon.xml

修复它的简单方法是删除软件包并重新安装它们,但首先要检查它是否有效,因为软件包可能没问题。

答案 1 :(得分:1)

根据您的屏幕截图,您错过了特定Google API的基本api级别。 有关详细信息http://tools.android.com/recent/sdkmanagerfixes

,请参阅此处