问题描述:

weex项目在运行npm run android跑安卓端时出现以下错误,尝试了网上的很多方法,包括Stack Overflow上的大神的建议依然没有解决,问题如下:

Error: Error: Command failed: ./gradlew  assembleDebug

isLibProject: false, isAppProject: true

weex_plugin: []  FAILURE: Build failed with an exception.

* What went wrong: A problem occurred configuring project ':app'.

> You have not accepted the license agreements of the following SDK components:

[Android SDK Platform 26, Android SDK Build-Tools 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

问题背景:

①:操作系统Mac

②:已经安装Android Studio并在Android Studio下载模拟器(详情请百度)

③:已经配置jdk并设置路径(详情请百度)

④:已经运行yes | sudo ~/Library/Android/sdk/tools/bin/sdkmanager --licenses 同意licenses

解决方法:

网上找的答案都是因为缺少了以上的某一步,对本人没什么作用,以下方法适用于以上配置都正确的前提下仍然报错。

仔细看看: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.

按照这个意思,打开Android Studio的SDK管理器,点击SDK Tools,点击Show Package Details如图,会发现报错的Android SDK build-tools 26.0.0并没有安装,点击安装后apply ->ok,随后重新npm run android即可:

结果:

成功后结果如右图模拟器,左边为npm run ios成功后的效果,至此,weex项目web、iOS、Android三端配置均已完成。

(web端的图没截,不用什么配置,关键在于配置iOS及安卓端)

Tips:npm run android 并没有像npm run ios那样会自动打开模拟器,而是会报找不到模拟器错误,打开Android Studio,启动安卓模拟器,重新npm run andriod即可。

Weex Project (npm run android)-Error: Error: Command failed相关推荐

  1. Error: cmd: Command failed with exit code ENOENT

    在Webstorm中执行命令: cordova build android 时的提示: Error: cmd: Command failed with exit code ENOENT 在网上搜索后: ...

  2. clang++.exe: error: linker command failed with exit code 1 错误解决方法

    clang++.exe: error: linker command failed with exit code 1 错误解决方法 错误信息如下: Build command failed. Erro ...

  3. 使用SVN clang: error: linker command failed with exit code 1 (use -v to see invocation)

    2019独角兽企业重金招聘Python工程师标准>>> 再把项目上传到SVN仓库上,然后再拉到本地编译时出现如下错误 ld: library not found for -lxxxx ...

  4. ld: -pie can only be used when targeting iOS 4.2 or later clang: error: linker command failed with e

    把Deployment Target 改为4.3或以后  图片:屏幕快照 2014-10-13 16.56.51.png  版权声明:本文为博主原创文章,未经博主允许不得转载. 转载于:https:/ ...

  5. phpmailer SMTP ERROR: Password command failed: 526 Authentication failure[0] 阿里云企业邮箱

    解决办法: 开启企业邮箱SMTP发信功能 使用管理员用户登录域管理控制台,依次选择组织与用户>员工帐号管理,单击对应的账号名,勾选开启POP3/SMTP服务和开启IMAP/SMTP服务,然后单击 ...

  6. phpmailer 发送Outlook邮件时535 5.7.3 authentication unsuccessful错误的解决办法 谷歌邮箱 SMTP ERROR: Password command

    在尝试使用我的office 365 E5开发者账号使用phpmailer进行发件时,被535 5.7.3 authentication unsuccessful这个错误困扰了很久,在国内外网站找了非常 ...

  7. iOS ld:2 duplicate symbols for architecture arm64 clang:error:linker commang failed with exit ...

    当我们运行程序 .修改代码.或者添加第三方或者SDK的时候经常会出现下面的问题 ld:2 duplicate symbols for architecture arm64 clang:error:li ...

  8. Xcode出现( linker command failed with exit code 1)错误总结

    以下文章转自https://www.cnblogs.com/xsyl/p/6085844.html 1,看看是不是有新添加的文件跟之前文件同名 2,错误信息中出现了某个类的名字,去原文件中看看#imp ...

  9. 添加第三方类库造成的linker command failed with exit code 1 (use -v to see invocation)的错误调试

    linker command failed with exit code 1 (use -v to see invocation)这个错误貌似遇见并不止一次,当我想用某个第三方类库的时候(如SBJso ...

最新文章

  1. WSS 代码执行的权限提升
  2. SMO算法(比较好的讲解)
  3. 系统架构师学习笔记_第十二章_连载
  4. Caused by: java.lang.NoSuchMethodException: onClick_Flashlight [class android.view.View]
  5. 计算机word基础知识菜单,Word试卷模板_电脑基础知识_IT/计算机_资料
  6. 服务链路追踪(Spring Cloud Sleuth)
  7. 敏捷制造:并不是你想像的矛盾体
  8. js中报错 ajax不存在,AJAX
  9. lodash和debounce
  10. oss按量付费_ACP云计算笔记—VPCamp;OSS
  11. qq 实现连接内网_如何穿透内网稳定进行远程桌面?花生壳盒子来搞定
  12. 深圳市商务局2022年电子商务创新发展扶持计划跨境电商通关监管场所服务奖励项目申报指南
  13. 【2013年总结】思维跌宕起伏,生命颠簸曲折的一年
  14. Java之美[从菜鸟到高手演变]之Java学习方法
  15. 百度2019Q3财报和战略分析
  16. java和jdbc操作数据库MySQL
  17. 怎样修改IOS程序名称
  18. 计算机怎么把磁盘内存分给其他盘,怎么把未分配的内存分给d盘
  19. 示波器中的Trigger
  20. java实现阿里云OSS上传下载

热门文章

  1. postgresql数据库用户名密码验证失败
  2. 人工智能过于发达可能将后患无穷
  3. ogre研究之第一个程序(二)
  4. OSChina 周四乱弹 ——我高考,媳妇还在读小学
  5. 让云×××—微软虚拟化远程直播
  6. 敏捷游戏:从硬币游戏学习Scrum敏捷方法
  7. Apache Kafka(二)- Kakfa 安装与启动
  8. 微信小程序+微信公众号开发总结
  9. python面向对象编程类的成员总结
  10. Hadoop(一)之初识大数据与Hadoop