Android Studio 13 error = enabled on Linux

I am using the latest version of Android studio on linux (elementary moon for a specific one). I installed jdk, android studio and sdk successfully, android studio opens to us perfectly, and even I can work on my application. but when I am a bulid application, it gives error 13: permission is denied and opens a new png page on the draft circle in a 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 do not understand the problem. I searched the Internet and tried many methods such as

  • change permissions with chmod:

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

it is successful, but does not affect the problem itself,

2. close and re-import the project,

3.i also tried this,

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

and I get the following result

 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 

I think this is not a problem, since my system is 32 bit, and this is for 64-bit systems.

Can anyone help? since I really count on it.

my system configurations: (if useful)

-OS Version: 0.2.1 "Moon" (32-bit), Built on: Ubuntu 12.04 ("Accurate")

-opened OpenJdk 7: java version "1.6.0_34" OpenJDK working environment (IcedTea6 1.13.6) (6b34-1.13.6-1ubuntu0.12.04.1)

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

+5
source share
12 answers

I am running android studio 1.0.2 on ubuntu 14.04 (LTS) 32 bit and I had the same problem. just go to / home / suUs 12 / Android / Sdk / build-tools / 21.1.2 /, and then right-click the 'aapt' file, properties โ†’ permissions and check the box โ€œAllow file to run as programโ€. then close the window. in my case, after granting permission for the "aapt" file, I had to provide the same permission for the "dx" and "zipalign" files in the same directory (/home/suUs12/Android/Sdk/build-tools/21.1.2 /), and I was able to launch my first application using Android studio.

+16
source

This problem is associated with insufficient authority. If you change your user as "root" and you open Android studio, this problem will be solved. For ex

Open terminal

$ sudo -i

[enter your password]: ********

root @ pc-name: ~ $ cd / home / username /.../android-studio/bin

root @ pc-name: ~ $. / studio.sh

+1
source

The problem with the file not found with aapt was not related to this file, but to the * .so files that it is trying to use. The first thing I did first was to run sudo yum install zlib.i686 ncurses-libs.i686 bzip2-libs.i686 to get the necessary 32-bit * .so files. I found out about the missing * .so files by running aapt outside the studio. I also found that there were several files that were read or read only for writing, which must be executable in these directories. Android studio / bin Android studio / JRE / bin Android studio / JRE / JRE / bin Android studio / gradle / gradle-2.14.1 / bin

The fsnotifier files and the 2 * .sh file in the first bin directory. All files in the two jre directories and the gradle file in the last directory should have been chmod 755. After that, I no longer receive a popup about fsnotifier, and the gradle assembly does not receive a permission error. Running as root does not help when there is a problem with missing executables.

+1
source

Remove the build tool and reload it, fixing my problem.

0
source

If this can help, I decided after granting full execute permissions ( chmod a+x ) to all executables in /opt/android-bundle/sdk/build-tools/$VERSION/ ( aapt , dx and zipalign ).

0
source

just reinstall the version of the build tool, and then go to the folder where sdk is installed and in the build tool file "aapt" and change the permissions from "property" everything to read and write and check "Allow the file to run as a program" and then close it . thereby solve this problem.

0
source

I solved this problem:

 chmod +x /User/Library/Android/sdk/build-tools/23.0.1/aapt chmod +x /User/Library/Android/sdk/build-tools/23.0.1/dx chmod +x /User/Library/Android/sdk/build-tools/23.0.1/zipalign 
0
source

You can reinstall androidstudio in / opt / folder. This is a shared folder. I turn to the official web vedio on how to install androidstudio and solve the problem. I almost tried every way on the Internet, but it didnโ€™t work. Actually, this is just a resolution issue.

0
source

In my case, the section in which I saved Sdk was mounted with the default option in / etc / fstab, which in turn included the default noexec option, which prohibits execution for all files in this section.

Then I edited this line in fstab, adding exec, leaving a list of "user defaults exec" options for this section.

0
source

I solved this problem: Right-click on the main folder, like Android-Studio, and then go to the "Properties" section, then click "Allow" and check the "CheckBox" for "Allow the file to run as a program." Then run Android Studio In Terminal :)

0
source

Grant Root permission for your Android studio with

chmod -777 YourAndroidStudioFolder

0
source

as stated in the message:

 Error: Cannot run program "/home/suUs12/Android/Sdk/build-tools/21.1.2/aapt": error=13, Permission denied 

you do not have permission. just go to /home/suUs12/Android/Sdk/build-tools/21.1.2/ and delete the aapt file.

-1
source

Source: https://habr.com/ru/post/1213534/


All Articles