Android许可证状态未知?

时间:2019-06-03 12:59:55

标签: android flutter android-sdk-tools

对于应用程序开发,我下载并安装了Flutter sdk及其依赖的Android Studio Java。安装全部后,我出现了错误 用于检查{ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", "parameters": { "workflows_logicapp_xyz_name": { "defaultValue": " logicapp_xyz ", "type": "String" }, "connections_azureautomation_1_externalid": { "defaultValue": "/subscriptions/xyz6c051-f4ef-4a30-8ce7-c9fb99ff0xyz/resourceGroups/ResourceGroup-A/providers/Microsoft.Web/connections/azureautomation-123", "type": "String" } }, "variables": {}, "resources": [ { "type": "Microsoft.Logic/workflows", "apiVersion": "2017-07-01", "name": "[parameters('workflows_logicapp_xyz_name')]", "location": "region", "properties": { "state": "Enabled", "definition": { "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", "contentVersion": "1.0.0.0", "parameters": { "$connections": { "defaultValue": {}, "type": "Object" } }, "triggers": { "Recurrence": { "recurrence": { "frequency": "Minute", "interval": 1 }, "type": "Recurrence" } }, "actions": { "Create_job": { "runAfter": {}, "type": "ApiConnection", "inputs": { "body": { "properties": { "parameters": { "Uri": "http://10.xyz.0.xyz:443/BrowserWeb/servlet/BrowserServlet?, http:// 10.xyz.0.xyz:443/BrowserWeb/servlet/BrowserServlet?, http:// 10.xyz.0.xyz:443/BrowserWeb/servlet/BrowserServlet?" }, "runOn": "Hybrid_worker-Resourcegroup" } }, "host": { "connection": { "name": "@parameters('$connections')['azureautomation']['connectionId']" } }, "method": "put", "path": "/subscriptions/@{encodeURIComponent('xyz6c051-f4ef-4a30-8ce7-c9fb99ffxyz')}/resourceGroups/@{encodeURIComponent('DevOpsTestRG-B')}/providers/Microsoft.Automation/automationAccounts/@{encodeURIComponent('AAC-SUB-01')}/jobs", "queries": { "runbookName": "Hybridrunbook-Resourcegroup", "wait": false, "x-ms-api-version": "2015-10-31" } } }, "Create_job_2": { "runAfter": { "Create_job": [ "Succeeded" ] }, "type": "ApiConnection", "inputs": { "body": { "properties": { "parameters": { "configXml": "C://Users/devops/Desktop/ServiceMonitor/xyz_LoginPageMonitorConfig.xml" }, "runOn": "Hybrid account-Resourcegroup" } }, "host": { "connection": { "name": "@parameters('$connections')['azureautomation']['connectionId']" } }, "method": "put", "path": "/subscriptions/@{encodeURIComponent('4776c051-f4ef-4a30-8ce7-c9fb99ff0xyz')}/resourceGroups/@{encodeURIComponent('Resourcegroup-B')}/providers/Microsoft.Automation/automationAccounts/@{encodeURIComponent('XYZ-SUB-01')}/jobs", "queries": { "runbookName": "Hybridrunbook-Resource group", "wait": false, "x-ms-api-version": "2015-10-31" } } } }, "outputs": {} }, "parameters": { "$connections": { "value": { "azureautomation": { "connectionId": "[parameters('connections_azureautomation_1_externalid')]", "connectionName": "azureautomation-1", "id": "/subscriptions/4776c051-f4ef-4a30-8ce7-c9fb99ff0xyz/providers/Microsoft.Web/locations/northeurope/managedApis/azureautomation" } } } } } } ] } 。出现以下错误:

flutter doctor

然后在Flutter Android license status unknown的帮助下搜索后,我尝试使用 Android toolchain - develop for Android devices (Android SDK version 28.0.3) X Android license status unknown. Try re-installing or updating your Android SDK Manager. See https://developer.android.com/studio/#downloads or visit https://flutter.dev/setup/#android-setup for detailed instructions. 更新Android SDK,它再次产生以下错误:

PathToAndroidSDK --update

3 个答案:

答案 0 :(得分:1)

引用:https://robbinespu.gitlab.io/blog/2020/03/02/flutter-issue-android-license-status-unknown-on-windows/

在Android Studio中->工具-> SDK管理器-> Android SDK-> SDK工具 1.取消选中“隐藏过时的软件包” 2.选择Android SDK Tools(已淘汰)并应用

安装后,从命令提示符处尝试“ flutter doctor”。 如果某些许可证不被接受,则使用“ flutter doctor --android-licenses”来接受

答案 1 :(得分:1)

最后,我得到了如何解决未知状态的Android许可证的解决方案

首先,如果您正在观看此错误

Android工具链-为Android设备开发(Android SDK版本28.0.3) X And​​roid许可证状态未知。 尝试重新安装或更新您的Android SDK Manager。 有关详细说明,请参见https://developer.android.com/studio/#downloads或访问https://flutter.dev/setup/#android-setup

然后转到并卸载“ Android sdk工具” “已过时” ,然后重新安装。 然后,运行代码“ flutter doctor” 您将看到类似这样的消息:“如果不接受某些许可证,则使用“ flutter doctor --android-licenses”进行接受

如果遇到问题并无法回答“ y”,请运行代码,然后转到link并下载仅命令行工具并解压缩并放入 < C:\ Users \ i \ AppData \ Local \ Android \ Sdk \ tools \ bin中的em> sdkmanager文件 ,然后在此文件夹中运行cmd,然后输入 “ sdkmanager --licenses “ ,现在您可以开始了。

答案 2 :(得分:0)

一个漫长的夜晚后,我发现自己安装了一个错误的Java版本。

我解决了正确安装JDK 8并在android studio上设置jdk路径的问题。

之后

echo json_encode(array(
    'succeded'=> $succeded,
    'faild'=>$faild
));

当然也应该安装过时的工具

希望有帮助。对于到达这里的某人。