Android Studio错误13 = Linux中的权限被拒绝 [英] Android Studio error 13=permission denied in linux

查看:1360
本文介绍了Android Studio错误13 = Linux中的权限被拒绝的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在linux中使用的是android studio最新版本(具体来说是luna).我成功安装了jdk,android studio和sdk,android studio完美地打开了我们,甚至我也可以在我的应用程序上工作.但是当我构建应用程序时,错误13:权限被拒绝,并在新标签页中打开了一个黑色圆圈png.

i am using android studio latest version in linux(elementary luna to be specific). I installed jdk, android studio and sdk successfully, android studio opens us perfectly and even i can work on my app. but when i bulid app it gives error 13: permission denied and it opens a black circle image png in new tab.

Information:Gradle tasks [:app:compileDebugSources]
:app:preBuild
:app:preDebugBuild
:app:checkDebugManifest
:app:preReleaseBuild
:app:prepareComAndroidSupportAppcompatV72103Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42103Library UP-TO-DATE
:app:prepareDebugDependencies
:app:compileDebugAidl UP-TO-DATE
:app:compileDebugRenderscript UP-TO-DATE
:app:generateDebugBuildConfig UP-TO-DATE
:app:generateDebugAssets UP-TO-DATE
:app:mergeDebugAssets UP-TO-DATE
:app:generateDebugResValues UP-TO-DATE
:app:generateDebugResources UP-TO-DATE
:app:mergeDebugResources
:app:mergeDebugResources FAILED
/home/suUs12/AndroidStudioProjects/MyApplication/app/build/intermediates/exploded-aar/com.android.support/appcompat-v7/21.0.3/res/drawable-mdpi/abc_btn_radio_to_on_mtrl_000.png
Error:Error: Cannot run program "/home/suUs12/Android/Sdk/build-tools/21.1.2/aapt": error=13, Permission denied
Error:Execution failed for task ':app:mergeDebugResources'.
> /home/suUs12/AndroidStudioProjects/MyApplication/app/build/intermediates/exploded-aar/com.android.support/appcompat-v7/21.0.3/res/drawable-mdpi/abc_btn_radio_to_on_mtrl_000.png:
Error: Cannot run program "/home/suUs12/Android/Sdk/build-tools/21.1.2/aapt": error=13, Permission denied
Information:BUILD FAILED
Information:Total time: 30.305 secs
Information:2 errors
Information:0 warnings

我不明白这个问题.我确实在互联网上进行搜索,并尝试了许多方法,例如

i dont understand the problem. i did searched on internet and tried many methods like

  1. 使用chmod更改权限:

  1. changing permissions with chmod:

chmod + x/home/alex/android-studio/sdk/build-tools/android-4.2.2/dx

chmod +x /home/alex/android-studio/sdk/build-tools/android-4.2.2/dx

它成功执行,但对问题本身没有影响,

it executes successfully but with no effect on the problem itself,

2.关闭并重新导入项目,

2.closing and re-importing project,

3.i也尝试过这个

sudo apt-get install lib32stdc++
sudo apt-get install lib32z1

我得到以下结果

suUs12@suUs12:~/Android/Sdk$ sudo apt-get install lib32stdc++6
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package lib32stdc++6 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'lib32stdc++6' has no installation candidate

我猜这不是问题,因为我的系统是32位,并且是用于64位系统.

i guess this is not issue since my system is 32 bit and this is for 64 bit systems.

任何人都可以帮忙吗?因为我真的很期待它.

Can anyone help? since i am really counting on it.

我的系统配置:(如果有用)

my system configurations:(if useful)

-OS版本:0.2.1"Luna"(32位), 建立在:Ubuntu 12.04("Precise")

-OS Version: 0.2.1 "Luna" ( 32-bit ), Built on: Ubuntu 12.04 ( "Precise" )

安装的OpenJdk 7: Java版本"1.6.0_34" OpenJDK运行时环境(IcedTea6 1.13.6)(6b34-1.13.6-1ubuntu0.12.04.1)

-installed OpenJdk 7: java version "1.6.0_34" OpenJDK Runtime Environment (IcedTea6 1.13.6) (6b34-1.13.6-1ubuntu0.12.04.1)

OpenJDK客户端VM(内部版本23.25-b01,混合模式,共享)

OpenJDK Client VM (build 23.25-b01, mixed mode, sharing)

推荐答案

我正在ubuntu 14.04(LTS)32位上运行android studio 1.0.2,但我遇到了同样的问题. 只是去 "/home/suUs12/Android/Sdk/build-tools/21.1.2/" 然后右键单击" aapt "文件,属性->权限,然后选中"允许将文件作为程序执行". 然后关闭窗口.

I'm running android studio 1.0.2 on ubuntu 14.04 (LTS) 32 bit and i had the same problem. just go to "/home/suUs12/Android/Sdk/build-tools/21.1.2/" and then right click on 'aapt' file , properties -> permissions and check 'Allow executing file as program'. then close the window.

就我而言,在授予" aapt "文件权限后,我不得不对" dx "和" zipalign "文件放在同一目录(/home/suUs12/Android/Sdk/build-tools/21.1.2/)中,并且我能够使用android studio运行我的第一个应用程序.

In my case,after giving permission for 'aapt' file, I had to give the same permission for 'dx' and 'zipalign' files in the same directory (/home/suUs12/Android/Sdk/build-tools/21.1.2/) and I was able to run my first app using android studio.

这篇关于Android Studio错误13 = Linux中的权限被拒绝的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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