Jump to content

  • Log In with Google      Sign In   
  • Create Account

Javah problems with class that extends Activity


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 Seabolt   Members   -  Reputation: 633

Like
0Likes
Like

Posted 07 April 2013 - 05:11 PM

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

Sponsor:

#2 Seabolt   Members   -  Reputation: 633

Like
0Likes
Like

Posted 09 April 2013 - 06:05 PM

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




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS