while running react native app i got this error - android

i already installed the build tools 23.0.1.but i got this error.
java.io.IOException: Cannot run program "/root/Android/Sdk/build-tools/23.0.1/aapt": error=2, No such file or directory

First make sure there is respective file exist or not, then please try this some action, that might solve your problem:
update latest android sdk tools
or
clean and rebuild after sync build.gradle
or
invalid cache /restart
if you are using jenkins then try this command in terminal: sudo apt-get install lib32stdc++6 lib32z1
if all the option didn't work just follow this link: Ant debug and ant release failed and "aapt" IOException error=2, No such file or directory" why can't I build my gradle on jenkins?
Hope this will help for you.

Related

Gradle Build Exception : AAPT process not ready to receive commands

This might be duplicate question but after trying all solution I'm not able to solve following error:
Error:Execution failed for task ':app:mergeDebugResources'.
> Error: java.util.concurrent.ExecutionException: java.lang.RuntimeException: AAPT process not ready to receive commands
I tried all except one solution:
sudo apt-get install lib32stdc++6
sudo apt-get install lib32z1
what exactly commands will be before executing this commands?? and if anyone have other solution than this please tell me, It will be very useful..
linux 64ver, install
lib32stdc++6(or lib32stdc++5)
lib32z1(maybe its name is lib32zlib)
you can search them here ,to confirm their real names in you linux distro repo. https://pkgs.org/
Go to Project structure by clicking (ctrl+shift+alt+s), in that go to Project tab change Gradle Version to 3.2 and Project Version to 2.2 .
This works fine for me.
The answer is simple .
inside the gradle module app change the build tool version to 23.0.3 , gradle version to 2.2.2

Android studio build error on ubuntu install

i have recently installed android studio on my newly installed OS ubuntu 14.10, i installed the main android studio file in my documents folder, and then downloaded and installed the sdk build tools file in the documents folder aswell and linked the two via the sdk in android studio, i also downloaded all the latest apis and build tools, however when i build my first app
Error:Error: Cannot run program "/home/user/Documents/android-sdk-linux/build-tools/21.1.1/aapt": error=2, No such file or directory
and
Error:Execution failed for task ':app:mergeDebugResources'.
/home/user/AndroidStudioProjects/Epic3/app/src/main/res/drawable-mdpi/ic_launcher.png: Error: Cannot run program "/home/user/Documents/android-sdk-linux/build-tools/21.1.1/aapt": error=2, No such file or directory
Any ideas?
Thanks
I faced the same problem and in my case is that im running Ubuntu 64 version. I solved that running the following command line:
apt-get install -qq -y libc6:i386 libgcc1:i386 libstdc++6:i386 libz1:i386

Could not find method include() for arguments [:app] on root project Android Studio

I am trying to import an android project to Android studio,after importing and then clicking on the green run button :
FAILURE: Build failed with an exception.
Where:
Build file
'/home/myusername/prjcts/nomadx/settings.gradle' line: 1
What went wrong:
A problem occurred evaluating root project 'nomadx'.
Could not find method include() for arguments [:app] on root project 'nomadx'.
The content of the file settings.gradle
include ':app'
I solved the problem ; for those who have the same issue : You should build the gradle with the Terminal/console not with Android studio :
./gradlew assembleRelease
After getting this error on first setup:
capacitor.settings.gradle' as it does not exist
..I used two commands from that page: npx cap sync android and npm install --save #capacitor/core #capacitor/cli. I'm not sure which one fixed that error, but it gave me the one on this page. I didnt want to build Gradle again when Android Studio should have it, so I restarted it and it started downloading a bunch of Gradle stuff to: /home/user/.gradle. It then prompted me to upgrade Gradle.
I then got a similar error to the OP Could not find method include() for arguments [:app] on root project 'android' of type org.gradle.api.Project..
So finally running the above ./gradlew assembleRelease, this error was shown:
To build this project, accept the SDK license agreements and install the missing components using the Android Studio SDK Manager. All licenses can be accepted using the sdkmanager command line tool: sdkmanager.bat --licenses
I installed SDK sudo snap install android-sdk but didnt have it. Installed with sudo apt install sdkmanager and then sudo sdkmanager --licences (y) to accept.. and got the same error. Found sdkmanager under Tools in AStudio. Tried to update there, but failed. Opened with sudo android-studio, had to select /home/user/.config/Google/AndroidStudioX.Y

An error while building a game with PGS4A

I making a small game in python with pygame.
I wanted to make the game available for android.
Hopefully, there was PGS4A for this
After doing the configuration I had to build it.
So I just typed the command:
python android.py build ~/project/programming/python/gameEngine release install
And I ended up with this error:
BUILD FAILED
/home/turquoisepotato/project/programming/python/pgs4a-0.9.6/android-sdk/tools/ant/build.xml:570: The following error occurred while executing this line:
/home/turquoisepotato/project/programming/python/pgs4a-0.9.6/android-sdk/tools/ant/build.xml:622: The following error occurred while executing this line:
/home/turquoisepotato/project/programming/python/pgs4a-0.9.6/android-sdk/tools/ant/build.xml:658: Execute failed: java.io.IOException: Cannot run program "/home/turquoisepotato/project/programming/python/pgs4a-0.9.6/android-sdk/platform-tools/aapt" (in directory "/home/turquoisepotato/project/programming/python/pgs4a-0.9.6/android-sdk/extras/google/play_licensing/library"): error=2, No such file or directory
What do I do with this. I'm lost.
I'm using crunch bang linux 11.
You're probably using a 64-bit OS, while the binaries are compiled against 32-bit libraries.
I'm not familiar with CrunchBang's repositories, but you can probably try
sudo apt-get install libc6:i386 libstdc++6:i386 zlib1g:i386 lib32ncurses5
and then run the installer again.
For some reason, this is a common problem that usually occurs on Windows with pgs4a 0.9.6.
Take a look at this.
To make sure that the directory structure of the unzipped file is the same as the screenshot.
You do not have a full android-sdk installed. You need the missing files that the error refers to. You can either roll-back to pgs4a 0.9.4, which doesn't use those licensing files or reinstall android-sdk
craig#ubuntu-desktop:~/Documents/python/pgs4a-0.9.6$ cd android-sdk/
craig#ubuntu-desktop:~/Documents/python/pgs4a-0.9.6/android-sdk$ ls
add-ons extras platforms platform-tools SDK Readme.txt temp tools
craig#ubuntu-desktop:~/Documents/python/pgs4a-0.9.6/android-sdk$ cd extras/
craig#ubuntu-desktop:~/Documents/python/pgs4a-0.9.6/android-sdk/extras$ ls
google
craig#ubuntu-desktop:~/Documents/python/pgs4a-0.9.6/android-sdk/extras$ cd google/
craig#ubuntu-desktop:~/Documents/python/pgs4a-0.9.6/android-sdk/extras/google$ ls
play_apk_expansion play_licensing
craig#ubuntu-desktop:~/Documents/python/pgs4a-0.9.6/android-sdk/extras/google$ cd play_licensing/
craig#ubuntu-desktop:~/Documents/python/pgs4a-0.9.6/android-sdk/extras/google/play_licensing$ ls
library LICENSE.txt README.txt sample source.properties test
craig#ubuntu-desktop:~/Documents/python/pgs4a-0.9.6/android-sdk/extras/google/play_licensing$
This link may help.
http://discussion.pychildren.org/t/windows-installation/10
To fix it go to this site http://ady.my/viewer/ and, in the section build, download the most recent version of build-tools. Extract the files 'aapt' and 'dx' and the directory 'lib' and move these all for the especified folder on the terminal /home/turquoisepotato/project/programming/python/pgs4a-0.9.6/android-sdk/platform-tools.
The code will be similar with this below:
mv aapt dx lib /home/turquoisepotato/project/programming/python/pgs4a-0.9.6/android-sdk/platform-tools
But the PGS4A is obselete. I suggest for you, use the Python for Android, that you find in this link: http://python-for-android.readthedocs.org/en/latest/

"env: bash: No such file or directory" trying to run gradle on Jenkins on Mac Mini

I've installed the gradle plugin on Jenkins, but whenever I try to run a gradle task, I get the error:
env: bash: No such file or directory
It's weird, I don't get this error when I run the same task from the terminal at the same location.
Any ideas?
Glenn essentially answered my question above in his comment. My PATH in Jenkins was different from my PATH from the terminal. I went and updated my /etc/launchd.conf file and added /bin to the PATH and Jenkins was able to find bash.

Categories

Resources