Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Native method not found #4

Closed
4ntoine opened this issue Mar 4, 2014 · 3 comments
Closed

Native method not found #4

4ntoine opened this issue Mar 4, 2014 · 3 comments

Comments

@4ntoine
Copy link

4ntoine commented Mar 4, 2014

I've added pom.xml, compiled module as maven apklib and added as maven dependency.
I've also compiled my native lib with NativeCrashHandler.cpp and .h.

On app run (Application.onCreate()) i'm getting exception:

03-04 17:02:36.327: ERROR/AndroidRuntime(2783): FATAL EXCEPTION: main
        java.lang.UnsatisfiedLinkError: Native method not found: com.github.nativehandler.NativeCrashHandler.nRegisterForNativeCrash:()Z
        at com.github.nativehandler.NativeCrashHandler.nRegisterForNativeCrash(Native Method)
        at com.github.nativehandler.NativeCrashHandler.registerForNativeCrash(NativeCrashHandler.java:23)

so it looks like some .so lib is missing

@4ntoine
Copy link
Author

4ntoine commented Mar 4, 2014

i've found Java_com_github_nativehandler_NativeCrashHandler_nUnregisterForNativeCrash in NativeCrashHandler.cpp but it seems that System.loadLibrary() should be invoked before new NativeCrashHandler().registerForNativeCrash(this); is there is no word about it in Usage

@4ntoine
Copy link
Author

4ntoine commented Mar 4, 2014

Is there any opportunity to make loading NativeCrashHandler separated from loading native library? Case: native code (.so) is downloaded from the internet and it's not attached to any activity. The best solution would be to load libraries separately (and NativeCrashHandler on App.onCreate())

@SalomonBrys
Copy link
Contributor

The project has been discontinued.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants