android 7.1.2 + ARMv7 - android

I met this problem when I was compiling the Android 7.1.2 source code after I updated my debian. I do not know what is the real problem .
It seems problem from the flex. However, how can i solve it?
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

Same issue for me on Ubuntu 18.04. LC_TIME was set to en_GB.UTF-8.
export LC_ALL=C
Fixed it for me

I built AOSP (Android O/P) downloaded from Google on a newly setup 18.04 and it built fine. Did not have to change the locale.
Locale was set to en_GB.UTF-8.
Then I had to build Android N, an IMX distro, on the same machine and the build failed with the above error. After changing the locale variable the build worked fine.

i was also facing the same error and before make i run "export LC_ALL=C" in terminal and Issue is fixed.
How to integrate this variable in android source code so that i can avoid to run before compilation .

I had this again recently building AOSP with Ubuntu 22.04. Setting the locale didn't work at all.
However i found this github thread which suggested to rebuild flex with
cd prebuilts/misc/linux-x86/flex
rm flex-2.5.39
tar zxf flex-2.5.39.tar.gz
cd flex-2.5.39
./configure
make
mv flex ../
cd ../
rm -rf flex-2.5.39
mv flex flex-2.5.39
which solved the error for me.

Related

Phonegap/Cordova build android node_modules/q/q.js throw e;

cordova build android gives me the following err
node_modules/q/q.js:126 throw e; (*error details)
This question has been asked before, but the typical answer regarding PATH and ANDROID_HOME hasn't worked for me.
I've put this into code snippet to avoid SO submission problems
export HOME="/Users/rover"
export ANDROID_SDK="$HOME/Documents/Dev/Android/adt-bundle-mac-x86_64-20140702/sdk"
export ANDROID_HOME="$ANDROID_SDK/tools"
export ANDROID_PLATFORM_TOOLS="$ANDROID_SDK/platform-tools"
export PATH="$ANDROID_HOME:$ANDROID_PLATFORM_TOOLS:$ANDROID_SDK/build-tools:$PATH"
export ANT_HOME="/usr/local/bin/ant"
#export PATH="$PATH:$ANT_HOME/bin"
My environment variables:
$ set | grep "ANDROID\|PATH"
ANDROID_HOME=/Users/rover/Documents/Dev/Android/adt-bundle-mac-x86_64-20140702/sdk/tools
ANDROID_PLATFORM_TOOLS=/Users/rover/Documents/Dev/Android/adt-bundle-mac-x86_64-20140702/sdk/platform-tools
ANDROID_SDK=/Users/rover/Documents/Dev/Android/adt-bundle-mac-x86_64-20140702/sdk
PATH=/Users/rover/Documents/Dev/Android/adt-bundle-mac-x86_64-20140702/sdk/tools:/Users/rover/Documents/Dev/Android/adt-bundle-mac-x86_64-20140702/sdk/platform-tools:/Users/rover/Documents/Dev/Android/adt-bundle-mac-x86_64-20140702/sdk/build-tools:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin
$ which ant
/usr/local/bin/ant
$ ls /usr/local/bin/ant
/usr/local/bin/ant
$ cordova --version
4.0.0
$ ant -v
Apache Ant(TM) version 1.9.4
I'm on Mac OSX 10.10 (Yosemite) which might have a problem with Java 8. Can this be related?
$ java -version
java version "1.8.0_05"
Java(TM) SE Runtime Environment (build 1.8.0_05-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.5-b02, mixed mode)
$ ant --execdebug
exec "/Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/jre/bin/java" -classpath "/usr/local/Cellar/ant/1.9.4/libexec/lib/ant-launcher.jar" -Dant.home="/usr/local/Cellar/ant/1.9.4/libexec" -Dant.library.dir="/usr/local/Cellar/ant/1.9.4/libexec/lib" org.apache.tools.ant.launch.Launcher -cp ""
(*error details)
BUILD FAILED
/Users/rover/Documents/Dev/Android/adt-bundle-mac-x86_64-20140702/sdk/tools/ant/build.xml:653: The following error occurred while executing this line:
/Users/rover/Documents/Dev/Android/adt-bundle-mac-x86_64-20140702/sdk/tools/ant/build.xml:698: null returned: 1
Total time: 1 second
/Library/WebServer/Documents/Booster/core_ionic_git/platforms/android/cordova/node_modules/q/q.js:126
throw e;
^
Error code 1 for command: ant with args: debug,-f,/Library/WebServer/Documents/Booster/core_ionic_git/platforms/android/build.xml,-Dout.dir=ant-build,-Dgen.absolute.dir=ant-gen
Error: /Library/WebServer/Documents/Booster/core_ionic_git/platforms/android/cordova/build: Command failed with exit code 8
at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:135:23)
at ChildProcess.emit (events.js:98:17)
at maybeClose (child_process.js:756:16)
at Process.ChildProcess._handle.onexit (child_process.js:823:5)
Any ideas on fixing this?
I banged my head against the wall for hours and hours and ultimately came up with a simple solution. I went into the project directory and issued two commands:
cordova platform remove android
cordova platform add android
Recompiled with "cordova build android" and it worked like a charm.
I think cordova wanted to possibly update some files.
===== Update for Ionic ========
In case you are using ionic framework then these are the commands for your rescue:
ionic platform remove android
ionic platform add android
I have noticed that this normally happens when you break (Ctrl-C) the compilation process.
I noticed that your ANDROID_HOME variable might be incorrectly setup - as far as I can tell, it should be set to the root of your SDK folder (what you have ANDROID_SDK set to), try that (and make sure that you still have both $ANDROID_HOME/tools and $ANDROID_HOME/platform-tools on your path).
I run in the same problem and solved it by escaping non-letter characters in config.xml. Particulary for the name attribute:
<name>Temps d'espera</name>
I changed it to:
<name>Temps d\'espera</name>
And then it run perfectly. Hope it helps.
#mylord I had similar error and it was due to invalid debug certificate. On Linux Delete ~/.android
debug.keystore file.
The next time you build, the build tools will regenerate a new keystore and debug key.
This solved for me. I hope this helps.
I ran into this same problem while running 'phonegap serve', but the solution was very different. I noticed that operation would work when I restarted my computer. In case anyone else runs into this problem. Here is the solution on Ubuntu 15
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
which was taken from the stackoverflow thread Grunt watch error - Waiting...Fatal error: watch ENOSPC
In addition to the posters error, I had the error
at exports._errnoException (util.js:856:11)
at FSWatcher.start (fs.js:1313:19)
at Object.fs.watch (fs.js:1341:11)
further down.
I meet same error message, but my ANDROID_HOME setting is correct.
I find the error is caused by I opening a .apk file in the \platforms\android\ant-build folder. After I close 7zip that occupy the .apk file, ant build passed.
Before changing anything, make an empty cordova project and try to build it and you can figure out the problem is project specific or not.
After a lot of change i made, i figured out we shouldn't have two folders with same names : jquery and jQuery!
I had the same issue. It was caused by having an App with the same name (and the same reverse style domain name in my case) installed on the Android Device which originated from the Google Play store (it was our Beta release).

phonegap build problems (android)

When I try to build my app, using Linux ElementaryOS (Ubuntu 12.04 (I think?)) I get thousands of errors saying:
rm: could not remove file (code EACCESS)
The results of the following show:
$ phonegap -v
3.5.0-0.20.4
$ cordova -v
3.5.0-0.2.4
$ ant -v
Apache Ant(TM) version 1.8.2 compiled on December 3 2011
Trying the default build file: build.xml
Buildfile: build.xml does not exist!
Build failed
Any suggestions? I've been battling through several errors for about a week now :(
Thanks in advance!
Update
Update I just changes the permissions of platforms/android too 777 (not a great solution I know). It's now giving me the following:
[Error: An error occurred while listing Android targets] { [Error: /var/www/ppl/app/platforms/android/cordova/build: Command failed with exit code 2] code: 2 } –
Okay, after much pain and anguish... I figured it out.
1). I installed ANT after I installed ionic/cordova/phonegap etc, the best order to install everything in is, java, ant, then cordova/phonegap/ionic.
2). I'm using 64-bit Ubuntu, if you are using the same then you need to install several android 32-bit libs.
3). I deleted the entire project (apart from my css, added js files and my html templates), created a new one using $ ionic start test-app then I ran $ ionic platform add android then ran $ ionic run android and it worked.
4). Make sure your paths are correct in ~/.bashrc mine look as followed:
export PATH=$PATH:/home/ewan/adt-bundle/tools
export PATH=$PATH:/home/ewan/adt-bundle/platform-tools
Here's a video that helped me, especially with the 32-bit libs. https://www.youtube.com/watch?v=zEQIwKK7YjY
Don't give up, it's worth it in the end. Best of luck!

cygwin on windows does not recognize make -v not found

I'm following an android tutorial on ndk and I am trying to run the following command within cygwin
$make - v
but I get the following message:
bash: make: command not found
Can anyone help ?
Launch the setup. Search the packages for "make" and install them...
You should not use cygwin to run ndk-build in NDK version 6 and above. Use ndk-build.cmd from CMD prompt instead. Anyways, NDK contains its own rebuilt make executable on all platforms, which should be used with ndk build scripts.

NDK build error with cygwin

i am tying to build a tesseract project to use as a library for my project. I am getting this error with cygwin when trying to build on windows 7 with User Account Controls turned off.
$ /cygdrive/c/android-ndk-r8/ndk-build
SharedLibrary : liblept.so
C:/android-ndk-r8/toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libgnustl_static.a: No such file: Permission denied
collect2: ld returned 1 exit status
/cygdrive/c/android-ndk-r8/build/core/build-binary.mk:369: recipe for target `obj/local/armeabi/liblept.so' failed
make: *** [obj/local/armeabi/liblept.so] Error 1
please let me know what i should do to build the project.
Sorry It's my first time answering a question.
I was having a same issue as yours.
Then I solve it using cygwin bash with command: $ chmod -R 777 /cygdrive/c/android/workspace
C:/Android/workspace is my Eclipse work space.
Some one here gave me the insight
A lot of people have struggled with compiling tesseract under Windows, and Cygwin is normally suggested, however its often not necessary.
Have you tried looking at the tess-two project on github? Its tesseract wrapped with some handy android classes, compiling a running is simply a case of :
git clone git://github.com/rmtheis/tess-two tess
cd tess
cd tess-two
ndk-build
android update project --path .
ant release
I've been able to compile the above on 3 windows7 machines, a mac, and ubuntu without any issues.
if you're developing under windows, go to the file, and change it's premissions to full control.
it will be in /obj dir

error compiling Android on ubuntu 11.10

I am getting following error while compiling Android on ubuntu 11.10
target arm C: libc <= bionic/libc/bionic/pthread.c
arm-linux-androideabi-gcc: error trying to exec 'cc1': execvp: No such file or directory
make: *** [out/target/product/generic/obj/SHARED_LIBRARIES/libc_intermediates/bionic/pthread.o] Error 1
Any Clue?
It can't find cc1. On my fresh install of Ubuntu 11.10 it's installed but not in my path. Try adding it manually to your path.
export PATH=<pathtoitgoeshere>:$PATH
On my Ubuntu, it was found at
/usr/lib/gcc/i686-linux-gnu/4.6.1/cc1
But you can find it for yours by using
gcc -print-prog-name=cc1
I have spent about a day to find root cause of this: arm-linux-androideabi-gcc: error trying to exec 'cc1': execvp: No such file... and others issues. The issue was that I unpacked NDK and SDK with 7z which removed executable permission for all binaries and Eclipse was not able to start cc1. Once I unpacked tar files of SDK and NDK using tar, everything started working well.
PS. I hope it will safe a day for others.
I encountered this problem after upgrading from Ubuntu 12.04 => 14.04.
Seems like the build-essential package wasn't upgraded properly. For me, I was able to fix by doing
sudo apt-get purge gcc
sudo apt-get install gcc

Categories

Resources