I am trying to build webrtc android demo application. I was following README applied by the project. First thing was mentioned about gclient but when i tried to run it "no external or internal command". Then i got this link according to the this link i cloned the depot_tool repository but when at the step when i try to run gclient i got this
So after hours of trying i am not able to run it. if any one has experience with this WebRTC library please provide some help. Any guidance? Any Hlep will be appreciated
I heard few things were changed from svn to GIT. We tried building webRTC to windows7 using visual studio. See if you can use any parts on this.
Get depot_tools software and extract to a location (set this path in environment variable).
cd to depot_tools directory and hit 'gclient' (this should take sometime)
Install python 2.7 and put it path.
create a folder of your choice for webRTC and open command prompt there.
Now hit, gclient config http://webrtc.googlecode.com/svn/trunk
then, gclient sync.
Then set GYP_GENERATORS=msvs environment variable (use ninja if you want that).
Also set msvs_version=2012 (depending on your visual studio version)
now run, gclient runhooks --force
This should generate solutions files for your folder. fireup the libjingle/webrtc.sln files and start building it. I'm not sure if it builds as is. But we had hicupps with that.
See this link on WebRTC native development if you haven't already. From my personal experience building this tricky job initially.
Also note that links might be deprecated as they moved to git, don't know if they are still maintaining it.
How to compile WEBRTC On ubuntu
download script and run:
https://cs.chromium.org/chromium/src/build/install-build-deps.sh
./build/install-build-deps.sh --no-chromeos-fonts
Now download depot tools
$ git clone --depth 1 https://chromium.googlesource.com/chromium/tools/depot_tools.git
Put it in Path
$ export PATH=`pwd`/depot_tools:"$PATH"
Define your settings:
export GYP_DEFINES="target_arch=x64 host_arch=x64 build_with_chromium=0 use_openssl=0 use_gtk=0 use_x11=0 include_examples=0 include_tests=1 fastbuild=1 remove_webcore_debug_symbols=1 include_pulse_audio=0 include_internal_video_render=0 clang=1 "
make file to download the source
mkdir webrtc-checkout
cd webrtc-checkout
I chose branch 50 you can change it
gclient config https://chromium.googlesource.com/external/webrtc.git#branch-heads/50 --name=src
gclient sync --force --with_branch_heads
gclient sync --force --with_branch_heads --nohooks
cd src
git checkout branch-heads/50
gclient runhooks
ninja -C ./out/Release
Collect your LIB & Include file to use it in your project
mkdir ../lib/
find ./ -name "*.o" -and -not -name do_not_use -and -not -name protoc -and -not -name genperf -exec ar crs ../lib/libwebrtc.a {} +
mkdir ../include
find ./ -name *.h -exec cp --parents '{}' ../include ';'
Related
I am trying to build OpenCV to include OpenCV contrib modules which is in a repository. I am following the instructions in this link, but i could not understand the cmd commands which is i mentioned in the section titled "cmd commands" as follows.
cmd commands:
$ cd <opencv_build_directory>
$ cmake -DOPENCV_EXTRA_MODULES_PATH=<opencv_contrib>/modules
<opencv_source_directory>
$ make -j5
here are my attempts to get the cmd commands as mentioned above running:
1-concerning the opencv_build_directory: i just created it by myself and named it 'build' as shown in the image in the section titled "OpenCV3.0.0 source"
2-concerning the opencv_source_directory: i think it should be "OpenCV-android-sdk" as shown in the image section titled "OpenCV3.0.0 source"
3- for the cmd command '$ cd ' i set it as follows:
c:\xxxx\libs\OpenCV-3.0.0-android-sdk-1\OpenCV-android-sdk\build>
4- for the cmd command '$ cmake -DOPENCV_EXTRA_MODULES_PATH=/modules' iset it as follows:
cmake -DOPENCV_EXTRA_MODULES_PATH=opencv_contrib-master/modules OpenCV-
android-sdk
the entire command i type in the cmd is:
c:\xxxx\libs\OpenCV-3.0.0-android-sdk-1\OpenCV-android-
sdk\build>cmake -DOPENCV_EXTRA_MODULES_PATH=opencv_contrib-
master/modules OpenCV-android-sdk
but after running it, i get:
CMake Error: The source directory "C:/xxxx/libs/OpenCV-3.0.0-
android-sdk-1/OpenCV-android-sdk/build/OpenCV-android-sdk" does not
exist.
Specify --help for usage, or press the help button on the CMake GUI.
please help me to build the path correctly as stated in the linke mentioned
note:
I am trying to install opencv contrib modules on android through android Studio
OpenCV3.0.0 source
OpenCV-contrib source:
I am trying to import some third party module like pygoogle in my app when i run app in computer using kivy it works fine but when i make apk using buildozer it crashes every time then i find that i have to go in python-for-android and run this command to include module ./distribute.sh -m "pil ffmpeg kivy" but i still get error that
root#kali:~# cd ~/.buildozer/android/platform/python-for-android
root#kali:~/.buildozer/android/platform/python-for-android# ls
COPYING dist docs README.rst src
cythonizer.py distribute.sh LICENSE recipes tools
root#kali:~/.buildozer/android/platform/python-for-android# ./distribute.sh -m "pil ffmpeg kivy"
Check build dependencies for Kali
Avoid check build dependencies, unknow platform Kali
Check environment
No ANDROIDSDK environment set, abort
root#kali:~/.buildozer/android/platform/python-for-android#
I am using KAli Linux and please solve this someone ...it will be very helpfull to me
Try pasting the pygoogle folder in your app's directory, at the same level as main.py. Also, from the error, it looks like you need to set the ANDROIDSDK environment variable. See the docs.
I had a similar problem, and simply setting the ANDROIDSDK environment variable didn't sort it, but the following did.
Try the following and then run the ./distribute.sh -m "pil ffmpeg kivy" command from the same terminal(as the environment vars will only have been set for that terminal and any child processes), or alternatively, add these lines to your ~/.bashrc file for them to be permanent:
export ANDROIDSDK=/path/to/android-sdk
export ANDROIDNDK=/path/to/android-ndk
export ANDROIDNDKVER=rX
export ANDROIDAPI=X
# example
export ANDROIDSDK="/home/tito/code/android/android-sdk-linux_86"
export ANDROIDNDK="/home/tito/code/android/android-ndk-r7"
export ANDROIDNDKVER=r7
export ANDROIDAPI=14
Examples taken from here. I recommend having a look.
I wanna use tesseract library with my application so i need to implement ndk.i download it add its path to my bash_profile.
export ANDROID_ADB=/Users/gokhanaliccii/Library/Android/sdk/platform-tools
export ANDROID_NDK=/android_ndk/android-ndk-r10d
export PATH=$PATH:$ANDROID_ADB:$ANDROID_NDK
My problem is appeared when i run -javah command at studio terminal. My command is
javah -d jni -classpath /Users/gokhanaliccii/Library/Android/sdk/platforms/android-19/android.jar:/Users/gokhanaliccii/Documents/gokhan_private/android_ocr/NDK_TEST/app/build/intermediates/classes/debug gokhanaliccii.kou.ndk_test.MainActivity
after i got this error i tried to add support libraries
I tried to solved it but i coulndt find solution i'm really exhausted i hope someone know how to solve it
My project is at /Users/gokhanaliccii/Documents/gokhan_private/android_ocr/NDK_TEST
Dont need cp for javah
Run javac on source that includes file with native headers.
Cd to path that is parent of the root of where the ".class" files are.
On cli or in terminal run the javah ( no cp needed )
If stuvk do the ndk samples and it will make sense . They walk u thru javah sample
After lot of researches and training i solved my problem.
javah -classpath /Users/gokhanaliccii/Library/Android/sdk/platforms/android-19/android.jar:/Users/gokhanaliccii/Library/Android/sdk/extras/android/support/v7/appcompat/libs/android-support-v4.jar:/Users/gokhanaliccii/Library/Android/sdk/extras/android/support/v7/appcompat/libs/android-support-v7-appcompat.jar:../../build/intermediates/classes/debug -d jni gokhanaliccii.kou.ndk_test.MainActivit
My result command is above.I tried it at android studio,classes files are at build/intermediadtes/classes/debug if you want try it at eclipse it is under bin folder.
I have downloaded Cocos2d-x-3.1.1 but it does not include #create-android-project.bat and #create-android-project.sh then i download these 2 files from the internet and i tried to create project i receive the error. anyone have any idea please kindly help.
.............
Resolved location library project to C:\ADT\cocos2d-x\cocos2dx\platform\android\java
Error: Project folder 'C:\ADT\cocos2d-x\cocos2dx\platform\android\java' is not valid directory
Error: No Android manifest at: C:\ADT\cocos2d-x\cocos2dx\platform\android\java
Error!!!
Don't run in cygwin. You should run corresponding bat.
Press any key to continue.
$ cocos new ProjName -p com.compnyName.ProjName -l cpp
You should use cocos2d-console for creating project.
$ cocos2d-x-3.1.1/tools/cocos2d-console/bin/cocos new -d . -p com.example.testproject -l cpp TestProject
I am unable to build helloWorld sample to get .so to run it in eclipse. I have imported project successfully and changed variable to my root path as required. this is my build_native.sh. I am pasting the only change I made in that file
NDK_ROOT_LOCAL=/cygdrive/e/android-ndk-r8
COCOS2DX_ROOT_LOCAL=/cygdrive/e/cocos2d
And my NDK is working fine because I have executed HelloWorld sample of NDK successfully. My SDK version is 20 and NDK version is 8 and I am using cygwin above than 1.7.. I have executed the chown on my NDK directory.. But when I run the command ./build_native.sh in HelloWorld sample program for cocos2d I get this error
E:/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/png.a: No such file: Permission denied
collect2: ld returned 1 exit status
and when I search for png.a in my NDK directory window can't locate that file. I am confused whether it's a permission error or File isn't there. But I have the latest NDK if file isn't there how come anyone will able to run cocos2d-x??? Need Help!!!
It seems like the permissions on built files were missing when I tried as well.
$ ls -l obj/local/armeabi/png.a
---------- 1 someuser Domain Users 912618 Jul 12 18:23 obj/local/armeabi/png.a
There is a link suggested on the forum which doesn't seem to be accessible right now.
Anyway, to fix, you can set the permission on the files.
$ cd obj/local/armeabi/
$ chmod 664 *.a
$ cd ../../..
Edit: A better fix may be to set the default permissions in /etc/fstab to
none /cygdrive cygdrive binary,noacl,posix=0,user 0 0
Following this, you should be able to run ./build_native.sh.
A command you could use to locate all files below the current directory which have no (read/write) permission available on them is find . -type f -perm 0
See this answer to set write permissions on all files below your working directory.
Consider going through a tutorial on chmod to understand the concept of permissions in linux/unix in case you're unfamiliar with them.