科尔多瓦当失败尝试建立与错误&QUOT Android应用程序,命令失败,退出code 2英寸Linux的科尔、应用程序、命令、错误

2023-09-06 06:42:55 作者:撩爆你的少女心

我在使用Ubuntu的Gnome 14.04 64位(目前)内核3.19.0-33泛型。

I'm using Ubuntu Gnome 14.04 64 Bit (for the moment) with kernel 3.19.0-33-generic.

我创建了一个新的应用程序(一个干净的,无插件,与内容无www文件夹),试图建立它。在bash的类型后科尔多瓦构建Android我得到这个错误:

I created a new app (a clean one, no plugin, no www folder with content) to try to build it. After type in the bash "cordova build android" I get this error:

Running command: /home/aby/Desktop/testApp/platforms/android/cordova/build 
[Error: Android SDK not found. Make sure that it is installed. If it is not at the default location, set the ANDROID_HOME environment variable.]
ERROR building one of the platforms: Error:/home/aby/Desktop/testApp/platforms/android/cordova/build: Command failed with exit code 2
You may not have the required environment or OS to build this project
Error: /home/aby/Desktop/testApp/platforms/android/cordova/build: Command failed with exit code 2

现在,如果你 printenv | grep的机器人

您将获得

ANDROID_HOME=/opt/android-sdk-linux
ANDROID_PLATFORM_TOOLS=/opt/android-sdk-linux/platform-tools
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/opt/android-sdk-linux/tools:/opt/android-sdk-linux/platform-tools:/opt/android-sdk-linux/tools:/opt/android-sdk-linux/platform-tools:/home/aby/bin:/home/aby/opt/jdk8/jdk1.8.0_45/bin:/opt/android-sdk-linux/tools:/opt/android-sdk-linux/platform-tools:/opt/android-sdk-linux/tools:/opt/android-sdk-linux/platform-tools
ANDROID_SDK=/opt/android-sdk-linux

您可以看到这两个变量的存在,其实之前我跑科尔多瓦构建Android 我不得不使用科尔多瓦平台添加的android 和它的作品没有问题。

You can see that the variables exist, in fact before I run cordova build android I had to use cordova platform add android and its works with no problem.

所以,我发现这个错误,并试图像Android的更新一些解决方案(项目),或删除,并没有成功重新安装。

So I found this Bug, and tried some solution like update android(project) or remove and install it again with no success.

我重装了Andoroid SDK,并更新了/.bashrc,在/.profile和〜/ .pam_enviroment与环境的价值,也该没有帮助。

I reinstall the Andoroid SDK, and updated the "/.bashrc", "/.profile" and "~/.pam_enviroment" with the environment values and also this not help.

那么,如何解决这一问题?如何建立我的应用程序没有错误?我缺少什么?(如果你认为你需要另一个信息,请告诉我)。

So how can I fix this? How can I build my app with no error? What I missing?(If you consider that you need another information please tell me).

谢谢,在前进。

推荐答案

最后我能解决我的问题,当我改变所有者/集团到了Android SDK文件夹和权限/工具/机器人

At the end I could fix my problem when I change the "Owner" / "Group" to the android sdk folder and Permission to "/tools/android".

Here一个链接到我的previous问题,解决(至少对我来说),以修复此错误。

Here a link to my previous question, and the solution (at least for me) to fix this error.

 
精彩推荐
图片推荐