WebRTC Android native compilation issue in ubuntu 14.04 32-bit - android

I tried to compile webrtc native code.
Added here main reference link for installation step:
http://webrtc.org/native-code/android/
http://www.khirman.com/building-webrtc-libraries-android/
While executing
"gclient runhooks"
getting error like this:
umnteam#umn-desktop:~/webrtc_androd_latest$ gclient runhooks
________ running '/usr/bin/python -c import os,sys;script = os.path.join("trunk","check_root_dir.py");_ = os.system("%s %s" % (sys.executable,script)) if os.path.exists(script) else 0' in '/home/umnteam/webrtc_androd_latest'
________ running '/usr/bin/python -u src/sync_chromium.py --target-revision d66326c14bb70a1d61d75b096a9a344bc9a53c1a' in '/home/umnteam/webrtc_androd_latest'
Chromium already up to date: d66326c14bb70a1d61d75b096a9a344bc9a53c1a
________ running '/usr/bin/python src/setup_links.py' in '/home/umnteam/webrtc_androd_latest'
________ running '/usr/bin/python src/build/landmines.py --landmine-scripts src/webrtc/build/get_landmines.py --src-dir src' in '/home/umnteam/webrtc_androd_latest'
________ running '/usr/bin/python src/third_party/instrumented_libraries/scripts/download_binaries.py' in '/home/umnteam/webrtc_androd_latest'
________ running 'download_from_google_storage --directory --recursive --num_threads=10 --no_auth --quiet --bucket chromium-webrtc-resources src/resources' in '/home/umnteam/webrtc_androd_latest'
Hook 'download_from_google_storage --directory --recursive --num_threads=10 --no_auth --quiet --bucket chromium-webrtc-resources src/resources' took 10.58 secs
________ running '/usr/bin/python src/webrtc/build/gyp_webrtc -Dextra_gyp_flag=0' in '/home/umnteam/webrtc_androd_latest'
Updating projects from gyp files...
/home/umnteam/webrtc_androd_latest/src/third_party/android_tools/ndk//toolchains/arm-linux-androideabi-4.9/prebuilt/linux-i686/bin/arm-linux-androideabi-gcc: 1: /home/umnteam/webrtc_androd_latest/src/third_party/android_tools/ndk//toolchains/arm-linux-androideabi-4.9/prebuilt/linux-i686/bin/arm-linux-androideabi-gcc: Syntax error: "(" unexpected
gyp: Call to '/home/umnteam/webrtc_androd_latest/src/third_party/android_tools/ndk//toolchains/arm-linux-androideabi-4.9/prebuilt/linux-i686/bin/*-gcc -print-libgcc-file-name' returned exit status 2 while in all.gyp.
Error: Command '/usr/bin/python src/webrtc/build/gyp_webrtc -Dextra_gyp_flag=0' returned non-zero exit status 1 in /home/umnteam/webrtc_androd_latest
Please help me to find out the issue

Issue solved after upgrade my RAM. Always check RAM usage while compiling webRTC. It will solve most of the issues.

Related

Android error while building the Alexa auto SDK

I am trying to build the Alexa auto sdk in Mac OS High Sierra. I am able to successfully build the docker environment required on Mac for the Alexa Auto SDK Builder. While installing the NDK I am getting the following error in terminal `
*******************
*** Docker Mode ***
*******************
NOTE: Run Docker image...
NOTE: SDK Version: 1.2.0
NOTE: Start building for androidarm...
NOTE: Android toolchains will be installed: /workdir/android
NOTE: Checking Android toolchain installation (armeabi-v7a/22)...
NOTE: Installing NDK (android-ndk-r16b)...
NOTE: Downloading file android-ndk-r16b-linux-x86_64.zip
--2018-10-31 05:39:02-- https://dl.google.com/android/repository/android-ndk-r16b-linux-x86_64.zip
Resolving dl.google.com (dl.google.com)... 216.58.203.142, 2404:6800:4009:802::200e
Connecting to dl.google.com (dl.google.com)|216.58.203.142|:443... connected.
ERROR: cannot verify dl.google.com's certificate, issued by ‘CN=192.168.86.1’:
Self-signed certificate encountered.
To connect to dl.google.com insecurely, use `--no-check-certificate'.
ERROR: Android toolchain setup failed
I tried wget --no-check-certificate https://dl.google.com/android/repository/android-ndk-r16b-linux-x86_64.zip `
and downloaded the NDK but the issue is still persisting. Please help as I am stuck.
We have downloaded Alexa-auto-SDK 1.6.
we used the following steps below. Please update docker, my case everything fine working.
mac$ ./builder/build.sh oe -t androidarm --android-api 26
*******************************************************************************
The scripts provided herein will retrieve several third-party libraries,
environments, and/or other software packages at build-time
("External Dependencies") from third-party sources. These are terms and
conditions that you need to agree to abide by if you choose to build the
External Dependencies. Licenses for the External Dependencies may be found at
builder/README.md. If you do not agree with every term and condition
associated with the External Dependencies, enter “QUIT” in the command line
when prompted by the script.
*******************************************************************************
Type "QUIT" to exit the script now, press ENTER to continue:
\e[1mNOTE\e[0m: Builder only runs within Docker with macOS host
\e[1mNOTE\e[0m: Switching to Docker mode...
*******************
*** Docker Mode ***
*******************
+++ dirname /Users/mac/MetroProject/Android1.5/alexa-auto-sdk/builder/scripts/run-docker.sh
++ cd /Users/mac/MetroProject/Android1.5/alexa-auto-sdk/builder/scripts
++ pwd
+ THISDIR=/Users/mac/MetroProject/Android1.5/alexa-auto-sdk/builder/scripts
+ source /Users/mac/MetroProject/Android1.5/alexa-auto-sdk/builder/scripts/common.sh
++ '[' -z /Users/mac/MetroProject/Android1.5/alexa-auto-sdk/builder ']'
+ VM_HOME=/home/builder
+ IMAGE_REVISION=20190128
+ IMAGE_NAME=aac/ubuntu-base:20190128
+ VOLUME_NAME=buildervolume
+ VOLUME_MOUNT_POINT=/workdir
+ [[ '' != \1 ]]
+ TTY=-t
+ EXTRA_OPTIONS=
+ '[' '!' -z ']'
++ docker images -q aac/ubuntu-base:20190128
+ [[ aad39b28847b == '' ]]
++ docker volume ls
++ grep buildervolume
+ [[ local buildervolume == '' ]]
+ note 'Run Docker image...'
+ echo -e '\e[1mNOTE\e[0m: Run Docker image...'
\e[1mNOTE\e[0m: Run Docker image...
+ execute_command aac/builder/build.sh oe -t androidarm --android-api 26
+ docker run -i -t --rm -v buildervolume:/workdir -v /Users/mac/MetroProject/Android1.5/alexa-auto-sdk/builder/..:/home/builder/aac -e ANDROID_TOOLCHAIN=/workdir/android -e AGL_SDK_BASE=/workdir/agl-sdk -e HOST_PWD=/Users/mac/MetroProject/Android1.5/alexa-auto-sdk -e HOST_SDK_HOME=/Users/mac/MetroProject/Android1.5/alexa-auto-sdk/builder/.. aac/ubuntu-base:20190128 aac/builder/build.sh oe -t androidarm --android-api 26
NOTE: SDK Version: 1.6.0-00002-gb9ee08f-dirty
NOTE: Start building for androidarm...
NOTE: Android toolchains will be installed: /workdir/android
NOTE: Checking Android toolchain installation (armeabi-v7a/26)...
NOTE: Using BUILD_DIR=/workdir/build
Welcome to Alexa Auto Builder!
.c;.
.lKx.
':loooooc' .:c' .c:. .;lkKOocc:. .;looooc,.
.:lc;;;:d00l. ,OKc cK0; 'coOKOocc:. .lOOd:;;cxOk:.
.oKk' ,OKc :0O; .dKx. .oKO; .l00:
.;:::;:dKk' ,OKc :0O; .dKx. ,kKo. 'kKd.
'dOxlc::lkKk' ,OKc :0O; .dKx. ,OKo. .xKd.
.dKk' .lKk' ,OKl. cKO; .dKx. .dKk' :00c
.oKOc...,lkKk' .xKOc'.';cxKO; .oKOl,,,. 'd0kc,..,lO0l.
.:dxxdol;:ol. 'lxkxdol;;lo' .:dxxdo' .;ldxxxxdc'
... ... ....
......
... .',,,;;cc:.
.',,.. .. 'c:.
..,::;,... ...,;;. 'c,
..,:ccc:;,''...... .....'',;:cc;,.. .:,
..',:ccllllcccc:::::::ccccllllc:;'.. ..
...',,;;::::::::;;;,'....
Loading cache: 100% |############################################| Time: 0:00:00
Loaded 1299 entries from dependency cache.
NOTE: Resolving any missing task queue dependencies
NOTE: Multiple providers are available for virtual/nativesdk-libintl (nativesdk-gettext, nativesdk-glibc)
Consider defining a PREFERRED_PROVIDER entry to match virtual/nativesdk-libintl
Build Configuration:
BB_VERSION = "1.36.0"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "ubuntu-16.04"
TARGET_SYS = "arm-linux-androideabi"
MACHINE = "androidarm"
DISTRO = "aac"
DISTRO_VERSION = "1.6.0"
TUNE_FEATURES = "arm armv7a vfp thumb callconvention-hard"
TARGET_FPU = "hard"
meta-aac-ubuntu = "1.6:b9ee08ff5e9a88e1554d1d90f3e368d92cd302cf"
meta = "HEAD:1b18cdf6b8bdb00ff5df165b9ac7bc2b10c87d57"
meta-aac
meta-aac-builder = "1.6:b9ee08ff5e9a88e1554d1d90f3e368d92cd302cf"
Initialising tasks: 100% |#######################################| Time: 0:00:03
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
NOTE: Tasks Summary: Attempted 553 tasks of which 417 didn't need to be rerun and all succeeded.
Thank you

How to install Fastlane on Buddybuild

I try to install Fastlane in a pre build step on Buddybuild.
My pre build script looks like this:
#!/bin/bash
if ! which fastlane >/dev/null; then
echo "Installing fastlane this may need sudo"
sudo gem install fastlane
else
echo "Updating fastlane this may need sudo"
sudo gem update fastlane
fi
I get the following error:
ERROR: Error installing fastlane:
ERROR: Failed to build gem native extension.
/usr/bin/ruby2.1 mkrf_conf.rb .
Building native extensions. This could take a while...
/usr/lib/ruby/2.1.0/rubygems/ext/builder.rb:89:in `run': ERROR: Failed to build gem native extension. (Gem::Ext::BuildError) .
/usr/bin/ruby2.1 extconf.rb .
mkmf.rb can't find header files for ruby at
/usr/lib/ruby/include/ruby.h
extconf failed, exit code 1
How can I solve this?
Rest of the Log
Gem files will remain installed in /var/lib/gems/2.1.0/gems/unf-0.2.0.beta2/ext/gems/gems/unf_ext-0.0.7.4 for inspection.
Results logged to /var/lib/gems/2.1.0/gems/unf-0.2.0.beta2/ext/gems/extensions/x86_64-linux/2.1.0/unf_ext-0.0.7.4/gem_make.out
from /usr/lib/ruby/2.1.0/rubygems/ext/ext_conf_builder.rb:38:in block in build
from /usr/lib/ruby/2.1.0/tempfile.rb:324:in 'open'
from /usr/lib/ruby/2.1.0/rubygems/ext/ext_conf_builder.rb:17:in 'build'
from /usr/lib/ruby/2.1.0/rubygems/ext/builder.rb:161:in 'block (2 levels) in build_extension'
from /usr/lib/ruby/2.1.0/rubygems/ext/builder.rb:160:in 'chdir'
from /usr/lib/ruby/2.1.0/rubygems/ext/builder.rb:160:in 'block in build_extension'
from /usr/lib/ruby/2.1.0/rubygems/ext/builder.rb:159:in 'synchronize'
from /usr/lib/ruby/2.1.0/rubygems/ext/builder.rb:159:in `build_extension'
from /usr/lib/ruby/2.1.0/rubygems/ext/builder.rb:198:in 'block in build_extensions'
from /usr/lib/ruby/2.1.0/rubygems/ext/builder.rb:195:in 'each'
from /usr/lib/ruby/2.1.0/rubygems/ext/builder.rb:195:in 'build_extensions'
from /usr/lib/ruby/2.1.0/rubygems/installer.rb:677:in 'build_extensions'
from /usr/lib/ruby/2.1.0/rubygems/installer.rb:232:in 'install'
from /usr/lib/ruby/2.1.0/rubygems/resolver/specification.rb:78:in 'install'
from /usr/lib/ruby/2.1.0/rubygems/request_set.rb:206:in 'block in install_into'
from /usr/lib/ruby/2.1.0/rubygems/request_set.rb:198:in 'each'
from /usr/lib/ruby/2.1.0/rubygems/request_set.rb:198:in 'install_into'
from /usr/lib/ruby/2.1.0/rubygems/request_set.rb:119:in 'install'
from /usr/lib/ruby/2.1.0/rubygems/dependency_installer.rb:389:in 'install'
from mkrf_conf.rb:15:in ''
rake failed, exit code 1
Gem files will remain installed in /var/lib/gems/2.1.0/gems/unf-0.2.0.beta2 for inspection.
Results logged to /var/lib/gems/2.1.0/extensions/x86_64-linux/2.1.0/unf-0.2.0.beta2/gem_make.out
Change your script to:
if ! which fastlane >/dev/null; then
echo "Installing fastlane..."
echo password | sudo -S gem install fastlane
else
echo "Updating fastlane..."
echo password | sudo -S gem update fastlane
fi
Our recommendation (and, as it turns out, fastlane's) is to use bundler and a Gemfile to achieve that. It lets you use a specific version of fastlane and, as a bonus, don't require sudo.
Let me know if this helps!

ionic build android error

I'm confused. jdk,sdk,ant,cordova,ionic doing well,why builds error?
I searched everywhere,but no answer for it.
I guess has a error version?
who can help this?
system:win8
jdk:1.8
ant:1.96
android:22
%ANT_HOME%\bin\;%ANDROID_HOME%\platform-tools\;%ANDROID_HOME%\tools\;%java_home%\bin;%java_home%\jre\bin;C:\ProgramData\Oracle\Java\javapath;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files\nodejs\
Path
E:\ionic\demo22>ionic build android
Running command: "C:\Program Files\nodejs\node.exe" E:\ionic\demo22\hooks\after_
prepare\010_add_platform_class.js E:\ionic\demo22
add to body class: platform-android
Running command: cmd "/s /c "E:\ionic\demo22\platforms\android\cordova\build.bat
""
ANDROID_HOME=E:\adt-bundle-windows-x86_64-20140702\sdk
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_60
Running: E:\ionic\demo22\platforms\android\gradlew cdvBuildDebug -b E:\ionic\dem
o22\platforms\android\build.gradle -Dorg.gradle.daemon=true
Unzipping C:\Users\cxt\.gradle\wrapper\dists\gradle-2.2.1-all\2m8005s69iu8v0oiej
fej094b\gradle-2.2.1-all.zip to C:\Users\cxt\.gradle\wrapper\dists\gradle-2.2.1-
all\2m8005s69iu8v0oiejfej094b
Exception in thread "main" java.lang.RuntimeException: java.util.zip.ZipExceptio
n: error in opening zip file
at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAcc
essManager.java:78)
at org.gradle.wrapper.Install.createDist(Install.java:47)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:129)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:48)
Caused by: java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:219)
at java.util.zip.ZipFile.<init>(ZipFile.java:149)
at java.util.zip.ZipFile.<init>(ZipFile.java:163)
at org.gradle.wrapper.Install.unzip(Install.java:160)
at org.gradle.wrapper.Install.access$400(Install.java:29)
at org.gradle.wrapper.Install$1.call(Install.java:70)
at org.gradle.wrapper.Install$1.call(Install.java:47)
at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAcc
essManager.java:65)
... 3 more
E:\ionic\demo22\platforms\android\cordova\node_modules\q\q.js:126
throw e;
^
Error code 1 for command: cmd with args: /s /c "E:\ionic\demo22\platforms\androi
d\gradlew cdvBuildDebug -b E:\ionic\demo22\platforms\android\build.gradle -Dorg.
gradle.daemon=true"
ERROR building one of the platforms: Error: cmd: Command failed with exit code 1
You may not have the required environment or OS to build this project
Error: cmd: Command failed with exit code 1
at ChildProcess.whenDone (C:\Users\cxt\AppData\Roaming\npm\node_modules\cord
ova\node_modules\cordova-lib\src\cordova\superspawn.js:139:23)
at ChildProcess.emit (events.js:110:17)
at maybeClose (child_process.js:1015:16)
at Process.ChildProcess._handle.onexit (child_process.js:1087:5)
Error
I hope that not too late, but I had the same error and. So, I fixed it doing the next:
In your case find this:
C:\Users\cxt\.gradle\wrapper\dists\gradle-2.2.1-
all\2m8005s69iu8v0oiejfej094b
now you are here to delete the gradle-2.2.1-all.zip because this file is corrupted and then replace the file with this http://services.gradle.org/distributions/gradle-2.2.1-all.zip
when you finish all try again
ionic build android
Good Luck!
First of all you have to install
node.js
apache ANT
JDK & JRE
Android SDK & Eclipse
After installation, you have to set software paths into environmental- variable. Then fire your npm install -g cordova. Without this PhoneGap will not be created.
If still you have any confusion or question related to software installation then tell me.
I had the same issue on Mac.
The steps below solved that for me:
NOTE: gradle path & version would be different on your machine. please replace those informations with yours. you can get them from exception message
Download : http://services.gradle.org/distributions/gradle-2.13-all.zip
Get List of files in directory
sudo ls rm /var/root/.gradle/wrapper/dists/gradle-2.13-all/7hsc6vr6mi3i6i5m7q9hj4ci1q
Remove existing zip file
sudo rm /var/root/.gradle/wrapper/dists/gradle-2.13-all/7hsc6vr6mi3i6i5m7q9hj4ci1q/gradle-2.13-all.zip
If there is a *.zip.lck file, you'd better remove that too..
sudo rm /var/root/.gradle/wrapper/dists/gradle-2.13-all/7hsc6vr6mi3i6i5m7q9hj4ci1q/gradle-2.13-all.zip.lck
Copy downloaded file to that path
sudo cp /Downloads/gradle-2.13-all.zip /var/root/.gradle/wrapper/dists/gradle-2.13-all/7hsc6vr6mi3i6i5m7q9hj4ci1q/
Then try to run
ionic run android

mobile App with ionic

hello
I am trying to build hybrid app with ionic and cordova
at first i run below commands and they run successfully
but after running the last command i get this error
ionic start firtApp
cd firtApp
ionic platform add android
note: it return me android-21 error, and i changed the android-21 to android-18, and it runs successfully
ionic build android
after running the above command i got this error
BUILD FAILED
D:\New folder\android-sdk-final\android-sdk-fully\sdk\tools\ant\build.xml:601: T
he following error occurred while executing this line:
D:\New folder\android-sdk-final\android-sdk-fully\sdk\tools\ant\build.xml:542: U
nable to resolve project target 'android-21'
Total time: 1 second
C:\Users\Mohammad\firstapp\platforms\android\cordova\node_modules\q\q.js:126
throw e;
^
Error code 1 for command: cmd with args: /s /c "ant debug -f C:\Users\Mohammad\f
irstapp\platforms\android\build.xml -Dout.dir=ant-build -Dgen.absolute.dir=ant-g
en"
ERROR building one of the platforms: Error: C:\Users\Mohammad\firstapp\platforms
\android\cordova\build.bat: Command failed with exit code 8
You may not have the required environment or OS to build this project
Error: C:\Users\Mohammad\firstapp\platforms\android\cordova\build.bat: Command f
ailed with exit code 8
at ChildProcess.whenDone (C:\Users\Mohammad\AppData\Roaming\npm\node_modules
\cordova\node_modules\cordova-lib\src\cordova\superspawn.js:131: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)
please help me with this error
i really like to bulid hybrid apps with my web knowledge
thanks.
You can try this
Go to this directory
C:\Users\Mohammad\.cordova\lib\npm_cache\cordova-android\3.6.4\package\framework
Edit project.properties file. Change target to 19.
# This file is automatically generated by Android Tools.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file must be checked in Version Control Systems.
#
# To customize properties used by the Ant build system use,
# "ant.properties", and override values to adapt the script to your
# project structure.
# Indicates whether an apk should be generated for each density.
split.density=false
# Project target.
target=android-19
apk-configurations=
renderscript.opt.level=O0
android.library=true
Restart your terminal.
You don't have SDK correctly installed on you computer. (Path or SDK update)
It's write on your error log : You may not have the required environment or OS to build this project
you just need to install ant
sudo apt-get install ant
then do the same as before,its work correctly

necessitas - can't compile any project

I just installed necessitas on ubuntu 13.04 , on the package qtcreator , then i tried to compile the simplest project i could, which is a project just created, and even trying different AVDs with different APIs nothing changes.
It returns:
:-1: error: [install_target] Error 1 (ignored)
and
:-1: error: Can't copy gdbserver from '/home/federico/necessitas/android-ndk/prebuilt/android-arm/gdbserver/gdbserver' to '/home/federico/Android Projects/Hello-World/android/libs/armeabi/gdbserver'
Hope that this can help other people, because I didn't find anything on the web that really could help me.
Here is the compile output:
11:26:52: Running steps for project Hello-World...
11:26:52: Configuration unchanged, skipping qmake step.
11:26:52: Starting: "/usr/bin/make"
make: Nothing to be done for `first'.
11:26:52: The process "/usr/bin/make" exited normally.
11:26:52: Starting: "/usr/bin/make" 'INSTALL_ROOT=/home/federico/Android Projects/Hello-World/android' install
/bin/sh: 1: test: /home/federico/Android: unexpected operator
install -m 755 -p "libHello-World.so" "/home/federico/Android Projects/Hello-World/android/libs/armeabi/libHello-World.so"
install: cannot create regular file '/home/federico/Android Projects/Hello-World/android/libs/armeabi/libHello-World.so': No such file or directory
make: [install_target] Error 1 (ignored)
11:26:52: The process "/usr/bin/make" exited normally.
11:26:52: Copy Qt app & libs to Android package ...
Can't copy gdbserver from '/home/federico/necessitas/android-ndk/prebuilt/android-arm/gdbserver/gdbserver' to '/home/federico/Android Projects/Hello-World/android/libs/armeabi/gdbserver'
Error while building/deploying project Hello-World (kit: Android for arm (GCC 4.6, Qt 4.8.2))
When executing step 'Packaging for Android'
11:26:52: Elapsed time: 00:00.

Categories

Resources