任务'执行失败':CordovaLib:processDebugResources'。 > com.android.ide.common.process.ProcessException:无法执行aapt [英] Execution failed for task ':CordovaLib:processDebugResources'. > com.android.ide.common.process.ProcessException: Failed to execute aapt

查看:617
本文介绍了任务'执行失败':CordovaLib:processDebugResources'。 > com.android.ide.common.process.ProcessException:无法执行aapt的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在学习如何通过测试应用程序使用Ionic,但我已经有两天这个问题了。我已经找到了可能的解决方案,但没有一个对我有用。

I am learning how to use Ionic by doing a test application but I have had this problem for two days. I have looked for possible solutions but none has worked for me.

当我想在我的Android手机上测试我的应用程序时出现问题。
使用此命令时 ionic cordova运行android 并给我以下错误

The problem arises when I want to test my application on my android phone. When using this command ionic cordova run android and gives me the following error


失败:构建因异常而失败。

FAILURE: Build failed with an exception.

出了什么问题:

任务执行失败' :CordovaLib:processDebugResources'。
com.android.ide.common.process.ProcessException:无法执行aapt

Execution failed for task ':CordovaLib:processDebugResources'. com.android.ide.common.process.ProcessException: Failed to execute aapt

[错误]运行cordova运行android时出错(退出代码1 )。

[ERROR] An error occurred while running cordova run android (exit code 1).

我不确定是什么问题。我的应用程序非常简单,它基于Ionic的模板离子启动myApp标签,我正在使用离子原生插件Geolocation

I'm not sure what's wrong. My application it's very simple it's based on Ionic's template ionic start myApp tabs and I'm using Ionic native plugin Geolocation.

我已经运行离子信息并返回此

cli packages:
    @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.4
    Cordova Platforms  : android 6.3.0
    Ionic Framework    : ionic-angular 3.9.2

我还查看了官方Cordova的文档 Android开发和我的Java和Android路径都可以。

I also checked the official Cordova's doc for Android development and my paths for Java and Android are OK.

还有离子cordova要求一切看起来都没问题。

Also with ionic cordova requirements everything looks to be OK.

Java JDK: installed 1.8.0
Android SDK: installed true
Android target: installed android-26,android-25,android-23
Gradle: installed C:\Program Files\Android\Android Studio\gradle\gradle-4.1\bin\gradle

感谢您的帮助。

推荐答案

对我们来说,我们只需降级版​​本的android

For us, we just had to downgrade version of android

cordova platform rm android
ionic cordova platform add android@6.3.0

这篇关于任务'执行失败':CordovaLib:processDebugResources'。 > com.android.ide.common.process.ProcessException:无法执行aapt的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆