【发布时间】:2015-04-18 08:04:21
【问题描述】:
我在 linux 中使用 android studio 最新版本(具体来说是基本的 luna)。我成功安装了 jdk、android studio 和 sdk,android studio 完美地打开了我们,甚至我可以在我的应用程序上工作。但是当我构建应用程序时,它给出了错误 13:权限被拒绝,并在新标签中打开了一个黑色圆圈图像 png。
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
我不明白这个问题。我确实在互联网上搜索并尝试了很多方法,例如
-
使用 chmod 更改权限:
chmod +x /home/alex/android-studio/sdk/build-tools/android-4.2.2/dx
它执行成功,但对问题本身没有影响,
2.关闭并重新导入项目,
3.我也试过这个,
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 位系统。
有人可以帮忙吗?因为我真的很依赖它。
我的系统配置:(如果有用的话)
-OS 版本:0.2.1 “Luna”(32 位), 构建于:Ubuntu 12.04(“精确”)
-安装了 OpenJdk 7: java版本“1.6.0_34” OpenJDK 运行时环境 (IcedTea6 1.13.6) (6b34-1.13.6-1ubuntu0.12.04.1)
OpenJDK Client VM(build 23.25-b01,混合模式,共享)
【问题讨论】:
标签: android linux android-studio