I am doing an Augmented Reality application. Here I have Java Eclipse SDK . So I didn't change anything in the Eclipse SDK and Java. I didn't set any path for SDK also and I just downloaded and installed cygwin then I set path for that. I again installed vuforia.exe file and I set path in Eclipse preferences to vuforia and again download NDK. I just extact those ndk and copy in sdk root folder and I set path to ndk. Now I have downloaded vuforia sample apps and I copied all apps in samples folder. In Eclipse I just imported ImageTarget application and it's not showing any error but after running that while clicking start button I'm getting this error:
java.lang.UnsatisfiedLinkError: getOpenGlEsVersionNative
I checked QCAR jar in order and export and I cleaned my app but I am getting same exception can any one suggest me where I went wrong?
ImageTargets.class:
public class ImageTargets extends Activity
{
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
}
You should build the native code (C++) by running ndk-build command from cygwin command-line. Open up the Cygwin.bat in your installation directory to access the command-line and change the directory to the root folder of ImageTarget project and run this:
ndk-build
If it successfully builds the native codes, you should see a lib folder added to your project in Eclipse. Now, you may build your APK and run it on your device.
Alternatively, you can set an automatic NDK build in Eclipse that runs before every time you build your project. So you you don't need to do it manually. See Setting up Automatic NDK Builds in Eclipse.
Related
When i try to use "ndk-build" i get following error
C:\Users\mack\AndroidStudioProjects\MyApplication>ndk-build 'ndk-build' is not recognized as an internal or external command, operable program or batch file.
Well after some research i found that ndk is not included in path folder of environment variables. Now when i check via SDK i can clearly see that i have checked and installed android NDK using the SDK of android studio, the path of which is
C:\Users\mack\AppData\Local\Android\sdk\ndk-bundle
and i even added this path to environment variables but no use. I am new to android so please pardon me if i am asking a dumb question. But its got me totally confused from like past couple of days.
Do i need to download and install android NDK manually from the link below and install it and then add it to environment variables-path?
I have also included the snapshotot folder contents from NDK installed using android SDK
What i can see from your error is that the PATH to the ndk-build may not be correct or that you do not have a runnable ndk-build file.
Are you sure that ndk-build.cmd is located inside of C:\Users\mack\AppData\Local\Android\sdk\ndk-bundle?
A solution to this can be to download the Windows 32-bit NDK package from Android NDK Download where the ndk-build file is runnable. And add the path to this folder to the
I've been trying to write a simple android app using NDK in Eclipse IDE.
Added NDK plug in
Added jni folder in the project and written a Cpp code
Built it properly using ndk-build
so file(s) are also generated
Compilation was successful and error-free. Yet, I'm unable to run it as an Android App as the apk file hasn't been generated.
Kindly help :)
Hi. I want to work on an Augmented Reality application. So I followed this link https://developer.vuforia.com/resources/dev-guide/step-2-installing-vuforia-sdk and I installed sdk, ndk, cygwin, vuforia-sdk-android-2-0-31 and I set path for all of them but when I run ImageTargets sample app, I'm getting unsatisfied link exception. Can anyone suggest me where I did wrong and how to solve that issue.
in my case
sdk path: C:\Development\Android\android-sdk-windows
eclips path: C:\Development\Android\android-sdk-windows\eclipse
cygwin path: C:\cygwin
ndk path: C:\Development\Android\vuforia-sdk-android-2-0-31
vuforia-sdk-android path: C:\Development\Android\vuforia-sdk-android-2-0-31
In environment variables I set path to sdk, ndk and cygwin like below:
C:\Development\Android\android-sdk-windows\tools\;
C:\cygwin\bin;
C:\Development\Android\android-ndk-r8\
You should build the native code (C++) by running ndk-build command from cygwin command-line. Open up the Cygwin.bat in your installation directory to access the command-line and change the directory to the root folder of ImageTarget project and run this:
ndk-build
If it successfully builds the native codes, you should see a lib folder added to your project in Eclipse. Now, you may build your APK and run it on your device. You should repeat this step every time you make a change to native codes.
I am having a problem I can run ndk outside of eclipse but not from the workspace folder. I get an error of a missing file.
Android NDK: ERROR:jni/Android.mk:QCAR-prebuilt: LOCAL_SRC_FILES points to a missing file
Android NDK: Check that jni/../../../build/lib/armeabi/libQCAR.so exists or that its path is correct
/cygdrive/c/Users/ALEXDEV/android-ndk-r8b/build/core/prebuilt-library.mk:43: *** Android NDK: Aborting . Stop.
I am wondering if when I create the android project one of the files isnt copied. But when I run it inside eclipse
I get this error. I followed this tutorial
http://mobilepearls.com/labs/ndk-builder-in-eclipse/
The error I got when running ndk in eclipse was as follows
"C:\Users\ALEXDEV\android-ndk-r8b\ndk-build" (in directory "C:\Users\ALEXDEV\workspace\Image"): CreateProcess error=193, %1 is not a valid Win32 application
What do you suggest that I did wrong and what method do you propose will fix this problem.
I am using Eclipse Java EE IDE for Web Developers.
Version: Indigo Service Release 2
I am following this tutorial
http://tools.android.com/recent/usingthendkplugin
I am using this upload
Indigo - http://download.eclipse.org/releases/indigo
Instead of dowloading a package from the link I chose the option add but I used archieve.
Packages can be downloaded straight from eclipse. Here is the link that I used to download
the package http://www.eclipse.org/cdt/downloads.php
I then download this version of the ndk
I got the ndk examples working so the problem is solved.
With ndk r8b, you don't need cygwin at all. Set the build command as ndk-build.cmd
Note that your tutorial is outdated. The recent versions of ADT plugin allow you to simply click "add native support" to a Java project.
I am new to Android and using Android 2.3 .
There is sample Browser plugin in the source code I am trying to build
it but unable to do so.
To compile plugin [ In README.txt ]
run "make SampleBrowserPlugin" (compiles libsampleplugin.so and
builds the apk)
the previous command produces an apk file so record its location.
Using the above steps I am unable to build it.
I have tried the following things :-
I thought to build the code in JNI folder first so as to get the
plugin ".so" so that after getting the ".so" would build the project
apk using the eclipse .
I tried building the code in the JNI folder using NDK build.The code
was not geting build it was giving "undefined reference to
JNIRegisterNativeMethod in JNIHelp.h "
Can anyone tell me how to build the Sample plugin and install it
on Emulator.
You need to "make SampleBrowserPlugin" from the root of your source installation (on a Linux machine). That is, the same directory that contains "bionic", "build", "dalvik", etc. as child directories.