I'm running Ubuntu 12.04 LTS and get the following error when building the example Android Studio example:
Gradle: Execution failed for task ':MyApplication:mergeDebugResources'.
Error: Failed to run command:
/home/dean/android-studio/sdk/build-tools/android-4.3.1/aapt s -i /home/dean/AndroidStudioProjects/MyApplicationProject/MyApplication/build/exploded-bundles/ComAndroidSupportAppcompatV71800.aar/res/drawable-xhdpi/abc_ic_search.png -o /home/dean/AndroidStudioProjects/MyApplicationProject/MyApplication/build/res/all/debug/drawable-xhdpi/abc_ic_search.png
Error Code:
132
It looks like I'm missing some resource.
There seems to be an issue with aapt on some 32 bit systems. It throws an error 132 on app:processDebugResources which is when aapt is 'crunching' png files ready for inclusion in the apk package. You can see more details at https://code.google.com/p/android/issues/detail?id=75110
This agrees with your reported error - "aapt -s" is the command to crunch a single image file (in your case abc_ic_search.png).
Some people have reported that 'fixing' the offending png files (e.g. by opening in Gimp and saving) sorts the problem so that would be worth trying at least. There's clearly a deeper problem with aapt but that may get you going for now.
Also can you just say if you are indeed running on a 32 bit processor, and if so which one? You can use lscpu to find out.
Related
as part of a custom Android build chain, I am calling "aapt2 link" in order to link the files generated by a previous call to "aapt2 compile" together. This works fine on Mac, but on Windows it fails with the following error:
failed to open file: The device does not recognize the command.
I'm using the same SDK versions, and the error happens on multiple systems, including my own those of users of our build chain.
I'm calling rapt as follows:
C:\Users\mh\AppData\Local\Android\sdk\build-tools\33.0.1\aapt2.exe
link
-v
-o c:\obj\destination.apk
--manifest c:\Obj\manifest.xml
--java c:\Obj\java
-I C:\obj\android.jar
--proto-format
--min-sdk-version 26
--target-sdk-version 26
#c:\Obj\Aapt2LinkFiles.txt
(paths shortened for clarity here). All files listed in c:\Obj\Aapt2LinkFiles.txt exist, and aapt prints them all out, before emitting the error.
Does anyone have an idea what I could be missing?
As a side question: Is there a way to see, in Android Studio, how and with what parameters aapt2 is called as part of the normal automated build process? Because builds in Android Studio work fine (but I seem to not be able tom find any lace where there is a full build log, in the way that other IDEs such as Xcode or Visual Studio provide a textual overview of what actual tools get executed and with what parameters, as you build.
Thanx!
Update full command line for repro:
C:> C:\Users\mh\AppData\Local\Android\sdk\build-tools\33.0.1\aapt2.exe link -v -o c:\Obj\ForAAB.apk --manifest c:\Obj\m.xml --java c:\Obj\java -I C:\obj\a.jar --proto-format --min-sdk-version 26 --target-sdk-version 26 #c:\Obj\files.txt
Output
note: including C:\obj\a.jar.
note: linking package 'org.me.testapt2' using package ID 7f.
c:\Obj\res-aapt2\drawable-hdpi_icon.png.flat
c:\Obj\res-aapt2\drawable-ldpi_icon.png.flat
c:\Obj\res-aapt2\drawable-mdpi_icon.png.flat
c:\Obj\res-aapt2\drawable-xhdpi_icon.png.flat
c:\Obj\res-aapt2\drawable_icon.png.flat
c:\Obj\res-aapt2\layout_main.xml.flat: error: failed to open file: The device does not recognize the command. (22).
error: failed parsing input.
files can be found at https://www.dropbox.com/s/zuuopmhyzkd271u/Obj.zip?dl=0, unzip to C:\Obj
First time android builder here. I used to do a lot of roll your own back on FreeBSD in the day. Getting back into geekdom with android.
I am trying to build android-7.0.0_r14 for the Nexus 6 NBD90Z to run under emulation. I plan to eventually build for my actual phone and this config is pretty close. I am building on ubuntu 18.04 LTS which is newer than what the docs recommend. Maybe that is a bit adventurous.
Here is what I get when I run make.
... snip
build/core/base_rules.mk:316: warning: ignoring old commands for target
out/target/product/shamu/system/lib/soundfx/libqcomvoiceprocessing.so'
Starting build with ninja
ninja: Entering directory.'
ninja: warning: multiple rules generate out/target/product/shamu/system/etc/gps.conf. builds involving this target will not be correct; continuing anyway [-w dupbuild=warn]
[ 0% 1/35600] Lex: libaidl-common <= system/tools/aidl/aidl_language_l.ll
FAILED: /bin/bash -c "prebuilts/misc/linux-x86/flex/flex-2.5.39 -oout/host/linux-x86/obj/STATIC_LIBRARIES/libaidl-common_intermediates/aidl_language_l.cpp system/tools/aidl/aidl_language_l.ll"
flex-2.5.39: loadlocale.c:130: _nl_intern_locale_data: Assertion `cnt < (sizeof (_nl_value_type_LC_TIME) / sizeof (_nl_value_type_LC_TIME[0]))' failed.
Aborted (core dumped)
ninja: build stopped: subcommand failed.
build/core/ninja.mk:148: recipe for target 'ninja_wrapper' failed
make: *** [ninja_wrapper] Error 1
A core dump for flex was not produced in spite of the error message given.
out/host/linux-x86/obj/STATIC_LIBRARIES/libaidl-common_intermediates/aidl_language_l.cpp does not exist. That entire folder is empty. It would seem that something is not downloading/copying the aidl_language_l.cpp.
Any ideas on what I might have messed up?
I am still a little confused at the complexity of git/repo/make/ninja/soong/lunch to conduct a build. It is likely that I missed something obvious.
Thanks,
Jason C. Wells
Just replace your make by export LC_ALL=C make or put the export in your .bashrc
After I looked at this a little closer I realized the prebuilt prebuilts/misc/linux-x86/flex/flex-2.5.39 would dump core with no arguments. I created a soft link to /usr/bin/flex. Compilation seems to be proceeding.
I haven't answered why the prebuilt was dumping. My goal is to compile android, not troubleshoot the tools.
I performed Snorky's steps. I deleted my output directory for libaidl-common_intermediates. I deleted my soft link and restored the android tree version of flex. I re-ran make at the top of the local repo. The build proceeded past the error above and stopped at a new error. It appears that Snorky's answer worked.
Doh! I'm new so S.O. didn't give credit for my upvote.
While installing NVidia Android CodeWorks I have received an error at the very end of the installation process saying :
installing compile samples 4.0 failed nvidia
Return Code: 2Compile Samples failed. Please check the /home/user/NVPACK//_installer/compile.log. You can send it to TegraDeveloperPack-Users#nvidia.com if you can not resolve it.
Does anyone know how to solve this problem please
So that other people having the same problem might go on something for I have not found an optimal solution to this problem.
I have managed to solve it by simply copying my version of jdk (which is jdk1.8.0_101) to the specified Nvidia Codeworks folder and renaming to the one missing in the log (...\Nvidia\Codeworks_installer\compile.log - \Nvidia\Codeworks\jdk1.8.0_77" does not exist.) In my case it compiled successfully, however it must be noted that this is not a good solution. Messing around with the environment valuables might be a reasonable place to start otherwise.
If your log file shows:
Error: JAVA_HOME is not defined correctly.
make: *** [antbuild_Basic_debug] Error 1
We cannot execute /usr/bin/java
Makefile.Basic.mk:92: recipe for target 'antbuild_Basic_debug' failed
you can fix it by creating a soft link like this:
sudo ln -s $JAVA_HOME/bin/java /usr/bin/java
I'm trying to get the tensorflow Android example running but I keep running into this issue:
ERROR: /home/administrator/TensorFlow_Git/tensorflow/examples/android/BUILD:41:1: output 'tensorflow/examples/android/libpthread.so' was not created.
ERROR: /home/administrator/TensorFlow_Git/tensorflow/examples/android/BUILD:41:1: not all outputs were created.
Version Details:
OS: Ubuntu 14.04LTS;
bazel version 0.2.1;
tensorflow version: tensorflow-0.7.1-cp34-none-linux_x86_64.whl
Excerpt of WORKSPACE file:
android_sdk_repository(
name = "androidsdk",
api_level = 23,
build_tools_version = "23.0.3", #also wget'ed 23.0.1, same result
path = "/home/administrator/Android/Sdk",)
android_ndk_repository(
name="androidndk",
path="/home/administrator/Downloads/android-ndk-r10e", #also tried android-ndk-r11c but README not found error
api_level=21)
I can successfully compile and deploy android apps via android studio.
If I comment out the part in the BUILD file and copy the libpthread.so file from the internet to the target location the error changes to the following:
ERROR:
/home/administrator/TensorFlow/tensorflow/tensorflow/examples/android/BUILD:12:1:
output 'tensorflow/examples/android/libtensorflow_demo.so' was not
created.
ERROR: /home/administrator/TensorFlow/tensorflow/tensorflow/examples/android/BUILD:12:1:
not all outputs were created.
Not sure if this is a bug but I guess not.
I have no idea what and where something went wrong but there were broken link files pointing to a non existing directory with libtensorflow_demo.so.
The solution for me was to start all over with a fresh VM with enough diskspace (20GB is clearly not enough), enough memory (default is pretty low) and all cores assigned (default is 1) with the current Ubuntu 16.04 LTS and Android Studio. Also tensorflow v8.0 which came out meanwhile seems to be a bit less troublesome.
I had an issue with the VM where I had 0byte left and had blackscreen before login. I fixed that but it was during an installation and maybe it was the installation of bazel that messed up something. I can't tell.
I am using this repository to build ffmpeg static library which includes x264,libpng and others, please
visit this link https://github.com/writingminds/ffmpeg-android
i am using windows 7 as host and ubuntu 15.10 (_64) as guest os using VMware Workstation 12 and
Android-ndk-r11b-linux-x86_64
i do have Prebuilt libraries , but now i want it without PIE support
i am getting this error in config.log in x264 folder while building
through
./android_build.sh
here is the log :
x264 configure script
Command line options: "--cross-prefix=/mnt/hgfs/uShare/ffmpeg-android/toolchain-android/bin/arm-linux
/mnt/hgfs/uShare/ffmpeg-android/toolchain-android/bin/arm-linux-androideabi-gcc
checking whether /mnt/hgfs/uShare/ffmpeg-android/toolchain-android/bin/arm-linux-androideabi-gcc
--sysroot=/mnt/hgfs/uShare/ffmpeg-android/toolchain-android/sysroot works... no
Failed commandline was:
--sysroot=/mnt/hgfs/uShare/ffmpeg-android/toolchain-android/sysroot conftest.c -Wall -I. -I$(SRCPATH) --sysroot=/mnt/hgfs/uShare/ffmpeg-android/toolchain-android/sysroot --sysroot=/mnt/hgfs/uShare/ffmpeg-android/toolchain-android/sysroot -lm -o conftest
/mnt/hgfs/uShare/ffmpeg-android/toolchain-android/bin/../lib/gcc/arm-linux-androideabi/4.9/../../../../arm-linux-androideabi/bin/ld: fatal error:
conftest: Input/output error
Failed program was:
int main (void) { return 0; }
DIED: No working C compiler found.
ushare is my shared folder between windows and ubuntu
I have spend almost a week ,trying to solve every error i get.
these errors are like never ending , 1 solution give 10 more errors
i have researched a LOT for this library
thanks a lot in advance.
Also i thought that x264 library might have poroblem ,so i tried to disable it
but next library "libpng" also had Same log Error
i think problem is in Input/output error (obviously)
this line in log kind of confuses me (those /../../)
/mnt/hgfs/uShare/ffmpeg-android/toolchain-android/bin/../lib/gcc/arm-linux-androideabi/4.9/../../../../arm-linux-androideabi/bin/ld: fatal error:
its like two folder overlaping address...
thanks a lot in advance.
please don't go harsh on me ,its my first time,all thanks to this thing...
Well i solved my problem. the problem was in NDK ,i extracted it in windows and was using it on ubuntu. Later i used ubuntu to extract ,and found the built to be working.
hope this help to new future users!