JNI run time error even I use same code and lib as Android source code.

by Jerry Yang » Tue, 24 Feb 2009 09:47:30 GMT

Sponsored Links
 Hi, Marco
I am really new in android develop ment, so where should I check the system
with best wishes


JNI run time error even I use same code and lib as Android source code.

by Jerry Yang » Tue, 24 Feb 2009 15:39:06 GMT

 Hi, Marco and all
Here is the log:

D/AndroidRuntime( 1221):
D/AndroidRuntime( 1221): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
D/AndroidRuntime( 1221): CheckJNI is OFF
I/ActivityThread( 1223): Publishing provider
ider: com.android.vending.SuggestionsProvider
D/AndroidRuntime( 1221): --- registering native functions ---
I/jdwp    ( 1221): received file descriptor 23 from ADB
I/ActivityManager(   52): Stopping service:
I/ActivityManager(   52): Starting activity: Intent { flags=0x10000000
.android.hello/com.android.hello.HelloAndroid} }
I/ActivityManager(   52): Start proc com.android.hello for activity
hello/.HelloAndroid: pid=1240 uid=10023 gids={}
D/AndroidRuntime( 1221): Shutting down VM
D/dalvikvm( 1221): DestroyJavaVM waiting for non-daemon threads to exit
I/dalvikvm( 1221): DestroyJavaVM shutting VM down
D/dalvikvm( 1221): HeapWorker thread shutting down
D/dalvikvm( 1221): HeapWorker thread has shut down
D/jdwp    ( 1221): JDWP shutting down net...
D/jdwp    ( 1221): +++ peer disconnected
I/dalvikvm( 1221): Debugger has detached; object registry had 1 entries
D/dalvikvm( 1221): VM cleaning up
D/dalvikvm( 1221): LinearAlloc 0x0 used 541332 of 4194304 (12%)
I/jdwp    ( 1240): received file descriptor 10 from ADB
D/dalvikvm( 1240): Trying to load lib /system/lib/libhello.so 0x433b50d8
D/dalvikvm( 1240): Added shared lib /system/lib/libhello.so 0x433b50d8
D/dalvikvm( 1240): No JNI_OnLoad found in /system/lib/libhello.so 0x433b50d8
W/ActivityManager(   52): Activity pause timeout for HistoryRecord{435ae750
I/ActivityManager(   52): Displayed activity
com.android.hello/.HelloAndroid: 2025 ms
I/ActivityManager(   52): Stopping service:
D/dalvikvm(   90): GC freed 2431 objects / 127176 bytes in 276ms
D/dalvikvm( 1223): GC freed 2076 objects / 140976 bytes in 128ms
With best wishes


Sponsored Links

JNI run time error even I use same code and lib as Android source code.

by Jerry Yang » Tue, 24 Feb 2009 16:46:17 GMT

 Hi, all
I checked the logcat, I find it cannot find the jni_Onload,
Thanks for your information, I find I forget the function jni_Onload method,
it is a new requirement after jni)1.2
Now my hello world working.
With best wishes


Other Threads

1. WebView with theme doesn't show focused text field values

I have encountered a problem with focused text fields in a WebView not
showing entered text values.  As long as a WebView text field has
focus it will not show text or even the blinking cursor.  You can
select and highlight the text or unfocus the field to see it, but when
it gains focus it will not show the text... as if the foreground color
of the text is white.

The simplest code to demonstrate this is below.  With the setTheme
using a Light background, try typing values into the Email text field
to notice that the text is not visible when the field is focused.

import android.app.Activity;
import android.os.Bundle;
import android.webkit.WebView;

public class AndTest extends Activity {
    public void onCreate(Bundle savedInstanceState) {

        setTheme(android.R.style.Theme_Light_NoTitleBar); // <--
causes focused text fields not to show entered text

        WebView webContent = new WebView(this);


If the setTheme is set for a Light theme, the text in focused fields
cannot be seen.  I also have this happening in my program without the
theme if there are multiple Views within Views that have background
colors, but the above code replicates the problem.

Any suggestions or help is greatly appreciated.


2. How to compile android app with static library?could somebody give me a example?thanks

You can include the the library jar file in your Android Eclipe
project's library.


3. How to Zoom out a picture

4. Question about zoom a picture

5. When will Android Market will compete with Apple's app store

6. Android Market Feature Request: Contacting users who posted comments

7. How to find the Browser Home Page (URL)....