I have some issues in building ics-openvpn project. When I deploy the app on the device and try to import a .ovpn file, I get cannot find minivpn. I think this error is related to an error during the app building.
I've downloaded android NDK and set the path in Eclipse, downloaded cygwin and launched ./build-native.sh, but it returns me the error
./build-native.sh: line 1: ndk-build: command not found
I've tried to modify the path in the .sh with the path of ndk-build, but I get another error:
NON-CYGWIN COMPATIBLE MAKE PROGRAM.....
Anyone knows what steps I have to follow to properly build the project?
You should not try to build it with the cygwin. There is also a build-native.bat in the project which allows the project to be build with windows. Make sure that you have installed the ndk and ndk-build is in your PATH.
Run build-native.bat
make sure you must have NDK 8b and set the environment variable for the ndk file
Related
I made a neko project for Windows using FlashDevelop. I want to see if I can port it for android without remaking code or too much of it. In the past I was able to port to hmtl5 without having to remake code. Of course making an APK is different and requires getting some packages installed, I know that. The question is can I build android or I have to start a new project (like AS3) and go on in its own way?
I setup the
Path to Android SDK [C:\Programs\Android Development\platform-tools]: (contains adb, other files and the build-tools folder)
Path to Android NDK [C:\Programs\Android Development\android-ndk-r20]:
Path to Java JDK [C:\Programs\Android Development\jdk1.8.0_221]:
A simple project that displays an image. Errors I get when building 'android'
‘arm-linux-androideabi-g++’ is not recognized as an internal or external command,
operable program or batch file.
Error: Could not create PCH
Build halted with errors.
Or
in NativeCFFI.hx error: function body required
#:cffi private static function lime_jni_create_method(className:String, method:String, signature:String, isStatic:Bool, quiet:Bool):Dynamic;
‘arm-linux-androideabi-g++’ is not recognized as an internal or external command, operable program or batch file. Error: Could not create PCH Build halted with errors.
That error comes from an Android NDK that is too recent. Current HXCPP releases only support versions up to r15c, so I suggest you downgrade to that version.
Alternatively, you could try installing HXCPP from GitHub, as support for newer NDKs was recently merged.
I have downloaded android-ndk-r10e & I have also setted path in environment variable as well as NDK path for eclipse. I was able to build and run HelloJni sample app from eclipse, but when I use console to build it says
'ndk' is not recognized as an internal or external command,operable
program or batch file.
I have googled this and have also installed Cygwin even though it's not mentioned in offical google installation instructions(https://developer.android.com/ndk/guides/setup.html) but to no vain.
I have set my path but when I do echo %path% it dosen't show up. How can I use NDK from command lines.
The command you're probably looking for is ndk-build, not ndk.
I am using this link, the answer by star18bit, to integrate MuPDF with my Android project.
I am able to run the ndk-build that is inside the MuPDF's android folder. But when I copied all MuPDF's files to my own project, and ran ndk-build from my project's jni folder, it gives this error:
make: *** No rule to make target ../jni/fitz/base_context.c', needed by ../jni/fitz/base_context.o'. Stop.
Any help to resolve this would be greatly appreciated!
I am following this link as it is, i.e., using the mupdf version 1.2 and android ndk r8e
I was trying to build this on MAC, but gave up.
Finally I did it on Windows 7, encountered a lot of issues while doing it. So I made a tutorial for it, for other users so that they don't have to go through the pain that I went through!
Here's the link:
http://howtojava.net/tutorials/android/integrate-mupdf-with-android-in-windows-7
I've been trying to get started on adding native code to my android app so I've looked through a plethora of Android NDK tutorials all to no avail. I can't get any of the apps to run on my emulator or my Galaxy S3. I keep getting the same error: "Unfortunately, [AppName] has stopped working"
My ndk-build command works successfully and I get a .so file. I don't know what the .so file is supposed to look like. Here's mine
http://txt.do/klo0
it looks like gibberish to me but what do I know?
This is my logcat
http://txt.do/klod
In the Android NDK directory, there is a hello-jni example. Try to compile and run it, it works.
It's in the samples/hello-jni directory of your NDK, I have it in ~/android-ndk-r9d/samples/hello-jni. Copy ("import") it into your workspace and compile.
To generate the headers:
cd bin/classes
javah com.my.package.name.MyClassName
Note that the library is usually placed by ndk-build into the libs/something subdirectory of your project, for example, libs/armeabi-v7a, and the file jni/Application.mk specifies what something is, e.g.
APP_ABI := armeabi-v7a
or
APP_ABI := all
The library will be placed in your apk and installed in a subdirectory of your application's data folder.
System.loadLibrary("stuff"); // libstuff.so
will find it. (Note that if you run your app as a system app, that's a different story.)
A library built for a wrong target will not work.
I am trying to install Rhodes for Android application development. I installed rhodes gem (version 3.2), Android SDK latest release and Android NDK (latest). I run "rhodes-setup" and gave the installation path of Java, Android SDK and NDK. When i try to run "rake run:abdroid" for a sample rhodes applocation, it shows as
"WARNING!!! Path to Android NDK contain spaces! It will not work because of the G
oogle toolchain restrictions. Move it to another location and reconfigure rhodes."
I moved to another location and tried a another version of NDK ( revision 6 and 6b). But still having error. Could please point out what i am doing wrong?
Thank u.
Make sure there are no spaces in the path, like the error message suggests.
Bad NDK Path
C:\Program Files (x86)\android-ndk-r4\
Good NDK Path
C:\source\sdks\android-ndk-r4\
Update the path to the NDK in the Rhodes build configuration files. Try running "rhodes-setup" again and pointing it to your new NDK path.
Just move your NDK folder to your root folder. I have it like this:
C:\android-ndk-r5b
Remember to configure rhodes setup after you have made this change and before running your program. You do this by running:
$ rhodes-setup
on the command prompt while in your app folder.