cordova build android 错误问题(一)

cordova build android 下载gradle太慢 2.修改设置环境变量,CORDOVA_ANDROID_GRADLE_DISTRIBUTION_URL。然后解压缩到 C:\Users\Administrator\.gradle 文件夹中,下载慢导致失败。1.自己提前下载好 gralde-all.zip 压缩包。等下次使用的时候,解压缩出来使用。对于国内的链接地址下载太慢。等待了很长时间之后还会报错。默认第一次编译在线下载。 阅读详情

cordova build android 错误问题(一)

错误信息如下:

$ cordova build android
Android Studio project detected
ANDROID_HOME=E:\AndroidSDK
JAVA_HOME=D:\java\jdk
studio
Subproject Path: CordovaLib
Subproject Path: app
publishNonDefault is deprecated and has no effect anymore. All variants are now published.
Checking the license for package Android SDK Platform 26 in E:\AndroidSDK\licenses
Warning: License for package Android SDK Platform 26 not accepted.

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':CordovaLib'.
> 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 co mplete 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

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

* Get more help at https://help.gradle.org

BUILD FAILED in 1s
(node:12884) UnhandledPromiseRejectionWarning: Error: cmd: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':CordovaLib'.
> 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

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug
option to get more log output.

* Get more help at https://help.gradle.org

BUILD FAILED in 1s
    at ChildProcess.whenDone (G:\text2\platforms\android\cordova\node_modules\cordova-common\src\superspawn.js:169:23)
    at ChildProcess.emit (events.js:182:13)
    at maybeClose (internal/child_process.js:962:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:249:5)
(node:12884) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This
error originated either by throwing inside of an async function without a catch
 block, or by rejecting a promise which was not handled with .catch(). (rejectio n id: 1)
(node:12884) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

关键信息:

 You have not accepted the license agreements of the following SDK components:
  [Android SDK Platform 26].

解决方法:

在SDK Manager中下载对应的API,如:这个问题需下载API:26
然后再执行 Cordova build android ,
问题解决。
API26

执行 Cordova build android 后结果大致如下:

$ cordova build android
Android Studio project detected
ANDROID_HOME=E:\AndroidSDK
JAVA_HOME=D:\java\jdk
studio
Subproject Path: CordovaLib
Subproject Path: app
publishNonDefault is deprecated and has no effect anymore. All variants are now                            published.
The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.
        at build_ak0l64cj2wvbwh9zx7o9hoxor.run(G:\text2\platforms\android\app\build.gradle:143)
:CordovaLib:preBuild UP-TO-DATE
:CordovaLib:preDebugBuild UP-TO-DATE
:CordovaLib:compileDebugAidl UP-TO-DATE
:CordovaLib:compileDebugRenderscript UP-TO-DATE
:CordovaLib:checkDebugManifest UP-TO-DATE
:CordovaLib:generateDebugBuildConfig UP-TO-DATE
:CordovaLib:prepareLintJar UP-TO-DATE
:CordovaLib:generateDebugResValues UP-TO-DATE
:CordovaLib:generateDebugResources UP-TO-DATE
:CordovaLib:packageDebugResources UP-TO-DATE
:CordovaLib:platformAttrExtractor UP-TO-DATE
:CordovaLib:processDebugManifest UP-TO-DATE
:CordovaLib:processDebugResources UP-TO-DATE
:CordovaLib:generateDebugSources UP-TO-DATE
:CordovaLib:javaPreCompileDebug UP-TO-DATE
:CordovaLib:compileDebugJavaWithJavac UP-TO-DATE
:CordovaLib:processDebugJavaRes NO-SOURCE
:CordovaLib:transformClassesAndResourcesWithPrepareIntermediateJarsForDebug UP-TO-DATE
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:compileDebugAidl UP-TO-DATE
:CordovaLib:packageDebugRenderscript NO-SOURCE
:app:compileDebugRenderscript UP-TO-DATE
:app:checkDebugManifest UP-TO-DATE
:app:generateDebugBuildConfig UP-TO-DATE
:app:prepareLintJar UP-TO-DATE
:app:generateDebugResValues UP-TO-DATE
:app:generateDebugResources UP-TO-DATE
:app:mergeDebugResources UP-TO-DATE
:app:createDebugCompatibleScreenManifests UP-TO-DATE
:app:processDebugManifest UP-TO-DATE
:app:splitsDiscoveryTaskDebug UP-TO-DATE
:app:processDebugResources UP-TO-DATE
:app:generateDebugSources UP-TO-DATE
:app:javaPreCompileDebug UP-TO-DATE
:app:compileDebugJavaWithJavac UP-TO-DATE
:app:compileDebugNdk NO-SOURCE
:app:compileDebugSources UP-TO-DATE
:CordovaLib:mergeDebugShaders UP-TO-DATE
:CordovaLib:compileDebugShaders UP-TO-DATE
:CordovaLib:generateDebugAssets UP-TO-DATE
:CordovaLib:mergeDebugAssets UP-TO-DATE
:app:mergeDebugShaders UP-TO-DATE
:app:compileDebugShaders UP-TO-DATE
:app:generateDebugAssets UP-TO-DATE
:app:mergeDebugAssets UP-TO-DATE
:app:extractTryWithResourcesSupportJarDebug UP-TO-DATE
:app:transformClassesWithStackFramesFixerForDebug UP-TO-DATE
:app:transformClassesWithDesugarForDebug UP-TO-DATE
:app:transformClassesWithDexBuilderForDebug UP-TO-DATE
:app:transformDexArchiveWithExternalLibsDexMergerForDebug UP-TO-DATE
:app:transformDexArchiveWithDexMergerForDebug UP-TO-DATE
:CordovaLib:compileDebugNdk NO-SOURCE
:CordovaLib:mergeDebugJniLibFolders UP-TO-DATE
:CordovaLib:transformNativeLibsWithMergeJniLibsForDebug UP-TO-DATE
:CordovaLib:transformNativeLibsWithIntermediateJniLibsForDebug UP-TO-DATE
:app:mergeDebugJniLibFolders UP-TO-DATE
:app:transformNativeLibsWithMergeJniLibsForDebug UP-TO-DATE
:app:processDebugJavaRes NO-SOURCE
:app:transformResourcesWithMergeJavaResForDebug UP-TO-DATE
:app:validateSigningDebug
:app:packageDebug UP-TO-DATE
:app:assembleDebug UP-TO-DATE
:app:cdvBuildDebug UP-TO-DATE

BUILD SUCCESSFUL in 5s
47 actionable tasks: 1 executed, 46 up-to-date
Built the following apk(s):
        G:\text2\platforms\android\app\build\outputs\apk\debug\app-debug.apk

生成的.apk文件的存放在路径为:G:\text2\platforms\android\app\build\outputs\apk\debug\app-debug.apk
有什么不对的还请在下方留言或加以修正,不胜感激。

lumerical中DEVICE和MODE模块的交互使用(真的很干货!!可以自信的说网上绝对找不到比我更详细的步骤了) 几个脚本文件很重要! Lumerical仿真流程: 一、DEVICE: (1).建模并且运行完之后,在脚本提示符下键入以下脚本行以运行plotDopingProfile.lsf如图1(文件名如果索引不到的话就可以把文件直接用notepad++打开,然后把代码直接输入到device中script脚本中 如图2)脚本文件并生成下图 如图3: (图2) (图1) (图3) (2).仿真... 阅读详情

相关推荐

雾化器硬件设计:从N155驱动到PCB可量产实现

雾化器是典型的机电一体化嵌入式终端,其硬件设计本质是电源完整性、信号完整性与热-机械协同的系统工程。核心在于理解高压脉冲驱动原理(如2.4MHz固定频率匹配压电谐振)、电源域隔离机制(AGND/DGND/PGND分域设计)及约束驱动的PCB转化逻辑。技术价值体现在电气可靠性(如OTP/OLP保护)、生产可制造性(DFM合规焊盘与钢网)与环境鲁棒性(三防漆、散热过孔)。典型应用场景覆盖加湿器、医疗雾化仪与工业微流控设备。本文聚焦超声波雾化控制板的硬线实现路径,深入解析N155驱动芯片选型、网络标签工程误用陷阱

weixin_35649491的博客 618

cordova生成android的app项目目录后运行cordova build android出错

cordova build android 出错: Subproject Path: CordovaLib Subproject Path: app (node:10629) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: spawn EACCES 然

wang1144的专栏 3785

Xilinx SDK工程编译、链接、调试注意事项

1、添加工程 启动SDK时选取workspace,如下图所示: 对应的workpace文件夹中会生成如下几个文件: 如果当前workspace是首次加载工程,SDK会进入启动界面 点击Import Project,导入已有工程 点击Browse,添加工程路径,一个完整的工程包含一个bsp文件夹,一个HW文件夹,和一个src文件夹(添加C功能函数) 点击Fini...

Autumn_He的博客 1万+

android studio project detected ionic

ionic cordova build android报错 UnhandledPromiseRejectionWarning: CordovaError: Could not find an installed version of Gradle either in Android Studio, or on your system to install the gradle wrapper. P...

DeMeng33的博客 983

QComboBox设置最大显示数量多余的用滑动条,以及QComboBox::setMaxVisibleItems()不起作用的问题

QComoboBox是Qt封装的一个选择框的东西,但是我在使用过程中有一点感觉很不好,如图: 不论你往里面添加多少个它都会给你显示全部,甚至给你铺满全屏,后来看了官方文档发现有个setMaxVisibleItems()的方法,我欣喜若狂啊,终于特么的能解决了,但是,很遗憾,不知为啥,我设置上之后并没有起作用,依然会显示全部,后来搜了百度发现有个人是这样解决的 QComboBox *box = ne...

Aboveground的博客 4920

课设报告-超市收银系统 javaweb(附源代码)

超市收银系统由收银员输入顾客的会员卡卡号(若有卡),所购买的货号。从数据库中取出有关价格信息,在把这些信息返回给收银台,同时把收银台的销售总量和有关种类商品的剩余量以及该持卡顾客的消费情况交数据库存储以供查询。另外,对没有卡的消费不记录该顾客的消费情况扥个人信息,如果一个未持卡顾客一次购买满200元,可围棋发放一张会员卡,以后在该商场购物可享受9折优惠。

m0_71106830的博客 2975

Vue3.0入门 + Vant3.0移动端实践(三)使用Cordova打包Android App

接着上面两节,把做成的h5小应用打包成android的app放置在手机上看看效果。 如何把一个h5应用打包成android的app? 使用Cordova就是一种简单不错的办法。 当然也有其他的一些办法如使用HBuilderX这一强大的IDE工具,里面支持打包Android或ios的app,微信小程序等。或者一些第三方的打包平台,也支持把h5的应用打包成app,但有可能是收费的。 使用HBuilderX的话若开发体系都是基于HBuilder则是不错的选择,但太依赖于HBuilder。 而使用Cordo

猫哥 的沉淀、积累、总结。天天学习,好好向上...c/c++,嵌入式 linux,Android,HarmonyOS,AIOT) 7476

YOLOv11改进策略【卷积层】| TIP 2025 MFA 多阶段特征聚合 大核扩感受 + 多梯度融合,强效增强弱小目标特征

红外弱小目标尺寸极小、信噪比低,在特征传递中极易丢失信息;常规卷积感受野单一、梯度源不足,难以同时捕捉局部细节与全局上下文,导致小目标特征表达弱、检测漏检。因此提出多阶段特征聚合 MFA,用大核卷积+多分支+通道注意力强化小目标特征提取。

Limiiiing的博客 587

java build failed_cordova android build FAILED

$ cordova run androidAndroid Studio project detectedCHCP plugin after prepare hook:config-file set to http://.../chcp.jsonANDROID_HOME=/.../Library/Android/sdkJAVA_HOME=/Library/Java/JavaVirtualMachin...

weixin_30184337的博客 575

D16: OpenClaw + Notion API:知识管理新玩法

本文介绍了如何利用OpenClaw连接Notion API构建自动化知识管理系统。文章首先分析了传统知识管理的痛点,包括信息分散、更新不及时等问题,并对比了Notion与其他工具在API完整性、结构化程度等方面的优势。接着详细说明了Notion API的获取和授权流程,并设计了包含项目知识库、技术决策库和会议纪要库的三层架构系统。最后通过会议纪要自动归档的实战案例,展示了如何通过YAML配置实现从飞书会议到Notion的自动化知识沉淀流程。该方案能有效解决团队知识管理中的信息碎片化问题,提升协作效率。

刘一说的IT专栏 275

PCL 改进的RANSAC算法实现点云粗配准【2024最新版】

一种改进的RANSAC点云粗配准算法,具体改进见论文:“Pose Estimation using Local Structure-Specific Shape and Appearance Context”

点云侠的博客 37万+

Cordova封装打包vue H5项目到Android平台详解

安装Cordova npm install -g cordova 安装完成之后终端输入cordova显示下图即表示安装成功 创建Cordova项目 进入你要创建项目的目录执行: cordova create helloWorld helloWorld即为你的项目名 成功创建之后文件夹如下: 创建平台(这里是Android) 进入刚才创建的Cordova项目helloWorld中 cordova platform add android 如果需要添加指定版本的android则在后面加上版本号 co

伟大光荣正确的博客 1902

华为OD机试 - 打印机队列 - 优先队列(Python/JS/C/C++ 双机位C卷 200分)

这个问题要求模拟打印机的文件调度过程,关键在于正确处理每个打印机队列中的文件优先级和文件进入队列的顺序。优先级处理:每个文件有一个 1 到 10 的优先级,数字越大优先级越高,打印机应首先处理优先级最高的文件。在打印机 1 的队列中插入了 3 个文件,分别有不同的优先级,其中编号 3 的文件优先级最高,先被取出。因为打印的文件内容有轻重缓急之分,所以队列中的文件有1~10 不同的 优先级,其中数字越大优先级越高。在打印机 2 的队列中插入了 1 个文件,优先级为 1,因此它被首先取出。

学Java,找哪吒 1079

添加cordova-plugin-file-opener2后,打包出错

原文:添加cordova-plugin-file-opener2后,打包出错 报错如下:* What went wrong:Execution failed for task ':app:processDebugResources'.> Failed to execute aapt* Try:Run...

weixin_33742618的博客 361

Probability and Statistics - 4th edition

Probability and Statistics - 4th edition

SIMATIC S7-1200, S7-1500 PID 控制[手册]

SIMATIC S7-1200, S7-1500 PID 控制[手册]

cordova build android 失败

Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Error: cmd: Command failed with exit code 1 Error output: FAILURE: Build failed with an exception. * What went wrong: A problem occurred configu

qq_33616666的博客 1570

怀旧版电脑GBC模拟器

再现原版GBC掌机的界面,电脑运行连游戏界面都一样大小,很怀旧,很真实,(英文版)强烈推荐,很小的文件,很难才找到的。

Cordova build 时遇到 error: resource android:attr/dialogCornerRadius not found 的原因

错误描述 Cordova 项目 build 时报下面的错误 error: resource android:attr/dialogCornerRadius not found error: resource android:attr/fontVariationSettings not found error: resource android:attr/ttcIndex not found 错误...

zhichaosong的博客 1万+

visio安装包

Microsoft Office Visio 是一款专业的制图软件。利用经过更新的形状、协作工具和数据链接图表,创建专业级图表以简化复杂的信息。

第一次执行Cordova build android失败原因一则

第一次执行Cordova build android失败原因一则

gddghtd的博客 1413

cordova build android报错,ionic3-使用cordova打包android时报错

参考在2018-03-08使用cordova build android打包android包时出现错误。错误如下:错误详情BUILD FAILEDTotal time: 19.142 secsERROR: In FontFamilyFont, unable to find attribute android:ttcIndexFAILURE: Build failed with an except...

weixin_39945531的博客 750

cordova build android downloading,cordova build android 失败

问题描述cordova build android失败使用cordova build android命令后 一直在downloaddownload到这一句就失败了问题出现的环境背景及自己尝试过哪些方法尝试过改版本号 cordova 换成8.0.0后依然失败相关代码// 请把代码文本粘贴到下方(请勿用图片代替代码)Download https://maven.google.com/com/andro...

weixin_42472941的博客 353

cordova build android报错,运行cordova build -release android时出错

我想按照以下说明发布我的Android应用:但是,当我运行cordova build –release android我得到以下错误::lintVitalArmv7Release/Users/xxx/Documents/xxx/xxx/platforms/android/res/values/arrays.xml:3: Error: "country_codes" is not translate...

weixin_36254564的博客 754

cordova build android报错,cordova build android 失败

cordova build android 失败,已解决。命令:cordova build android;cordova 编译失败,错误信息如下:FAILURE: Build failed with an exception.* What went wrong:A problem occurred configuring project ':CordovaLib'.> Could not ...

weixin_39981632的博客 1503

ionic cordova build android 报Failed to execute aapt错误

Failed to execute aapt

随风飘的博客 1909

【Cordova】Cordova-运行 cordova build android遇到的问题

电脑因为驱动的原因被重装系统了,jdk和sdk都是重新安装的,配置环境变量完成之后, 打开重装系统之前创建的cordova项目, 运行:cordova build android 测试打包功能是否正常的时候,遇到了问题: 1.报错显示的是:your JAVA_HOME is invalid: 解决办法:这里的原因不知道是为啥,但是安装1.8.0_144的版本就可以了 2.接着运行cordova ...

mooonyuan的博客 6505

cordova build android 出现cordova build android Could not resolve all files for configuration ‘:classp

使用 cordova run android 运行时,出现错误 * What went wrong: A problem occurred configuring root project 'android'. > Could not resolve all files for configuration ':classpath'. > Could not resolve com.android.tools.build:gradle:3.0.0. Required by:

lyctdcq123的专栏 1630

cordova build android遇到的问题

一.下载gradle-2.2.1-all.zip不成功,一直在下载,卡在这个downloading http://services.gradle.org/distributions/gradle-2.2.1-all.zip这里,然后等很久后就会超时,大致两种报错:(我等了大半天的时间,没有等到结果就终止了,下面的错误是在网上看到的,自己记录一下) 1.java.net.unknownhostex

zsmurf的博客 9215

cordova build android 环境的坑

毕业设计的选题为一个app,native app学起来在时间上有些不足,因此选择了hybird app ;cordova就不介绍了,本文主要是写在cordova bulid android时所遇到的问题。 1:build app时所需要的依赖环境 (1)Java Jdk :https://www.oracle.com/technetwork/java/javase/downloa...

diandipi8532的博客 398
上一篇: 关于npm安装cordova错误解决办法
下一篇: cordova build android 错误问题(二)
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值