AnFengDe / AnFengDe_EPUB

EPUB 3.0 SDK for Android and iPhone, Offical team site : http://epub.anfengde.com
146 stars 79 forks source link

Error when launching Android example #4

Closed wessam closed 11 years ago

wessam commented 11 years ago

I've got this error when trying android example

01-29 09:28:14.914: E/AndroidRuntime(712): FATAL EXCEPTION: main 01-29 09:28:14.914: E/AndroidRuntime(712): java.lang.ExceptionInInitializerError 01-29 09:28:14.914: E/AndroidRuntime(712): at com.anfengde.epub_sdk_example.ExampleActivity.init(ExampleActivity.java:130) 01-29 09:28:14.914: E/AndroidRuntime(712): at com.anfengde.epub_sdk_example.ExampleActivity.onCreate(ExampleActivity.java:59) 01-29 09:28:14.914: E/AndroidRuntime(712): at android.app.Activity.performCreate(Activity.java:5008) 01-29 09:28:14.914: E/AndroidRuntime(712): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079) 01-29 09:28:14.914: E/AndroidRuntime(712): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2023) 01-29 09:28:14.914: E/AndroidRuntime(712): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084) 01-29 09:28:14.914: E/AndroidRuntime(712): at android.app.ActivityThread.access$600(ActivityThread.java:130) 01-29 09:28:14.914: E/AndroidRuntime(712): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195) 01-29 09:28:14.914: E/AndroidRuntime(712): at android.os.Handler.dispatchMessage(Handler.java:99) 01-29 09:28:14.914: E/AndroidRuntime(712): at android.os.Looper.loop(Looper.java:137) 01-29 09:28:14.914: E/AndroidRuntime(712): at android.app.ActivityThread.main(ActivityThread.java:4745) 01-29 09:28:14.914: E/AndroidRuntime(712): at java.lang.reflect.Method.invokeNative(Native Method) 01-29 09:28:14.914: E/AndroidRuntime(712): at java.lang.reflect.Method.invoke(Method.java:511) 01-29 09:28:14.914: E/AndroidRuntime(712): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786) 01-29 09:28:14.914: E/AndroidRuntime(712): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553) 01-29 09:28:14.914: E/AndroidRuntime(712): at dalvik.system.NativeStart.main(Native Method) 01-29 09:28:14.914: E/AndroidRuntime(712): Caused by: java.lang.UnsatisfiedLinkError: Couldn't load epubjni: findLibrary returned null 01-29 09:28:14.914: E/AndroidRuntime(712): at java.lang.Runtime.loadLibrary(Runtime.java:365) 01-29 09:28:14.914: E/AndroidRuntime(712): at java.lang.System.loadLibrary(System.java:535) 01-29 09:28:14.914: E/AndroidRuntime(712): at com.anfengde.epub.EPubJNI.(Unknown Source)

AnFengDe commented 11 years ago

I guess you have lost the "libepubjni.so" file. The file should be in "EPUB_SDK_Example/libs/armeabi/" folder. If it isn't the reason, please tell us more information: your device, your eclipse version or something else you have done. Thank you very much Screen Shot 2013-01-29 at 4 53 09 PM .

wessam commented 11 years ago

Thanks for your reply,

I'm using eclipse as IDE Eclipse Java EE IDE for Web Developers. Version: Juno Service Release 1

I'm using Emulator device : Android 4.1.2

the output when i open the application :

1-29-2013 11-24-42 AM

the example file explorer:

1-29-2013 11-25-11 AM

1-29-2013 11-25-41 AM

AnFengDe commented 11 years ago

We have tested our project on win 7. And it ran OK. Do you modify something? Maybe you can clone an original version from github. We notice that your project trees are different. This is ours. Screen Shot 2013-01-29 at 6 20 11 PM

wessam commented 11 years ago

i have re-downloaded the source again and the same thing happened: 1-29-2013 1-22-20 PM

and i didn't modify any thing just created the project and added the jar file to the build path

AnFengDe commented 11 years ago

Sorry I can't find the reason why it happened to you. It seem that the "libepubjni.so" file can't be load in you environment. Please try to run the project in another computer.

wessam commented 11 years ago

Thanks, It seems a permission problem on my computer. I didn't change it but i change the sdcard location of my emulator Thanks a gain.

softopya commented 11 years ago

Today, i got this error. I redownload and tried 5 times. My tablet pc is nexus 7 and directly deploying on it. It hasnt got any sdcard slot.

AnFengDe commented 11 years ago

Hi,softopya We use sdcard to save runtime data and cache, so nexus 7 does not support sdcard there is no way to run our sdk.

Maybe in the future we will provide option for this situation. Thank you for pointing this to us.