Announcement

Collapse
No announcement yet.

Impossible to launch any SDK Demos APP on Android

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Impossible to launch any SDK Demos APP on Android

    Hi,

    I'm trying to implement your SDK and to learn how it works, I try to use demos, i say i try cos :

    - NDK compilation seems to be ok
    - importing the project in eclipse work
    - Entering the trial serial number in WrapPDFFunc.java is done
    - copying the readme.pdf in /mnt/sdcard on my device is ok

    Build, when I launch the app on my device, the app crash.

    Lauching adb logcat in a terminal command return this :

    E/AndroidRuntime(17661): Process: com.foxitsample.view_navigation, PID: 17661
    E/AndroidRuntime(17661): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.foxitsample.view_navigation/com.foxitsample.view_navigation.mainActivity}: java.lang.NullPointerException: println needs a message
    E/AndroidRuntime(17661): at android.app.ActivityThread.performLaunchActivity(A ctivityThread.java:2215)
    E/AndroidRuntime(17661): at android.app.ActivityThread.handleLaunchActivity(Ac tivityThread.java:2265)
    E/AndroidRuntime(17661): at android.app.ActivityThread.access$800(ActivityThre ad.java:145)
    E/AndroidRuntime(17661): at android.app.ActivityThread$H.handleMessage(Activit yThread.java:1206)
    E/AndroidRuntime(17661): at android.os.Handler.dispatchMessage(Handler.java:10 2)
    E/AndroidRuntime(17661): at android.os.Looper.loop(Looper.java:136)
    E/AndroidRuntime(17661): at android.app.ActivityThread.main(ActivityThread.jav a:5142)
    E/AndroidRuntime(17661): at java.lang.reflect.Method.invokeNative(Native Method)
    E/AndroidRuntime(17661): at java.lang.reflect.Method.invoke(Method.java:515)
    E/AndroidRuntime(17661): at com.android.internal.os.ZygoteInit$MethodAndArgsCa ller.run(ZygoteInit.java:791)
    E/AndroidRuntime(17661): at com.android.internal.os.ZygoteInit.main(ZygoteInit .java:607)
    E/AndroidRuntime(17661): at dalvik.system.NativeStart.main(Native Method)
    E/AndroidRuntime(17661): Caused by: java.lang.NullPointerException: println needs a message
    E/AndroidRuntime(17661): at android.util.Log.println_native(Native Method)
    E/AndroidRuntime(17661): at android.util.Log.v(Log.java:118)
    E/AndroidRuntime(17661): at com.foxitsample.view_navigation.mainActivity.postT oLog(mainActivity.java:109)
    E/AndroidRuntime(17661): at com.foxitsample.view_navigation.mainActivity.onCre ate(mainActivity.java:54)
    E/AndroidRuntime(17661): at android.app.Activity.performCreate(Activity.java:5 231)
    E/AndroidRuntime(17661): at android.app.Instrumentation.callActivityOnCreate(I nstrumentation.java:1087)
    E/AndroidRuntime(17661): at android.app.ActivityThread.performLaunchActivity(A ctivityThread.java:2169)
    E/AndroidRuntime(17661): ... 11 more

    Any idea ?

    Thanks a lot !

    Stephane

  • #2
    Dear Stephane,

    Go to FoxitEmbeddedSDKforAndroid2.1.23354.1092.101412.17 12_enu\examples\demos\demo_view_navigation\src\Fox itEMBSDK\EMBJavaSupport.java

    and locate

    static{
    System.loadLibrary("fpdfembedsdk");
    }

    and add the following line to load stlport_shared.

    static{
    System.loadLibrary("stlport_shared");
    System.loadLibrary("fpdfembedsdk");
    }

    Note: make sure Application.mk file defines APP_STL := stlport_shared when building the ndk layer.

    Sincerely,
    Huy

    Comment

    Working...
    X