Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compil readium SDK branch feature mo smil model #22

Closed
TienHai opened this issue Oct 4, 2013 · 19 comments
Closed

Compil readium SDK branch feature mo smil model #22

TienHai opened this issue Oct 4, 2013 · 19 comments

Comments

@TienHai
Copy link

TienHai commented Oct 4, 2013

Hi,

I try compil this branch of readium SDK, but a get this error:

./../../Platform/Android/jni/epub3.cpp:261: error: undefined reference to 'onLoad_cacheJavaElements_ResourceInputStream'
./../../Platform/Android/jni/package.cpp:478: error: undefined reference to 'javaResourceInputStream_createResourceInputStream'
/home/tien/Src/Android/ndk/sources/cxx-stl/gnu-libstdc++/4.7/include/ext/new_allocator.h:110: error: undefined reference to 'ePub3::MediaOverlaysSmilModel::MediaOverlaysSmilModel(std::shared_ptrePub3::Package)'
./../../ePub3/ePub/package.cpp:750: error: undefined reference to 'ePub3::MediaOverlaysSmilModel::Initialize()'
collect2: error: ld returned 1 exit status

thanks for your reply,

@TienHai
Copy link
Author

TienHai commented Oct 4, 2013

To complete post,

I'm under linux debian, I try to compil SDK for install on Android, and test smil audio in my ePub.

@rkwright
Copy link
Member

rkwright commented Oct 4, 2013

We regret at this time we do not support Debian and the team is so busy we don't have the bandwidth to investigate it at this time. We will consider extending the support after 1.0 is released.

@danielweck
Copy link
Member

I am not able to answer specifically for Android, but here is a summary of the Media Overlays state of affairs:

(I am on MacOSX 10.7.5, XCode4)

=== LauncherOSX compiles fine on the "develop" branches of SDKLauncher-OSX, readium-sdk, and readium-shared-js. The app runs fine and opens ebooks without or with Media Overlays (it just dumps some values in the console).

=== To use the "feature/mo_smil_model" branch of readium-sdk, SDKLauncher-OSX must be on "feature/mo_player2" (otherwise it will not even compile). I suspect that the Android launcher must be updated as well to support the new MO features / updated APIs. Additionally, readium-shared-js must be on the "feature/mo_player" branch, otherwise books will fail to load (the app-specific reader.html cannot load required shared JS files).

So, one good step forward to harmonise the codebase, and to enable an upcoming MO merge into "develop", would be to create a branch for the Android launcher, so that it compiles against readium-sdk[ feature/mo_smil_model ], and so that it runs fine with readium-shared-js[ feature/mo_player ].

I am not familiar at all with the Android launcher, but I will take a look to see how I can help. Eclipse right?
Dan

On 4 Oct 2013, at 16:00, TienHai wrote:

Hi,

I try compil this branch of readium SDK, but a get this error:

./../../Platform/Android/jni/epub3.cpp:261: error: undefined reference to 'onLoad_cacheJavaElements_ResourceInputStream'
./../../Platform/Android/jni/package.cpp:478: error: undefined reference to 'javaResourceInputStream_createResourceInputStream'
/home/tien/Src/Android/ndk/sources/cxx-stl/gnu-libstdc++/4.7/include/ext/new_allocator.h:110: error: undefined reference to 'ePub3::MediaOverlaysSmilModel::MediaOverlaysSmilModel(std::shared_ptrePub3::Package)'
./../../ePub3/ePub/package.cpp:750: error: undefined reference to 'ePub3::MediaOverlaysSmilModel::Initialize()'
collect2: error: ld returned 1 exit status

thanks for your reply,


Reply to this email directly or view it on GitHub.

@TienHai
Copy link
Author

TienHai commented Oct 4, 2013

Hi Dan,

thanks for your reply

Yes I used Eclipse

@prcolaco
Copy link
Member

prcolaco commented Oct 4, 2013

The first two undefined references:
./../../Platform/Android/jni/epub3.cpp:261: error: undefined reference to 'onLoad_cacheJavaElements_ResourceInputStream'
./../../Platform/Android/jni/package.cpp:478: error: undefined reference to 'javaResourceInputStream_createResourceInputStream'

Seem to be due to not linking with Platform/Android/jni/resource_stream.cpp

Can you please verify that your Android.mk has this file at the end of module epub3 in LOCAL_SRC_FILES definition?

If your Android.mk has that file, then it should be some problem with the NDK install under Debian.

Cheers,

Pedro

@TienHai
Copy link
Author

TienHai commented Oct 4, 2013

Hi Pedro,

I just check, but I don't have this file in LOCAL_SRC_FILES

@prcolaco
Copy link
Member

prcolaco commented Oct 4, 2013

I was checking and I corrected that missing Platform/Android/jni/resource_stream.cpp 16 days ago.

Maybe if you do a git pull on your local repository it will do the trick...

If this is the case, then you cloned/pulled the develop branch in a 'under development' state, before I checked it and corrected the missing file.

You should have a file ./Platform/Android/Android.mk and this file should end with:

        ePub3/ePub/property_extension.cpp \
        Platform/Android/jni/android/backup_atomics.cpp \
        Platform/Android/jni/jni/jni_ptr.cpp \
        Platform/Android/jni/epub3.cpp \
        Platform/Android/jni/container.cpp \
        Platform/Android/jni/package.cpp \
        Platform/Android/jni/iri.cpp \
        Platform/Android/jni/resource_stream.cpp

include $(BUILD_SHARED_LIBRARY)

@TienHai
Copy link
Author

TienHai commented Oct 4, 2013

I put Platform/Android/jni/resource_stream.cpp in file Android.mk in LOCAL_SRC_FILES.

After retry compil I have:

/home/tien/Src/Android/ndk/sources/cxx-stl/gnu-libstdc++/4.7/include/ext/new_allocator.h:110: error: undefined reference to 'ePub3::MediaOverlaysSmilModel::MediaOverlaysSmilModel(std::shared_ptrePub3::Package)'
./../../ePub3/ePub/package.cpp:750: error: undefined reference to 'ePub3::MediaOverlaysSmilModel::Initialize()'
collect2: error: ld returned 1 exit status
make: *** [/home/tien/Tmp/Readium/Test/Launcher-Android-develop/readium-sdk/Platform/Android/obj/local/armeabi/libepub3.so] Error 1

Tien Haï

@prcolaco
Copy link
Member

prcolaco commented Oct 4, 2013

Then please update your copy of the code with:

git pull

Because you don't have the latest version of the code in develop branch.

Cheers,

Pedro

@TienHai
Copy link
Author

TienHai commented Oct 4, 2013

Pedro,

Thanks, I can compil SDK in develop branch.

But when I open ePub file, the page is blank?

@prcolaco
Copy link
Member

prcolaco commented Oct 4, 2013

Did you also update Launcher-Android and readium-shared-js to the latest code in develop?

On my side the epub files open ok and show pages.

Cheers,

Pedro

@danielweck
Copy link
Member

good to know pedro, thanks!

On Friday, October 4, 2013, Pedro Reis Colaço wrote:

Did you also update Launcher-Android and readium-shared-js to the latest
code in develop?

On my side the epub files open ok and show pages.

Cheers,

Pedro


Reply to this email directly or view it on GitHubhttps://github.com//issues/22#issuecomment-25714939
.

@TienHai
Copy link
Author

TienHai commented Oct 7, 2013

Pedro,

1 - I clean up all my Readium directory, and restart with latest code in develop.

2 - When a compil readium-sdk I have some many error:

rename ePub3/ThirdParty/libzip/Config.h to config.h
copy ePub3/ThirdParty/libzip/config.h in ePub3/ePub
Correct import ePub3/ePub/property.h:#include <ePub3/ePub3.h> to ePub3/epub3.h
Correct import Platform/Android/include/ePub3/property.h:#include <ePub3/ePub3.h> to ePub3/epub3.h

After all this correction, I can compil readium-sdk for platform Android with this command line:
./ndk-compile.sh build ~/Src/Android/ndk

After compil, import the project under Plateform/Android in eclipse , import the project LauncherAndroid in eclipse.

3 - I launch the App SDKLauncher-Android, but the app not start, have one error: couldn't find class 'org/readium/sdk/android/ResourceInputStream'

I found the file ResourceInputStream.java under readium-sdk/Platform/Android/src/org/readium/sdk/android/util
I copy this file under readium-sdk/Platform/Android/src/org/readium/sdk and correct the first line:
package org.readium.sdk.android.util; -> package org.readium.sdk.android;

I recompiled readium-sdk, and reinstall SDKLauncher-Android app in my device.

4 - App start, I open the ePub cole-voyage-of-life-20120320.epub (I found it inreadium-sdk/TestData/ )
In 'Table of Contents' a the top of list 'The Voyage of Life (1)', touch this entry and have this error:

10-07 12:14:01.711: D/libepub3 ./../../Platform/Android/jni/epub3.cpp:352: EPub3.openBook(): package added
10-07 12:14:01.861: D/dalvikvm(28266): GC_CONCURRENT freed 94K, 4% free 5383K/5575K, paused 2ms+4ms
10-07 12:14:02.131: D/OpenGLRenderer(28266): Flushing caches (mode 0)
10-07 12:14:05.361: W/dalvikvm(28266): Unable to resolve superclass of Lorg/readium/sdk/android/launcher/WebViewActivity; (27)
10-07 12:14:05.361: W/dalvikvm(28266): Link of class 'Lorg/readium/sdk/android/launcher/WebViewActivity;' failed
10-07 12:14:05.361: E/dalvikvm(28266): Could not find class 'org.readium.sdk.android.launcher.WebViewActivity', referenced from method org.readium.sdk.android.launcher.NavigationTableActivity$1.onItemClick
10-07 12:14:05.361: W/dalvikvm(28266): VFY: unable to resolve const-class 221 (Lorg/readium/sdk/android/launcher/WebViewActivity;) in Lorg/readium/sdk/android/launcher/NavigationTableActivity$1;
10-07 12:14:05.361: D/dalvikvm(28266): VFY: replacing opcode 0x1c at 0x002b
10-07 12:14:05.591: D/OpenGLRenderer(28266): Flushing caches (mode 0)
10-07 12:14:15.671: D/OpenGLRenderer(28266): Flushing caches (mode 0)
10-07 12:14:35.271: D/OpenGLRenderer(28266): Flushing caches (mode 0)
10-07 12:15:32.631: I/NavigationTableActivity(28266): Open webview at : 0-intro.xhtml
10-07 12:15:32.631: D/AndroidRuntime(28266): Shutting down VM
10-07 12:15:32.631: W/dalvikvm(28266): threadid=1: thread exiting with uncaught exception (group=0x40a711f8)
10-07 12:15:32.641: E/AndroidRuntime(28266): FATAL EXCEPTION: main
10-07 12:15:32.641: E/AndroidRuntime(28266): java.lang.NoClassDefFoundError: org.readium.sdk.android.launcher.WebViewActivity
10-07 12:15:32.641: E/AndroidRuntime(28266): at org.readium.sdk.android.launcher.NavigationTableActivity$1.onItemClick(NavigationTableActivity.java:80)
10-07 12:15:32.641: E/AndroidRuntime(28266): at android.widget.AdapterView.performItemClick(AdapterView.java:292)
10-07 12:15:32.641: E/AndroidRuntime(28266): at android.widget.AbsListView.performItemClick(AbsListView.java:1058)
10-07 12:15:32.641: E/AndroidRuntime(28266): at android.widget.AbsListView$PerformClick.run(AbsListView.java:2514)
10-07 12:15:32.641: E/AndroidRuntime(28266): at android.widget.AbsListView$1.run(AbsListView.java:3168)
10-07 12:15:32.641: E/AndroidRuntime(28266): at android.os.Handler.handleCallback(Handler.java:605)
10-07 12:15:32.641: E/AndroidRuntime(28266): at android.os.Handler.dispatchMessage(Handler.java:92)
10-07 12:15:32.641: E/AndroidRuntime(28266): at android.os.Looper.loop(Looper.java:137)
10-07 12:15:32.641: E/AndroidRuntime(28266): at android.app.ActivityThread.main(ActivityThread.java:4429)
10-07 12:15:32.641: E/AndroidRuntime(28266): at java.lang.reflect.Method.invokeNative(Native Method)
10-07 12:15:32.641: E/AndroidRuntime(28266): at java.lang.reflect.Method.invoke(Method.java:511)
10-07 12:15:32.641: E/AndroidRuntime(28266): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:795)
10-07 12:15:32.641: E/AndroidRuntime(28266): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:562)
10-07 12:15:32.641: E/AndroidRuntime(28266): at dalvik.system.NativeStart.main(Native Method)

Thanks for your help,

Tien Haï

@danielweck
Copy link
Member

Hello Tien Haï,
I had a similar experience to yours, please see the message I sent yesterday to the Readium contributors mailing-list:
(perhaps your logcat debug messages are an indication that the WebView instance is indeed not wired correctly)



Hello,
this week-end I have been tinkering with the Android build. It took me a while to get the core C++ SDK ("mo_smil_model" feature branch) to compile. I tried with NDK r8e and r9, both seem to work, but in the end settled with the latest r9. That is: 64 bits MacOSX-Darwin + separate download for legacy toolchains (r8e ships with the necessary toolchain by default).

I had to execute the "clean" command before "build" every time any .h header file was modified...MarkerHeader.sh did not make any difference.

./readium-sdk/Platform/Android/ndk-compile.sh build /Applications/android-ndk-r9/

Any tip to avoid the time-consuming full rebuild? (localised "clean"?)

By the way, as per the README, I applied the following fixes to the NDK, as part of the initial setup:


r8e and r9:

${ANDROID_NDK}/ndk-build
${ANDROID_NDK}/build/core/init.mk

file -L “$SHELL” | grep -q “x86[_-]64″

ifneq (,$(shell file -L $(SHELL) | grep ‘x86[_-]64′))

==> REPLACE:
x86
WITH:
[xX]86


r8e:

${ANDROID_NDK}/build/core/build-binary.mk

$(cleantarget): PRIVATE_CLEAN_FILES := ($(my)OBJS)

==> ADD THE MISSING DOLLAR SIGN:

$($(my)OBJS)

Okay, so then I cranked-up Eclipse, and I had to fix a few things (unrelated to Media Overlays) in both the Launcher app and core SDK code: e.g. the ResourceInputStream Java class was in the "util" package, but is referenced elsewhere from the parent package...so I moved it up to avoid having to fix the SDK and recompile everything once more.

https://github.com/readium/readium-sdk/commits/feature/mo_smil_model

As you can see, I merged the latest "develop" SDK code into my "mo_smil_model" feature branch, to make sure I had all the bleeding-edge Android stuff.

I created a new "mo_smil_model" feature branch for the LauncherAndroid app, based on the latest "develop" codebase. Here are the few changes I made to run the app on my device:

readium/SDKLauncher-Android@834f432

I have not changed anything in Shared JS, and I used its "develop" branch to test the Android app. Therefore, none of the MO playback stuff has been involved in my tests, only the SMIL-parsing backend.

Outcome: the app launches on my device (4.2.2 Jelly Bean), I can read the EPUB files from the SD card ("epubtest" folder), the metadata + TOC(s) are displaying fine, but the content (WebView) is empty. The logcat doesn't really give me any clues.

What is the recommended working build of LauncherAndroid? (what branches of readium-sdk and readium-shared-js should I use?)

Note: I am preparing some documentation to help port the functioning OSX Media Overlays player to iOS, this should be useful for Android + Windows too.

Regards,
Daniel



On 7 Oct 2013, at 11:17, Tien haï wrote:

Pedro,

1 - I clean up all my Readium directory, and restart with latest code in develop.

2 - When a compil readium-sdk I have some many error:

rename ePub3/ThirdParty/libzip/Config.h to config.h
copy ePub3/ThirdParty/libzip/config.h in ePub3/ePub
Correct import ePub3/ePub/property.h:#include to ePub3/epub3.h
Correct import Platform/Android/include/ePub3/property.h:#include to ePub3/epub3.h

After all this correction, I can compil readium-sdk for platform Android with this command line:
./ndk-compile.sh build ~/Src/Android/ndk

After compil, import the project under Plateform/Android in eclipse , import the project LauncherAndroid in eclipse.

3 - I launch the App SDKLauncher-Android, but the app not start, have one error: couldn't find class 'org/readium/sdk/android/ResourceInputStream'

I found the file ResourceInputStream.java under readium-sdk/Platform/Android/src/org/readium/sdk/android/util
I copy this file under readium-sdk/Platform/Android/src/org/readium/sdk and correct the first line:
package org.readium.sdk.android.util; -> package org.readium.sdk.android;

I recompiled readium-sdk, and reinstall SDKLauncher-Android app in my device.

4 - App start, I open the ePub cole-voyage-of-life-20120320.epub (I found it inreadium-sdk/TestData/ )
In 'Table of Contents' a the top of list 'The Voyage of Life (1)', touch this entry and have this error:

10-07 12:14:01.711: D/libepub3 ./../../Platform/Android/jni/epub3.cpp:352: EPub3.openBook(): package added
10-07 12:14:01.861: D/dalvikvm(28266): GC_CONCURRENT freed 94K, 4% free 5383K/5575K, paused 2ms+4ms
10-07 12:14:02.131: D/OpenGLRenderer(28266): Flushing caches (mode 0)
10-07 12:14:05.361: W/dalvikvm(28266): Unable to resolve superclass of Lorg/readium/sdk/android/launcher/WebViewActivity; (27)
10-07 12:14:05.361: W/dalvikvm(28266): Link of class 'Lorg/readium/sdk/android/launcher/WebViewActivity;' failed
10-07 12:14:05.361: E/dalvikvm(28266): Could not find class 'org.readium.sdk.android.launcher.WebViewActivity', referenced from method org.readium.sdk.android.launcher.NavigationTableActivity$1.onItemClick
10-07 12:14:05.361: W/dalvikvm(28266): VFY: unable to resolve const-class 221 (Lorg/readium/sdk/android/launcher/WebViewActivity;) in Lorg/readium/sdk/android/launcher/NavigationTableActivity$1;
10-07 12:14:05.361: D/dalvikvm(28266): VFY: replacing opcode 0x1c at 0x002b
10-07 12:14:05.591: D/OpenGLRenderer(28266): Flushing caches (mode 0)
10-07 12:14:15.671: D/OpenGLRenderer(28266): Flushing caches (mode 0)
10-07 12:14:35.271: D/OpenGLRenderer(28266): Flushing caches (mode 0)
10-07 12:15:32.631: I/NavigationTableActivity(28266): Open webview at : 0-intro.xhtml
10-07 12:15:32.631: D/AndroidRuntime(28266): Shutting down VM
10-07 12:15:32.631: W/dalvikvm(28266): threadid=1: thread exiting with uncaught exception (group=0x40a711f8)
10-07 12:15:32.641: E/AndroidRuntime(28266): FATAL EXCEPTION: main
10-07 12:15:32.641: E/AndroidRuntime(28266): java.lang.NoClassDefFoundError: org.readium.sdk.android.launcher.WebViewActivity
10-07 12:15:32.641: E/AndroidRuntime(28266): at org.readium.sdk.android.launcher.NavigationTableActivity$1.onItemClick(NavigationTableActivity.java:80)
10-07 12:15:32.641: E/AndroidRuntime(28266): at android.widget.AdapterView.performItemClick(AdapterView.java:292)
10-07 12:15:32.641: E/AndroidRuntime(28266): at android.widget.AbsListView.performItemClick(AbsListView.java:1058)
10-07 12:15:32.641: E/AndroidRuntime(28266): at android.widget.AbsListView$PerformClick.run(AbsListView.java:2514)
10-07 12:15:32.641: E/AndroidRuntime(28266): at android.widget.AbsListView$1.run(AbsListView.java:3168)
10-07 12:15:32.641: E/AndroidRuntime(28266): at android.os.Handler.handleCallback(Handler.java:605)
10-07 12:15:32.641: E/AndroidRuntime(28266): at android.os.Handler.dispatchMessage(Handler.java:92)
10-07 12:15:32.641: E/AndroidRuntime(28266): at android.os.Looper.loop(Looper.java:137)
10-07 12:15:32.641: E/AndroidRuntime(28266): at android.app.ActivityThread.main(ActivityThread.java:4429)
10-07 12:15:32.641: E/AndroidRuntime(28266): at java.lang.reflect.Method.invokeNative(Native Method)
10-07 12:15:32.641: E/AndroidRuntime(28266): at java.lang.reflect.Method.invoke(Method.java:511)
10-07 12:15:32.641: E/AndroidRuntime(28266): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:795)
10-07 12:15:32.641: E/AndroidRuntime(28266): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:562)
10-07 12:15:32.641: E/AndroidRuntime(28266): at dalvik.system.NativeStart.main(Native Method)

Thanks for your help,

Tien Haï


Reply to this email directly or view it on GitHub.

@prcolaco
Copy link
Member

prcolaco commented Oct 7, 2013

Hi Tien,

1- OK

2- This is due to the use of Linux, since the filesystem is case sensitive and default OSX or Windows isn't.

3- I noted this problem, also reported from other people and will be corrected soon. Thanks.

4- You have to include/enable in your eclipse project dependencies the android-support-v4.jar support library. The error is:
W/dalvikvm(28266): Unable to resolve superclass of Lorg/readium/sdk/android/launcher/WebViewActivity; (27)
wich means that the superclass "FragmentActivity" is not found in your app build.

@TienHai
Copy link
Author

TienHai commented Oct 7, 2013

Hi Daniel, Pedro

First thanks for your help.

Daniel, I see your post this week.

Pedro, after include android-support-v4.jar, the app no crash when try to open ePub file.
But can see the page, the page is blank, I have this error:

10-07 13:06:13.631: I/NavigationTableActivity(6592): Open webview at : 0-intro.xhtml
10-07 13:06:13.821: D/WebViewActivity(6592): onPageStarted: file:///android_asset/readium-shared-js/reader.html
10-07 13:06:14.021: D/dalvikvm(6592): GC_CONCURRENT freed 184K, 26% free 8091K/10887K, paused 3ms+3ms
10-07 13:06:14.091: D/OpenGLRenderer(6592): Flushing caches (mode 0)
10-07 13:06:14.521: E/Web Console(6592): Uncaught TypeError: Object function (a,b){var c;a||(a={});b&&b.parse&&(a=this.parse(a));if(c=j(this,"defaults"))a=f.extend({},c,a);b&&b.collection&&(this.collection=b.collection);this.attributes={};this._escapedAttributes={};this.cid=f.uniqueId("c");if(!this.set(a,
10-07 13:06:14.521: E/Web Console(6592): {silent:!0}))throw Error("Can't create an invalid model");delete this._changed;this._previousAttributes=f.clone(this.attributes);this.initialize.apply(this,arguments)} has no method '_bindRoutes' at file:///android_asset/readium-shared-js/lib/backbone.min.js:24
10-07 13:06:14.521: E/Web Console(6592): Uncaught TypeError: Object function (a,b){var c;a||(a={});b&&b.parse&&(a=this.parse(a));if(c=j(this,"defaults"))a=f.extend({},c,a);b&&b.collection&&(this.collection=b.collection);this.attributes={};this._escapedAttributes={};this.cid=f.uniqueId("c");if(!this.set(a,
10-07 13:06:14.521: E/Web Console(6592): {silent:!0}))throw Error("Can't create an invalid model");delete this._changed;this._previousAttributes=f.clone(this.attributes);this.initialize.apply(this,arguments)} has no method '_bindRoutes' at file:///android_asset/readium-shared-js/lib/backbone.min.js:24
10-07 13:06:14.651: D/WebViewActivity(6592): onPageFinished: file:///android_asset/readium-shared-js/reader.html
10-07 13:06:14.651: D/WebViewActivity(6592): openPageRequestData: org.readium.sdk.android.launcher.model.OpenPageRequest@413ff520
10-07 13:06:14.651: D/libepub3 ./../../Platform/Android/jni/jni/jni_ptr.cpp:204: PointerPool::get(): got pointer 1BCB1C(3) package [./../../Platform/Android/jni/epub3.cpp:349]
10-07 13:06:14.651: D/libepub3 ./../../Platform/Android/jni/jni/jni_ptr.cpp:204: PointerPool::get(): got pointer 1BCB1C(6) package [./../../Platform/Android/jni/epub3.cpp:349]
10-07 13:06:14.651: D/libepub3 ./../../Platform/Android/jni/package.cpp:119: getProperty(): called for name='layout' pref='rendition'
10-07 13:06:14.651: D/libepub3 ./../../Platform/Android/jni/package.cpp:132: getProperty(): returning EMPTY
10-07 13:06:14.651: I/ReadiumJSApi(6592): loadJS: $(document).ready(function () {ReadiumSDK.reader.openBook({"package":{"mediaOverlays":[],"spine":{"items":[{"idref":"i","href":"xhtml/0-intro.xhtml","rendition_layout":"","page_spread":""},{"idref":"s1a","href":"xhtml/1a-childhood-text.xhtml","rendition_layout":"","page_spread":""},{"idref":"s1b","href":"xhtml/1b-childhood-painting.xhtml","rendition_layout":"pre-paginated","page_spread":""},{"idref":"s2a","href":"xhtml/2a-youth-text.xhtml","rendition_layout":"","page_spread":""},{"idref":"s2b","href":"xhtml/2b-youth-painting.xhtml","rendition_layout":"pre-paginated","page_spread":""},{"idref":"s3a","href":"xhtml/3a-manhood-text.xhtml","rendition_layout":"","page_spread":""},{"idref":"s3b","href":"xhtml/3b-manhood-painting.xhtml","rendition_layout":"pre-paginated","page_spread":""},{"idref":"s4a","href":"xhtml/4a-oldage-text.xhtml","rendition_layout":"","page_spread":""},{"idref":"s4b","href":"xhtml/4b-oldage-painting.xhtml","rendition_layout":"pre-paginated","page_spread":""},{"idref":"s5","href":"xhtml/5-significance.xhtml","rendition_layout":"","page_spread":""}],"direction":""},"rendition_layout":"","rootUrl":"EPUB/"},"openPageRequest":{"elementCfi":"","spineItemPageIndex":0,"idref":"","sourceFileHref":"xhtml/nav.xhtml","contentRefUrl":"0-intro.xhtml"},"settings":{"fontSize":100,"columnGap":20,"isSyntheticSpread":false}});});
10-07 13:06:14.701: E/Web Console(6592): Uncaught TypeError: undefined is not a function at file:///android_asset/readium-shared-js/js/views/reader_view.js:98

With the latest code in readium-shared-js branch develop.

Tien Haï

@prcolaco
Copy link
Member

prcolaco commented Oct 7, 2013

Hi Daniel and Tien,

Thanks for the reports.

Daniel, I replied to your email on the mailing list.

Tien, I think these javascript errors are preventing the page from being rendered:

10-07 13:06:14.521: E/Web Console(6592): Uncaught TypeError: Object function (a,b){var c;a||(a={});b&&b.parse&&(a=this.parse(a));if(c=j(this,"defaults"))a=f.extend({},c,a);b&&b.collection&&(this.collection=b.collection);this.attributes={};this.escapedAttributes={};this.cid=f.uniqueId("c");if(!this.set(a,
10-07 13:06:14.521: E/Web Console(6592): {silent:!0}))throw Error("Can't create an invalid model");delete this.changed;this.previousAttributes=f.clone(this.attributes);this.initialize.apply(this,arguments)} has no method 'bindRoutes' at file:///android_asset/readium-shared-js/lib/backbone.min.js:24
10-07 13:06:14.521: E/Web Console(6592): Uncaught TypeError: Object function (a,b){var c;a||(a={});b&&b.parse&&(a=this.parse(a));if(c=j(this,"defaults"))a=f.extend({},c,a);b&&b.collection&&(this.collection=b.collection);this.attributes={};this.escapedAttributes={};this.cid=f.uniqueId("c");if(!this.set(a,
10-07 13:06:14.521: E/Web Console(6592): {silent:!0}))throw Error("Can't create an invalid model");delete this.changed;this.previousAttributes=f.clone(this.attributes);this.initialize.apply(this,arguments)} has no method 'bindRoutes' at file:///android_asset/readium-shared-js/lib/backbone.min.js:24

...

10-07 13:06:14.701: E/Web Console(6592): Uncaught TypeError: undefined is not a function at file:///android_asset/readium-shared-js/js/views/reader_view.js:98

These come from "Web Console" and are generated from within the WebView when going through the javascript that renders the pages.

I will try to get some help from the guys that worked more on the javascript and WebView integration parts.

@TienHai
Copy link
Author

TienHai commented Oct 7, 2013

Pedro, thanks.

@TienHai
Copy link
Author

TienHai commented Oct 7, 2013

I close this Issue, and open one in Readium Shared JS repository.

@TienHai TienHai closed this as completed Oct 7, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants