Can you send the complete logcat and the steps you followed to execute
the application?
Are you running NDK's hello-jni application? If yes then follow this
link:

http://developer.android.com/sdk/ndk/index.html

Anu

On Mar 23, 11:56 pm, rizwan <rizcs...@gmail.com> wrote:
> Hi ,
>
> I m trying to run the sample Hello-jni application but it's crashing
> on emulator ,the application hello nji has stopped unexpectedly . can
> you suggest what' wrong with it ? I am running on Android 2.1
>
> I/installd(   31): move /data/dalvik-cache/
> d...@a...@vmdl32924....@classes.dex ->
>  /data/dalvik-cache/d...@a...@com.example.hellojni....@classes.dex
> D/PackageManager(   53): New package installed in /data/app/
> com.example.hellojni
> .apk
> D/AndroidRuntime(  117): Shutting down VM
> D/dalvikvm(  117): DestroyJavaVM waiting for non-daemon threads to
> exit
> D/dalvikvm(  117): DestroyJavaVM shutting VM down
> D/dalvikvm(  117): HeapWorker thread shutting down
> E/AndroidRuntime(  117): ERROR: thread attach failed
> D/dalvikvm(  117): HeapWorker thread has shut down
> D/jdwp    (  117): JDWP shutting down net...
> I/jdwp    (  117): adbd disconnected
> D/dalvikvm(  117): VM cleaning up
> D/dalvikvm(  117): LinearAlloc 0x0 used 620804 of 5242880 (11%)
> D/dalvikvm(   53): GC freed 13131 objects / 715120 bytes in 1217ms
> W/dalvikvm(   99): threadid=3: spin on suspend #0 threadid=15
> (h=3315448)
> W/dalvikvm(   99): dumping state: process - 99
> I/dalvikvm(   99): "main" prio=5 tid=3 RUNNABLE
> I/dalvikvm(   99):   | group="main" sCount=0 dsCount=0 s=N
> obj=0x4001b268 self=0
> xbd00
> I/dalvikvm(   99):   | sysTid=99 nice=0 sched=0/0 cgrp=default
> handle=-134400138
> 4
> I/dalvikvm(   99):   at
> java.lang.AbstractStringBuilder.enlargeBuffer(AbstractSt
> ringBuilder.java:~97)
> I/dalvikvm(   99):   at
> java.lang.AbstractStringBuilder.append0(AbstractStringBu
> ilder.java:155)
> I/dalvikvm(   99):   at
> java.lang.StringBuilder.append(StringBuilder.java:216)
> I/dalvikvm(   99):   at
> android.content.ComponentName.flattenToShortString(Compo
> nentName.java:136)
> I/dalvikvm(   99):   at
> com.android.globalsearch.SearchableSuggestionSource.<ini
> t>(SearchableSuggestionSource.java:90)
> I/dalvikvm(   99):   at
> com.android.globalsearch.SearchableSuggestionSource.<ini
> t>(SearchableSuggestionSource.java:82)
> I/dalvikvm(   99):   at
> com.android.globalsearch.SuggestionSources.addExternalSo
> urces(SuggestionSources.java:251)
> I/dalvikvm(   99):   at
> com.android.globalsearch.SuggestionSources.updateSources
> (SuggestionSources.java:240)
> I/dalvikvm(   99):   at
> com.android.globalsearch.SuggestionSources.load(Suggesti
> onSources.java:194)
> I/dalvikvm(   99):   at
> com.android.globalsearch.SuggestionProvider.onCreate(Sug
> gestionProvider.java:100)
> I/dalvikvm(   99):   at
> android.content.ContentProvider.attachInfo(ContentProvid
> er.java:710)
> I/dalvikvm(   99):   at
> android.app.ActivityThread.installProvider(ActivityThrea
> d.java:4267)
> I/dalvikvm(   99):   at
> android.app.ActivityThread.installContentProviders(Activ
> ityThread.java:4042)
> I/dalvikvm(   99):   at
> android.app.ActivityThread.handleBindApplication(Activit
> yThread.java:4001)
> I/dalvikvm(   99):   at android.app.ActivityThread.access
> $2900(ActivityThread.ja
> va:119)
> I/dalvikvm(   99):   at android.app.ActivityThread
> $H.handleMessage(ActivityThrea
> d.java:1901)
> I/dalvikvm(   99):   at
> android.os.Handler.dispatchMessage(Handler.java:99)
> I/dalvikvm(   99):   at android.os.Looper.loop(Looper.java:123)
> I/dalvikvm(   99):   at
> android.app.ActivityThread.main(ActivityThread.java:4363
> )
> I/dalvikvm(   99):   at java.lang.reflect.Method.invokeNative(Native
> Method)
> I/dalvikvm(   99):   at java.lang.reflect.Method.invoke(Method.java:
> 521)
> I/dalvikvm(   99):   at com.android.internal.os.ZygoteInit
> $MethodAndArgsCaller.r
> un(ZygoteInit.java:860)
> I/dalvikvm(   99):   at
> com.android.internal.os.ZygoteInit.main(ZygoteInit.java:
> 618)
> I/dalvikvm(   99):   at dalvik.system.NativeStart.main(Native Method)
> I/dalvikvm(   99):
> I/dalvikvm(   99): "ApplicationsProviderUpdater" prio=5 tid=15
> RUNNABLE
> I/dalvikvm(   99):   | group="main" sCount=1 dsCount=0 s=N
> obj=0x43bb43f8 self=0
> x331838
> I/dalvikvm(   99):   | sysTid=134 nice=10 sched=0/0
> cgrp=bg_non_interactive hand
> le=3315448
> I/dalvikvm(   99):   at
> android.database.sqlite.SQLiteProgram.clearBindings(SQLi
> teProgram.java:~209)
> I/dalvikvm(   99):   at android.database.DatabaseUtils
> $InsertHelper.prepareForIn
> sert(DatabaseUtils.java:958)
> I/dalvikvm(   99):   at
> com.android.providers.applications.ApplicationsProvider.
> updateApplicationsList(ApplicationsProvider.java:449)
> I/dalvikvm(   99):   at
> com.android.providers.applications.ApplicationsProvider.
> access$300(ApplicationsProvider.java:56)
> I/dalvikvm(   99):   at
> com.android.providers.applications.ApplicationsProvider$
> UpdateHandler.handleMessage(ApplicationsProvider.java:171)
> I/dalvikvm(   99):   at
> android.os.Handler.dispatchMessage(Handler.java:99)
> I/dalvikvm(   99):   at android.os.Looper.loop(Looper.java:123)
> I/dalvikvm(   99):   at
> android.os.HandlerThread.run(HandlerThread.java:60)
> I/dalvikvm(   99):
> D/AndroidRuntime(  169):
> D/AndroidRuntime(  169): >>>>>>>>>>>>>> AndroidRuntime START
> <<<<<<<<<<<<<<
> D/AndroidRuntime(  169): CheckJNI is ON
> W/dalvikvm(   99): threadid=3: spin on suspend #1 threadid=15
> (h=3315448)
> W/dalvikvm(   99): dumping state: process - 99
> I/dalvikvm(   99): "main" prio=5 tid=3 RUNNABLE
> I/dalvikvm(   99):   | group="main" sCount=0 dsCount=0 s=N
> obj=0x4001b268 self=0
> xbd00
> I/dalvikvm(   99):   | sysTid=99 nice=0 sched=0/0 cgrp=default
> handle=-134400138
> 4
> I/dalvikvm(   99):   at
> java.lang.AbstractStringBuilder.enlargeBuffer(AbstractSt
> ringBuilder.java:~97)
> I/dalvikvm(   99):   at
> java.lang.AbstractStringBuilder.append0(AbstractStringBu
> ilder.java:155)
> I/dalvikvm(   99):   at
> java.lang.StringBuilder.append(StringBuilder.java:216)
> I/dalvikvm(   99):   at
> android.content.ComponentName.flattenToShortString(Compo
> nentName.java:136)
> I/dalvikvm(   99):   at
> com.android.globalsearch.SearchableSuggestionSource.<ini
> t>(SearchableSuggestionSource.java:90)
> I/dalvikvm(   99):   at
> com.android.globalsearch.SearchableSuggestionSource.<ini
> t>(SearchableSuggestionSource.java:82)
> I/dalvikvm(   99):   at
> com.android.globalsearch.SuggestionSources.addExternalSo
> urces(SuggestionSources.java:251)
> I/dalvikvm(   99):   at
> com.android.globalsearch.SuggestionSources.updateSources
> (SuggestionSources.java:240)
> I/dalvikvm(   99):   at
> com.android.globalsearch.SuggestionSources.load(Suggesti
> onSources.java:194)
> I/dalvikvm(   99):   at
> com.android.globalsearch.SuggestionProvider.onCreate(Sug
> gestionProvider.java:100)
> I/dalvikvm(   99):   at
> android.content.ContentProvider.attachInfo(ContentProvid
> er.java:710)
> I/dalvikvm(   99):   at
> android.app.ActivityThread.installProvider(ActivityThrea
> d.java:4267)
> I/dalvikvm(   99):   at
> android.app.ActivityThread.installContentProviders(Activ
> ityThread.java:4042)
> I/dalvikvm(   99):   at
> android.app.ActivityThread.handleBindApplication(Activit
> yThread.java:4001)
> I/dalvikvm(   99):   at android.app.ActivityThread.access
> $2900(ActivityThread.ja
> va:119)
> I/dalvikvm(   99):   at android.app.ActivityThread
> $H.handleMessage(ActivityThrea
> d.java:1901)
> I/dalvikvm(   99):   at
> android.os.Handler.dispatchMessage(Handler.java:99)
> I/dalvikvm(   99):   at android.os.Looper.loop(Looper.java:123)
> I/dalvikvm(   99):   at
> android.app.ActivityThread.main(ActivityThread.java:4363
> )
> I/dalvikvm(   99):   at java.lang.reflect.Method.invokeNative(Native
> Method)
> I/dalvikvm(   99):   at java.lang.reflect.Method.invoke(Method.java:
> 521)
> I/dalvikvm(   99):   at com.android.internal.os.ZygoteInit
> $MethodAndArgsCaller.r
> un(ZygoteInit.java:860)
> I/dalvikvm(   99):   at
> com.android.internal.os.ZygoteInit.main(ZygoteInit.java:
> 618)
> I/dalvikvm(   99):   at dalvik.system.NativeStart.main(Native Method)
> I/dalvikvm(   99):
> I/dalvikvm(   99): "ApplicationsProviderUpdater" prio=5 tid=15
> RUNNABLE
> I/dalvikvm(   99):   | group="main" sCount=1 dsCount=0 s=N
> obj=0x43bb43f8 self=0
> x331838
> I/dalvikvm(   99):   | sysTid=134 nice=10 sched=0/0
> cgrp=bg_non_interactive hand
> le=3315448
> I/dalvikvm(   99):   at
> android.database.sqlite.SQLiteProgram.clearBindings(SQLi
> teProgram.java:~209)
> I/dalvikvm(   99):   at android.database.DatabaseUtils
> $InsertHelper.prepareForIn
> sert(DatabaseUtils.java:958)
> I/dalvikvm(   99):   at
> com.android.providers.applications.ApplicationsProvider.
> updateApplicationsList(ApplicationsProvider.java:449)
> I/dalvikvm(   99):   at
> com.android.providers.applications.ApplicationsProvider.
> access$300(ApplicationsProvider.java:56)
> I/dalvikvm(   99):   at
> com.android.providers.applications.ApplicationsProvider$
> UpdateHandler.handleMessage(ApplicationsProvider.java:171)
> I/dalvikvm(   99):   at
> android.os.Handler.dispatchMessage(Handler.java:99)
> I/dalvikvm(   99):   at android.os.Looper.loop(Looper.java:123)
> I/dalvikvm(   99):   at
> android.os.HandlerThread.run(HandlerThread.java:60)
> I/dalvikvm(   99):
> D/dalvikvm(   99): Temporarily raising priority on tid 134 (10 -> 0)
> W/ResourceType(   53): Resources don't contain package for resource
> number 0x7f0
> 700e5
> W/ResourceType(   53): Resources don't contain package for resource
> number 0x7f0
> 20031
> W/ResourceType(   53): Resources don't contain package for resource
> number 0x7f0
> 20030
> W/ResourceType(   53): Resources don't contain package for resource
> number 0x7f0
> 50000
> W/dalvikvm(   99): threadid=3: spin on suspend resolved in 1969 msec
> D/dalvikvm(   53): GC freed 3012 objects / 172328 bytes in 900ms
> W/ResourceType(   53): Resources don't contain package for resource
> number 0x7f0
> 60000
> D/dalvikvm(   99): GC freed 3096 objects / 222936 bytes in 3142ms
> I/ActivityManager(   53): Start proc com.android.email for broadcast
> com.android
> .email/com.android.exchange.BootReceiver: pid=182 uid=10021
> gids={3003, 1015}
> W/ResourceType(   53): Resources don't contain package for resource
> number 0x7f0
> 60001
> D/AndroidRuntime(  169): --- registering native functions ---
> I/ActivityThread(   99): Publishing provider call_log:
> com.android.providers.con
> tacts.CallLogProvider
> I/ActivityThread(   99): Publishing provider user_dictionary:
> com.android.provid
> ers.userdictionary.UserDictionaryProvider
> I/ActivityThread(  182): Publishing provider
> com.android.email.provider: com.and
> roid.email.provider.EmailProvider
> I/ActivityThread(  182): Publishing provider
> com.android.email.attachmentprovide
> r: com.android.email.provider.AttachmentProvider
> D/Exchange(  182): BootReceiver onReceive
> D/EAS SyncManager(  182): !!! EAS SyncManager, onCreate
> D/HomeLoaders(   99):   ----> items cloned, ready to refresh UI
> I/ActivityManager(   53): Start proc com.svox.pico for broadcast
> com.svox.pico/.
> VoiceDataInstallerReceiver: pid=201 uid=10003 gids={}
> D/EAS SyncManager(  182): !!! EAS SyncManager, onStartCommand
> D/EAS SyncManager(  182): !!! EAS SyncManager, stopping self
> D/dalvikvm(   29): GC freed 277 objects / 10576 bytes in 1951ms
> D/dalvikvm(   29): GC freed 45 objects / 1992 bytes in 615ms
> D/dalvikvm(   29): GC freed 2 objects / 48 bytes in 790ms
> D/Eas Debug(  182): Logging:
> D/EAS SyncManager(  182): !!! EAS SyncManager, onDestroy
> I/ActivityManager(   53): Starting activity: Intent { flg=0x10000000
> cmp=com.exa
> mple.hellojni/.HelloJni }
> D/AndroidRuntime(  169): Shutting down VM
> D/dalvikvm(  169): DestroyJavaVM waiting for non-daemon threads to
> exit
> D/dalvikvm(  169): DestroyJavaVM shutting VM down
> D/dalvikvm(  169): HeapWorker thread shutting down
> D/dalvikvm(  169): HeapWorker thread has shut down
> D/jdwp    (  169): JDWP shutting down net...
> I/jdwp    (  169): adbd disconnected
> D/dalvikvm(  169): VM cleaning up
> E/AndroidRuntime(  169): ERROR: thread attach failed
> D/dalvikvm(  169): LinearAlloc 0x0 used 636388 of 5242880 (12%)
> I/ActivityManager(   53): Start proc com.example.hellojni for activity
> com.examp
> le.hellojni/.HelloJni: pid=212 uid=10025 gids={1015}
> I/SurfaceFlinger(   53): Boot is finished (58646 ms)
> I/ARMAssembler(   53): generated
> scanline__00000177:03515104_00000A01_00000000 [
>  55 ipp] (79 ins) at [0x3d0428:0x3d0564] in 13276270 ns
> D/ddm-heap(  212): Got feature list request
> W/dalvikvm(  212): Exception Ljava/lang/UnsatisfiedLinkError; thrown
> during Lcom
> /example/hellojni/HelloJni;.<clinit>
> W/dalvikvm(  212): Class init failed in newInstance call (Lcom/example/
> hellojni/
> HelloJni;)
> D/AndroidRuntime(  212): Shutting down VM
> W/dalvikvm(  212): threadid=3: thread exiting with uncaught exception
> (group=0x4
> 001b188)
> E/AndroidRuntime(  212): Uncaught handler: thread main exiting due to
> uncaught e
> xception
> E/AndroidRuntime(  212): java.lang.ExceptionInInitializerError
> E/AndroidRuntime(  212):        at
> java.lang.Class.newInstanceImpl(Native Method
> )
> E/AndroidRuntime(  212):        at
> java.lang.Class.newInstance(Class.java:1479)
> E/AndroidRuntime(  212):        at
> android.app.Instrumentation.newActivity(Instr
> umentation.java:1021)
> E/AndroidRuntime(  212):        at
> android.app.ActivityThread.performLaunchActiv
> ity(ActivityThread.java:2409)
> E/AndroidRuntime(  212):        at
> android.app.ActivityThread.handleLaunchActivi
> ty(ActivityThread.java:2512)
> E/AndroidRuntime(  212):        at android.app.ActivityThread.access
> $2200(Activi
> tyThread.java:119)
> E/AndroidRuntime(  212):        at android.app.ActivityThread
> $H.handleMessage(Ac
> tivityThread.java:1863)
> E/AndroidRuntime(  212):        at
> android.os.Handler.dispatchMessage(Handler.ja
> va:99)
> E/AndroidRuntime(  212):        at android.os.Looper.loop(Looper.java:
> 123)
> E/AndroidRuntime(  212):        at
> android.app.ActivityThread.main(ActivityThrea
> d.java:4363)
> E/AndroidRuntime(  212):        at
> java.lang.reflect.Method.invokeNative(Native
> Method)
> E/AndroidRuntime(  212):        at
> java.lang.reflect.Method.invoke(Method.java:5
> 21)
> E/AndroidRuntime(  212):        at com.android.internal.os.ZygoteInit
> $MethodAndA
> rgsCaller.run(ZygoteInit.java:860)
> E/AndroidRuntime(  212):        at
> com.android.internal.os.ZygoteInit.main(Zygot
> eInit.java:618)
> E/AndroidRuntime(  212):        at
> dalvik.system.NativeStart.main(Native Method)
>
> E/AndroidRuntime(  212): Caused by: java.lang.UnsatisfiedLinkError:
> Library hell
> o-jni not found
> E/AndroidRuntime(  212):        at
> java.lang.Runtime.loadLibrary(Runtime.java:48
> 9)
> E/AndroidRuntime(  212):        at
> java.lang.System.loadLibrary(System.java:557)
>
> E/AndroidRuntime(  212):        at
> com.example.hellojni.HelloJni.<clinit>(HelloJ
> ni.java:64)
> E/AndroidRuntime(  212):        ... 15 more

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words "REMOVE ME" as the subject.

Reply via email to