Javah problems with class that extends Activity

Started by
0 comments, last by Seabolt 11 years, 1 month ago

Hey guys, I'm currently trying to write hello-jni but in my own code and projects to get an idea of the flow of getting an android app working.

I've setup my make file, my source file, got it all compiling. But I get an unsatisfied link error when I try to run the app. So I take a look around and see that I need to run the javah to create a .h file that will forward declare my function and avoid name mangling.

So I setup an external tool in Eclipse using this guide, and it seems to work fine, except I get an error saying

"Error: cannot access android.app.Activity

class file for android.app.Activity not found"

From what searching I've done it's because it can't find the android.jar in the sdk directory, but how to I provide it properly? Or is that what is actually being looked for?

I'm so close to getting this to work haha.
Perception is when one imagination clashes with another
Advertisement

Since no one is responding, I'll try a different question; is javah really necessary? It seems like I should be able to resolve the name mangling myself. And I never had to run it on hello-jni, though I imagine it's only because the name mangling isn't an issue in C.

Has anyone done any C++ development in Android using JNI?

Perception is when one imagination clashes with another

This topic is closed to new replies.

Advertisement