Android Hello-JNI Build Help

Started by
16 comments, last by Seabolt 11 years ago

It's possible that it means it is not compatible. You still have the problem with the file being in use. Did you try just restarting?

Advertisement

Yeah I tried running it after a fresh restart and got the same issue.

*Psst, Google, some helpful messaging would be great :)*

Perception is when one imagination clashes with another
I'm going to go over these from the start...

C:\NVPACK\android-ndk-r8d>ndk-build
C:/NVPACK/android-ndk-r8d/build/core/add-application.mk:128: Android NDK: WARNING: APP_PLATFORM android-8 is larger than android:minSdkVersion 3 in C:\NVPACK\android-ndk-r8d\samples\hello-jni/AndroidManifest.xml

If you open AndroidManifest.xml, you'll see that it says minSdkVersion is 3. That's a problem, because the NDK requires a min SDK of version 8. Basically, your manifest file is saying "I support Android API level 3!" (which is Android 1.5), but that's a lie, and it's warning you about it, because your makefiles are (correctly) saying that it requires at least API level 8 (version 2.2). Just change minSdkVersion in AndroidManifest.xml to be 8.

C:/NVPACK/android-ndk-r8d/build/core/setup-toolchain.mk:167: warning: overriding commands for target `C:\NVPACK\android-ndk-r8d\samples\hello-jni/libs/armeabi'
C:/NVPACK/android-ndk-r8d/build/core/setup-toolchain.mk:150: warning: ignoring old commands for target `C:\NVPACK\android-ndk-r8d\samples\hello-jni/libs/armeabi'
C:/NVPACK/android-ndk-r8d/build/core/build-binary.mk:439: warning: overriding commands for target `C:\NVPACK\android-ndk-r8d\samples\hello-jni/libs/armeabi'
C:/NVPACK/android-ndk-r8d/build/core/setup-toolchain.mk:167: warning: ignoring old commands for target `C:\NVPACK\android-ndk-r8d\samples\hello-jni/libs/armeabi'
C:/NVPACK/android-ndk-r8d/build/core/build-binary.mk:357: warning: overriding commands for target `C:\NVPACK\android-ndk-r8d\samples\hello-jni/obj/local/armeabi'
C:/NVPACK/android-ndk-r8d/build/core/build-binary.mk:357: warning: ignoring old commands for target `C:\NVPACK\android-ndk-r8d\samples\hello-jni/obj/local/armeabi'

These all look like they're the same error, but I'm not 100% sure I understand it. Try fixing the first warning and dealing with these later.

The process cannot access the file because it is being used by another process.
Gdbserver : [arm-linux-androideabi-4.6] libs/armeabi/gdbserver
The system cannot find the path specified.
make: *** [C:\NVPACK\android-ndk-r8d\samples\hello-jni/libs/armeabi/gdbserver] Error 1
Press any key to continue . . .

This one looks goofy because it's saying it can't find the gdbserver (the server for the GDB debugger, used to remotely debug native Android code).

I've never had problems like this when I've developed native stuff for Android, but then again, I've always worked on OS X and I've never used any nVidia stuff (just straight Android SDK + NDK). Sorry I'm not much more help.
[size=2][ I was ninja'd 71 times before I stopped counting a long time ago ] [ f.k.a. MikeTacular ] [ My Blog ] [ SWFer: Gaplessly looped MP3s in your Flash games ]

Haha, it's no problem I appreciate any tidbits of information!

The process thing is very weird. It's almost like it's launching the compiler twice for some reason.

Perception is when one imagination clashes with another

So I had to re-install the entire Android SDK and NDK. But I got it working now finally.
Thanks for your help guys!

I'm sure I'll be bothering you plenty as my project goes on.

Perception is when one imagination clashes with another

Glad you got it fixed. I'm getting my Android stuff reinstalled and running so I hope I can help you more. Easier to test when you have the development environment.

Alright, one quick follow up, just to make sure I have this right: I got hello-jni to compile by running the ndk-build.cmd file that was in my NDK directory. Now I've made my own project that was essentially the same as Hello-Jni but with new file names and such, just to see if I could reliably build a program and work on it. I could not.

When I tried to run the ndk-build again, it just re-compiled hello-jni. I changed my NDK_PROJECT_PATH in my computer's environment variables, but now I'm seeing there are tons of places where these environment variables can be set, where do I find them all?

Also I tried to provide a directory to the build script, and it would cd to my directory and then just compile hello-jni anyways.

I moved a copy of ndk-build to my projects jni directory. I tried running it from bash like so:

cd to my project root.
$ ./ndk-build

Then I get the output:



./ndk-build: line 40: dirname: command not found
./ndk-build: line 132: uname: command not found
ERROR: Unknown host operating system:

Any idea what could cause this? Also if I cd to the jni directory and run the file from there, I get a "cannot find file specified" error and the build never happens.

How do you run your ndk-build file? Where is it located? What environment variables do you have setup, and where?

Sorry for the long question, but everytime I think I have something figured out, I get lost again.
Perception is when one imagination clashes with another

Okay, so after playing around with the Path variable, I got it to work again. It's really strange stuff though. For a bit I could only compile through clicking the ndk-build.cmd, if I ran it from the command line, it would compile Hello-jni.

Anyways I have it compiling again, now I just have to solve my issues with linking. Thanks guys!

Perception is when one imagination clashes with another

This topic is closed to new replies.

Advertisement