Android.mk for Github Java SDK (win7 32-bit) - android

I am trying to build tango-examples-java-master/PointCloudJava.
Is there an Android.mk for the tango-examples-java-master/TangoUtils dependency or should i create one?
In general will Tango SDK developers provide us with a generic makefile that we can tweak according to our multi-platform needs?
Cheers
NY
ps. I know that Tango supports linux only, for now i overcome this by pointing to a GNU-C compiler C:\android-ndk-r10b\platforms\android-19\arch-arm\usr\include.

The PointCloudJava and TangoUtils are purely java projects with no native components, not sure why you would need a make file here. You just need to specify TangoUtils as a dependency in Project Properties and add it your build path.

Related

How "...android.googlesource.../external/icu/" used by android studio & ndk?

as the title, i try all my efforts to find out how to use it, but failed. there isn't any manual/readme to guide.
obsolutely, I'm a rookie.
can any one give some advices?
android.googlesource.../external/icu/ address
You are not expected to use the Git repository alone.
See https://source.android.com/setup/develop - there is a tool called repo which stitches together a collection of Git repositories, controlled by a manifest (itself versioned in Git). If you follow the directions for checking out AOSP, you will find that repository at platform/external/icu, where it can get built by the top-level build system.
It's not really feasible to use Android Studio on the whole AOSP project. If you're looking to make use of ICU within your own NDK project, you should bundle your own; the platform's ICU is not made available to non-platform native code.

Cannot resolve symbol webrtc in Android Studio

I am trying to use webrtc in Android Studio. The file libjingle_peerconnection_so.so is put int the folder src/main/jniLibs/arneabi-v7a. But when I put in a Java file:
import org.webrtc.DataChannel;
it tells me that can not resolve "Cannot resolve symbol webrtc". Any help appreciated.
First, its armeabi-v7a, not arneabi-v7a, but that alone will not solve your problem :)
You are going the hard way, so here is a little theory:
The file libjingle_peerconnection_so.so itself is not enough to use WebRTC in Java program. At least, you need the Java JNI wrapper for WebRTC core, which provides you all necessary Java classes to work with native WebRTC code. Default wrapper is usually libjingle_peerconnection.jar, which you should put in "libs" folder on the same level as your "src" folder. So, your project tree should have these files:
src/main/jniLibs/armeabi-v7a
libs/libjingle_peerconnection.jar
Also you need to tell your build system to build the .jar in your app. In Android Studio it's usually Gradle, so just add compile files('libs/libjingle_peerconnection.jar') into your dependencies.
But there is also the easy way! Good guys from pristine.io regularly build WebRTC for Android and publish some pre-built versions to Maven repository (see here). So, you can just add compile 'io.pristine:libjingle:10839#aar' to your Gradle dependencies, and go. No need to add .so files and all that. Here is their article on that (note the outdated WebRTC version, you can use 10839, for example)

How to Build CMake based project for Android/iOS using QtCreator

I have created a Non-Qt C++ (CMake) project using Qt, and I am able to build it using MinGW, MSVC compiler.
So in short, when I am opening my test project I can select the generators under Run CMake Window. I have issue with other platforms.
When I am trying to Add a kit for Android, there are no generators available in the list. I tried the same thing on Macbook, there also the same problem.
I need help on this issue, I couldn't get the proper steps to build the CMake based project for Android/iOS using QtCreator.
P.S. Installed CMake version is 3.2.1 and Qt Version is 5.5, I have installed Android SDK, NDK , and and Java
I would love to tell you "just check this box in the options dialog and it will work", but, unfortunately, there is no generator that you can use to build an Android/iOS project from a CMakeLists.txt file.
I found alternatives, in all cases, I don't think your have a chance to port a whole huge CMake-based project that used to work on Windows (with lots of libraries and 3rd party libraries) work on Android in less than a few days of work....;-)
Personnaly, I wrote a small CMake function generating the .pro file manually from my CMake scripts. It started small but is now huge and it's difficult to share it with you. But, basically, I started from this post on a Qt forum. It creates a simple .pro file that does not work that bad and then you can extend it for your own needs. I like this solution because I have full control on generated .pro file (mine can now build on PC, Android and iOS...but I had a hard time to have this fully work).
Apparently, there's also a way to add a Qt-android CMake support using this open source stuff: https://github.com/LaurentGomila/qt-android-cmake. But I never tried it. You may want to have a look to it. If it works, it may be more convenient that writting your own script generating .pro files. Apparently, it builds an Android apk using androidqtdeploy but without using QtCreator. There's also an iOS support.
Finally, the best may be to have CMake propose a QtCreator "generator" (it would generate .pro files, like CMake generates sln/vcproj files when using Visual Studio generator or makefiles for g++ generator....), but there is no such generator supported. I reported this to CMake team some time ago hoping they could fix that. I understood that there was and would be no plan to do that because CMake targets only "compilers" as "generators" and "QtCreator" is not really a "compiler", it's a "IDE" using external "compilers" to build (MinGW, MSVC, CLang, Android's NDK g++...). It's a shame because CMake known all your project information and could easily generate a .pro file....so, as, CMake is opensource, one may extend CMake with a custom QtCreator file generator...and share it with the whole world,it would be wonderful!
Hope this will help you!

Android.mk for LibXtract

Can somebody help me write Android.mk for LibXtract or point me in correct directoin?
Here is source for lib - https://github.com/jamiebullock/LibXtract.git
Or mayby there is a way to use linux generated shared objects in Android?
Especially for bigger established projects, crafting Android.mk files is quite an effort. More so, if you are not familiar with Android NDK build architecture whose understanding requires digging deep into the documentation and Android NDK make files. I would suggest trying to use existing make files by setting CC to point to your NDK tool chain, and CFLAGS += -sysroot $(SYSROOT) where SYSROOT=${NDK_INSTALL_DIR}/platforms/android-<level>/arch-<arch>/ (depending on targeted Android API version and architecture). Even without knowing about your library, I would bet you should have good chance of success this way. Android NDK documentation (${NDK_INSTALL_DIR}/doc/STANDALONE-TOOLCHAIN.html) details the use of independent tool chain and also instructs how to create a standalone tool chain that will not require the use of -sysroot argument to xxx-gcc.
If you decide to use Android.mk instead, you might check existing projects -CSipSimple comes to my mind (PJSIP converted from standard form GNU make files).
Important is to create the shared objects using Android tool chains. It is possible to build them outside of your application source tree, and then just copy the shared objects into the package source libs/<architecture>/ directory.
Integration with your build system depends on details that are not known (including how smooth you desire this whole integration to be e.g. because of other people working with the same project). If you are creating an application from command line, the easiest would be to have GNU make file or shell script in the package root directory ensure libXtract.so and your application package is up-to-date by calling libXtract make file and ant to build and pack your Java application. If you are using ant there should be a way to specify using make to take care of libXtract.so. I am not sure if eclipse is completely relying on ant for building an application to know if this would be enough for enabling complete build by clicking mouse buttons from within eclipse, too.
The answer to this question says you could use cmake script to build Android.mk files - I have not tried this approach.

What is an Android.mk file

A project that I am trying to build has one of these, and I want to know exactly which tools are needed to build the project. I see some reference to NDK when I search but is that the only tool? It appears that this file is making a jar file, I see no reference to native code ( c++ )
The Android.mk files in the SDK samples are required to properly include the samples in the SDK build (if you are actually venturing into that territory). These have no bearing on what you are doing when you use the sample. To the OP, I'm not sure if you are using a sample project, but if you are, you can ignore this file.
the best answer to your question is reading this article:
Android.mk file syntax specification
https://android.googlesource.com/platform/ndk/+/4e159d95ebf23b5f72bb707b0cb1518ef96b3d03/docs/ANDROID-MK.TXT
after reading it you can figure out the idea behind the android.mk file.
cheers
I've seen some of the Android sample code come with an Android.mk file for no apparent reason -- maybe this gets auto-generated upon project creation if you happen to have the NDK installed or something. Android.mk does seem to be an NDK-specific thing.
So if there's really no native code involved, then if you're looking to build from the command line, make sure you have the JDK, Ant, and Android SDK installed.
Then take a look at
http://developer.android.com/guide/developing/projects/projects-cmdline.html#UpdatingAProject
After you run the "android update project ..." step, you should hopefully be able to do an "ant debug" to build the application.

Categories

Resources