eclipse 执行 aapt 时出错:无法运行程序,CreateProcess 错误=5,访问被拒绝:CreateProcess 错误=5,访问被拒绝

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/18473014/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 21:07:32  来源:igfitidea点击:

Error executing aapt: Cannot run program, CreateProcess error=5, Access is denied: CreateProcess error=5, Access is denied

androideclipseaccess-deniedaapt

提问by Samik Bandyopadhyay

Today I just updated the Android SDK on Windows 7 with the Android SDK Manager and started getting error during build in Eclipse which says

今天,我刚刚使用 Android SDK Manager 更新了 Windows 7 上的 Android SDK,并且在 Eclipse 中构建期间开始出现错误,上面写着

"Error executing aapt: Cannot run program ... CreateProcess error=5, Access is denied: CreateProcess error=5, Access is denied"

“执行 aapt 时出错:无法运行程序... CreateProcess 错误=5,访问被拒绝:CreateProcess 错误=5,访问被拒绝”

I'm using Eclipse Juno and Kepler. I've also tried the bundled Eclipse that comes with Android SDK but faced the same issue everywhere.

我正在使用 Eclipse Juno 和 Kepler。我也尝试过 Android SDK 附带的捆绑 Eclipse,但在任何地方都面临同样的问题。

I'm using Android build tool version 18.0.1-

我正在使用 Android 构建工具版本 18.0.1-

回答by Dr Evil

Go to your eclipse folder, open eclipse.ini and add the lines

转到您的 eclipse 文件夹,打开 eclipse.ini 并添加行

-vm
C:\Program Files\Java\jdk1.6.0_29\jre\bin\server\jvm.dll

Replace jdk1.6.0_29 with the version code of your jdk. These lines should be added above

将 jdk1.6.0_29 替换为您的 jdk 的版本代码。这些行应该在上面添加

-vmargs

回答by Ryan Shillington

It's Windows security that's not allowing that process to run. Here's what I did:

是 Windows 安全性不允许该进程运行。这是我所做的:

  • Open up Windows explorer, and navigate to aapt.exe (or whatever program is supposed to run)
  • Right click on it and choose "Properties"
  • Go to the "Security" tab and click the "Edit" button
  • Select your username in the top box and in the bottom one give "Full Control" or at least "Read & Execute"
  • Click OK to get rid of these boxes
  • 打开 Windows 资源管理器,并导航到 aapt.exe(或任何应该运行的程序)
  • 右键单击它并选择“属性”
  • 转到“安全”选项卡,然后单击“编辑”按钮
  • 在顶部框中选择您的用户名,并在底部选择“完全控制”或至少“读取和执行”
  • 单击“确定”去掉这些框

Now your user can execute that program. Yay!

现在您的用户可以执行该程序。好极了!