AVD 不会在虚拟设备上运行很多 API 级别。但是我在 SDK Manager 中安装了 API。它们也显示为已安装,但在 Extras
中- 文件夹,它们有这个红色图标,您可以在屏幕截图中看到
我错过了什么?
最佳答案
这是由错误/缺失引起的 source.properties
文件例如:我的 Google API 23 是相同的,但它丢失了
源属性
### 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
修复它的简单方法是删除包并重新安装它们,但首先检查它是否有效,因为包可能没问题。
关于android-studio - 为什么我的 Google API 没有正确安装到 Android Studio AVD?红色图标,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38863848/