I am developing a program that uses native code and it works fine on 开发者_如何学Cthe testing device Samsung galaxy S
but when i try it on the emulator it doesn't work , the program just closes with no exceptions.
while debugging i found that the program crashes once it reaches a call to any native method
is there a way to make the program work on emulator?
Edit: i tried another program that uses native methods on emulator and it worked.
Application works with native ARM code also on emulator. The emulator behaves as normal ARM device, and emulates also ARM code.
I have no problems running my native apps on the emulator.
You should study logcat output to find reason of your failures.
Did you call LoadLibrary? The NDK includes example programs like HelloJNI. You should be able to get that to run, then work from there.
精彩评论