gpt4 book ai didi

Ionic 3 中的 Android SDK 平台 26 许可证错误

转载 作者:太空宇宙 更新时间:2023-11-03 11:27:32 25 4
gpt4 key购买 nike

我正在尝试使用 ionic cordova run android --device --stacktrace 在我的 Android 设备上运行我的 Ionic 3 项目,但是,我有以下输出:

...

Checking the license for package Android SDK Platform 26 in C:\Android\android-sdk\licenses Warning: License for package Android SDK Platform 26 not accepted.

FAILURE: Build failed with an exception.

  • What went wrong: A problem occurred configuring root project 'android'.

You have not accepted the license agreements of the following SDK components: [Android SDK Platform 26]. Before building your project, you need to accept the license agreements and complete the installation of the missing components using the Android Studio SDK Manager. Alternatively, to learn how to transfer the license agreements from one workstation to another, go to http://d.android.com/r/studio-ui/export-licenses.html

阅读其他问题,人们建议使用 Android Studio SDK 管理器并安装最新版本,因为那样我会被询问许可证并且必须接受它们,所以我安装了 Android 8.0 (Oreo) 和 Android API 27是最后可用的更新,但是,我从未被问及任何许可证并且错误仍然存​​在。我的设备通过 USB 电缆连接到 PC (Windows 10),并且启用了编程器模式和 USB 调试。我该怎么做才能解决这个问题?

我的 SDK 管理器:

My SDK manager

更新:

我已经运行了命令 sdkmanager --licensesC:\Android\sdk\tools\binC:\Users\User\AppData\Local\Android\sdk\tools\bin文件夹和所有丢失的许可证已被接受,但错误仍然存​​在。

我的 cordova-android 版本在 package.json : "cordova-android": "~6.3.0"config.xml : <engine name="android" spec="~6.3.0" /> (已经尝试使用 6.3.06.2.0 没有成功)

报错后:

Checking the license for package Android SDK Platform 26 in C:\Android\android-sdk\licenses Warning: License for package Android SDK Platform 26 not accepted.

但我在 C:\Android\android-sdk 中没有许可证文件夹, 就在 C:\Android\sdk .我如何为 Ionic 检查许可证所在的文件夹?

ionic info :

cli packages: (C:\Users\User\AppData\Roaming\npm\node_modules)

@ionic/cli-utils : 1.19.0
ionic (Ionic CLI) : 3.19.0

global packages:

cordova (Cordova CLI) : 7.1.0

local packages:

@ionic/app-scripts : 3.1.0
Cordova Platforms : none
Ionic Framework : ionic-angular 3.9.2

System:

Node : v6.11.2
npm : 3.10.10
OS : Windows 10

Environment Variables:

ANDROID_HOME : C:\Android\android-sdk

Misc:

backend : pro

最佳答案

在 SDK 文件夹中,您必须在命令提示符下运行。

...\sdk\tools\bin

输入这条命令

sdkmanager "platforms;android-26"

关于Ionic 3 中的 Android SDK 平台 26 许可证错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48026963/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com