Print Page | Close Window

debenu_quick_pdf_library_android_beta

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=3113
Printed Date: 03 May 24 at 6:39AM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: debenu_quick_pdf_library_android_beta
Posted By: Ludwig
Subject: debenu_quick_pdf_library_android_beta
Date Posted: 07 May 15 at 9:25AM
I am trying to integrate the debenu_quick_pdf_library_android_beta however I am running into issues.
everytime I attempt to run my application it throws up the following error:

===============================================
05-07 13:22:51.350: E/AndroidRuntime(21047): FATAL EXCEPTION: main
05-07 13:22:51.350: E/AndroidRuntime(21047): java.lang.ExceptionInInitializerError
05-07 13:22:51.350: E/AndroidRuntime(21047): at java.lang.Class.newInstanceImpl(Native Method)
05-07 13:22:51.350: E/AndroidRuntime(21047): at java.lang.Class.newInstance(Class.java:1319)
05-07 13:22:51.350: E/AndroidRuntime(21047): at android.app.Instrumentation.newActivity(Instrumentation.java:1071)
05-07 13:22:51.350: E/AndroidRuntime(21047): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2162)
05-07 13:22:51.350: E/AndroidRuntime(21047): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2295)
05-07 13:22:51.350: E/AndroidRuntime(21047): at android.app.ActivityThread.access$700(ActivityThread.java:150)
05-07 13:22:51.350: E/AndroidRuntime(21047): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1280)
05-07 13:22:51.350: E/AndroidRuntime(21047): at android.os.Handler.dispatchMessage(Handler.java:99)
05-07 13:22:51.350: E/AndroidRuntime(21047): at android.os.Looper.loop(Looper.java:137)
05-07 13:22:51.350: E/AndroidRuntime(21047): at android.app.ActivityThread.main(ActivityThread.java:5279)
05-07 13:22:51.350: E/AndroidRuntime(21047): at java.lang.reflect.Method.invokeNative(Native Method)
05-07 13:22:51.350: E/AndroidRuntime(21047): at java.lang.reflect.Method.invoke(Method.java:511)
05-07 13:22:51.350: E/AndroidRuntime(21047): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102)
05-07 13:22:51.350: E/AndroidRuntime(21047): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869)
05-07 13:22:51.350: E/AndroidRuntime(21047): at dalvik.system.NativeStart.main(Native Method)
05-07 13:22:51.350: E/AndroidRuntime(21047): Caused by: java.lang.UnsatisfiedLinkError: Cannot load library: soinfo_link_image(linker.cpp:1636): could not load library "liblibDebenuPDFLibraryAndroid" needed by "libmylib.so"; caused by load_library(linker.cpp:746): library "liblibDebenuPDFLibraryAndroid" not found
05-07 13:22:51.350: E/AndroidRuntime(21047): at java.lang.Runtime.loadLibrary(Runtime.java:371)
05-07 13:22:51.350: E/AndroidRuntime(21047): at java.lang.System.loadLibrary(System.java:535)
05-07 13:22:51.350: E/AndroidRuntime(21047): at com.mfsi.testintegration.MainActivity.<clinit>(MainActivity.java:20)
05-07 13:22:51.350: E/AndroidRuntime(21047): ... 15 more
======================================================

My Android.mk File is as follows:

-----------------------------------------Android.mk---------------------------------------------------
LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)
LOCAL_MODULE := DebenuPDFLibraryAndroid
LOCAL_SRC_FILES := libDebenuPDFLibraryAndroid.so
include $(PREBUILT_SHARED_LIBRARY)


include $(CLEAR_VARS)
LOCAL_MODULE    := mylib
LOCAL_SRC_FILES := DebenuPDFLibraryCPAndroidDynamicCPP.cpp integrator.cpp
LOCAL_SHARED_LIBRARIES := DebenuPDFLibraryAndroid
include $(BUILD_SHARED_LIBRARY)
------------------------------------------------------------------------------------------------------------

My Application.mk File is as follows:

------------------------------------Application.mk--------------------------------------------------------
APP_STL := gnustl_shared
APP_ABI := armeabi-v7a
APP_PLATFORM := android-15
------------------------------------------------------------------------------------------------------------

Here is a drive link for the Snapshot of the Project Explorer where my project Can Be Viewed opened in the C/C++ Perspective:
https://drive.google.com/file/d/0B1VHbc6HesQAb0dzR2RnQ1JiZzQ/view?usp=sharing

I am developing my application on Eclipse IDE


What is baffling is that liblibDebenuPDFLibraryAndroid is being searched while running the application. This name is not valid as the .so files created always are prefixed with a single 'lib'

I have included the following static block in my Android Launcher file MainActivity.java

static{
System.loadLibrary("DebenuPDFLibraryAndroid");
System.loadLibrary("mylib");
}



 





Replies:
Posted By: mLipok
Date Posted: 12 May 15 at 2:02AM
is this correct library name ?

"
library "liblibDebenuPDFLibraryAndroid" not found
"


-------------
Here you can find description how to test my examples:
http://www.quickpdf.org/forum/forum_posts.asp?TID=2932&PID=12600&title=drawcapturedpagematrix-matrix-howto#12600


Posted By: Ludwig
Date Posted: 12 May 15 at 6:09AM
Thanks mLipok for the response. 
Thats what baffling me .It should have been "libDebenuPDFLibraryAndroid". Android never prefixes an extra  lib to the library name, if the its already there. What could be the possible reason. 


Posted By: Rowan
Date Posted: 21 May 15 at 10:50AM
Hi Ludwig,

We did not test the new Android library in Eclipse because it is no longer supported as development platform for Android.

Currently we are working on and providing support for Android Studio and Microsoft Visual Studio. In the latest beta release we have included two samples for these IDE's with Java wrappers which should make it much easier.

You can download the latest beta from here which includes samples:

http://labs.debenu.com/2015/05/15/android-debenu-quick-pdf-library-11-15-beta-1/" rel="nofollow - http://labs.debenu.com/2015/05/15/android-debenu-quick-pdf-library-11-15-beta-1/

This sample includes ARMv7 dynamic version of the library with java wrapper and java files that are meant to be used in java environment.

Cheers,
- Rowan.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk