Ionic Build Android在Mac OS X 10.10 Yosemite上失败



Ionic/Corodva在我的Mac OS X 10.10和iOS平台上工作文件,但它未能构建android,我如何才能成功添加平台android。安卓api 19安装

my.bash_profile:

export ANT_HOME=/Users/ayman/ANT

出口PATH=$PATH:/usr/local/bin:/Users/ayman/adt/sdk/platform-tools:$ANT_HOME/bin:/Users/ayman-adt/sdk/tools;

这就是错误:

BUILD FAILED/Users/ayman/adt/sdk/tools/ant/BUILD.xml:892:执行此行时发生以下错误:/Users/ayman/adt/sdk/tools/ant/build.xml:894:以下错误执行此行时发生:/Users/ayman/adt/sdk/tools/ant/build.xml:906:以下错误执行此行时发生:/Users/ayman/adt/sdk/tools/ant/build.xml:283:执行失败:java.io.IOException:无法运行程序"/Users/ayman/adt/sdk/build-tools/android-4.4W/dx"(在目录中"/Users/ayman/desktop/androidtest/platforms/android"):错误=13,权限在被拒绝java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)位于java.lang.Runtime.exec(Runtime.java:620)org.apache.tools.ant.taskdefs.launcher.Java13CommandLauncher.exec(Java13CommonLauncher.java:58)网址:org.apache.tools.ant.taskdefs.Execute.slaunch(Execute.java:428)org.apache.tools.ant.taskdefs.Execute.Execute(Execute.java:442)org.apache.tools.ant.taskdefs.ExecTask.runExecute(ExecTask.java:628)网址:org.apache.tools.ant.taskdefs.ExecTask.runExec(ExecTask.java:669)网址:org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:495)网址:com.android.ant.DexExecTask.runDx(DexExecTask.java:272)com.android.ant.DexExecTask.runDx(DexExecTask.java:235)com.android.ant.DexExecTask.preDexLibraries(DexExecTask.java:154)com.android.ant.DexExecTask.execute(DexExecTask.java:210)org.apache.tools.ant.UnnknownElement.execute(UnknownElement.java:292)位于sun.reflect.GeneratedMethodAccessor4.invoke(未知源)sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)位于java.lang.reflect.Method.ioke(Method.java:483)org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)网址:org.apache.tools.ant.Task.aperform(Task.java:348)org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)在org.apache.tools.ant.UnnknownElement.execute(UnknownElement.java:292)位于sun.reflect.GeneratedMethodAccessor4.invoke(未知源)sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)位于java.lang.reflect.Method.ioke(Method.java:483)org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)网址:org.apache.tools.ant.Task.aperform(Task.java:348)org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:396)在org.apache.tools.ant.UnnknownElement.execute(UnknownElement.java:292)位于sun.reflect.GeneratedMethodAccessor4.invoke(未知源)sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)位于java.lang.reflect.Method.ioke(Method.java:483)org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)网址:org.apache.tools.ant.Task.aperform(Task.java:348)org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)在com.android.ant.IfElseTask.execute(IfElseTask.java:124)org.apache.tools.ant.UnnknownElement.execute(UnknownElement.java:292)位于sun.reflect.GeneratedMethodAccessor4.invoke(未知源)sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)位于java.lang.reflect.Method.ioke(Method.java:483)org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)网址:org.apache.tools.ant.Task.aperform(Task.java:348)org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)在com.android.ant.IfElseTask.execute(IfElseTask.java:124)org.apache.tools.ant.UnnknownElement.execute(UnknownElement.java:292)位于sun.reflect.GeneratedMethodAccessor4.invoke(未知源)sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)位于java.lang.reflect.Method.ioke(Method.java:483)org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)网址:org.apache.tools.ant.Task.aperform(Task.java:348)org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)在org.apache.tools.ant.UnnknownElement.execute(UnknownElement.java:292)位于sun.reflect.GeneratedMethodAccessor4.invoke(未知源)sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)位于java.lang.reflect.Method.ioke(Method.java:483)org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)网址:org.apache.tools.ant.Task.aperform(Task.java:348)org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:396)在org.apache.tools.ant.UnnknownElement.execute(UnknownElement.java:292)位于sun.reflect.GeneratedMethodAccessor4.invoke(未知源)sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)位于java.lang.reflect.Method.ioke(Method.java:483)org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)网址:org.apache.tools.ant.Task.aperform(Task.java:348)org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)在com.android.ant.IfElseTask.execute(IfElseTask.java:120)org.apache.tools.ant.UnnknownElement.execute(UnknownElement.java:292)位于sun.reflect.GeneratedMethodAccessor4.invoke(未知源)sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)位于java.lang.reflect.Method.ioke(Method.java:483)org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)网址:org.apache.tools.ant.Task.aperform(Task.java:348)org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)在org.apache.tools.ant.UnnknownElement.execute(UnknownElement.java:292)位于sun.reflect.GeneratedMethodAccessor4.invoke(未知源)sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)位于java.lang.reflect.Method.ioke(Method.java:483)org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)网址:org.apache.tools.ant.Task.aperform(Task.java:348)org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:396)在org.apache.tools.ant.UnnknownElement.execute(UnknownElement.java:292)位于sun.reflect.GeneratedMethodAccessor4.invoke(未知源)sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)位于java.lang.reflect.Method.ioke(Method.java:483)org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)网址:org.apache.tools.ant.Task.aperform(Task.java:348)org.apache.tools.ant.Target.execute(Target.java:435)org.apache.tools.ant.Target.performTasks(Target.java:456)org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)网址:org.apache.tools.ant.Project.executeTarget(Project.java:1364)org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)网址:org.apache.tools.ant.Project.executeTargets(Project.java:1248)org.apache.tools.ant.Main.runBuild(Main.java:851)org.apache.tools.ant.Main.startAnt(Main.java:235)org.apache.tools.ant.slaunch.Launcher.run(Launcher.java:280)org.apache.tools.ant.slaunch.Launcher.main(Launcher.java:109)导致通过:java.io.IOException:error=13,权限在被拒绝java.lang.UNIXProcess.forkAndExec(本机方法)位于java.lang.UNIXProcess.(UNIXProcess.java:185)java.lang.ProcessImpl.start(ProcessImpl.java:134)java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)。。。93更多

总时间:5秒命令的错误代码1:带参数的ant:debug,-f,/Users/ayman/desktop/androidtest/platforms/android/build.xml,-Dut.dir=ant build,-Dgen.abstral.dir=ant gen错误:/用户/ayman/desktop/androidtest/platforms/android/cordova/build:命令失败,退出代码为2在ChildProcess.whenDone(/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/susuperpawn.js:131:23)位于ChildProcess.emit(events.js:98:17)在maybeClose(child_process.js:755:16)位于Process.ChildProcess.handle.onext(child_Process.js:822:5)

提前感谢

尝试

export ANDROID_HOME=/Users/your/path/to/ANDROIDSDK

在平台添加之前

无法运行程序"/Users/ayman/adt/sdk/build-tools/android-4.4W/dx"(在目录"/Users/ayman/desktop/androidtest/platforms/android"中):error=13,拒绝权限

听起来你有权限问题。我会将权限更改为755或77。

问候,

我只需安装更多版本的SDK构建工具(从21到18.0.1 )就解决了这个问题

相关内容

  • 没有找到相关文章

最新更新