8u20b2 available for download

175 views
Skip to first unread message

Johan Vos

unread,
Sep 1, 2014, 6:41:13 AM9/1/14
to javafx...@googlegroups.com
Hi,

I just uploaded dalvik-sdk-8u20b2 to https://bitbucket.org/javafxports/android/downloads/dalvik-sdk-8u20b2.zip
Most important changes:
* support for WebView
* fix for lifecycle crashes
* the dalvik-sdk now contains a "samples" directory with currently 1 sample: HelloWorld

I can use some feedback on the HelloWorld sample. If everything goes well, you have to change only a single parameter (the location of the downloaded Android SDK) and apart from that, the preconfigured parameters should work. The result of the process described in the samples/HelloWorld/README is an apk that can be installed on a device.
I tested it on Linux and Mac OS X and I am looking for a version of the "convertJavaFXToAndroid" script for Windows. Who can help with this?

Thanks,

- Johan

Joseph Remes

unread,
Sep 1, 2014, 8:59:55 AM9/1/14
to javafx...@googlegroups.com
I am able to build my project with no errors.
But it fails in the start(Stage) method.

I have narrowed the failure down to one of these two lines (Where root is a BorderPane)

        Rectangle2D b = screen.getVisualBounds();
        Scene scene = new Scene(root, b.getWidth(), b.getHeight());

The logcat has this

E/dalvikvm(10402): dlopen("/vendor/lib/libjavafx_font.so") failed: dlopen failed: library "/vendor/lib/libjavafx_font.so" not found
E/dalvikvm(10402): dlopen("/system/lib/libjavafx_font.so") failed: dlopen failed: library "/system/lib/libjavafx_font.so" not found
D/dalvikvm(10402): Trying to load lib /data/app-lib/com.SmartClientAndroid-1/libjavafx_font.so 0x41ee7bd0
D/dalvikvm(10402): Added shared lib /data/app-lib/com.SmartClientAndroid-1/libjavafx_font.so 0x41ee7bd0
D/dalvikvm(10402): No JNI_OnLoad found in /data/app-lib/com.SmartClientAndroid-1/libjavafx_font.so 0x41ee7bd0, skipping init
W/System.err(10402): Loading FontFactory com.sun.javafx.font.t2k.T2KFactory
W/System.err(10402): Subpixel: enabled
D/dalvikvm(10402): GC_CONCURRENT freed 3229K, 32% free 11326K/16416K, paused 3ms+2ms, total 44ms
D/dalvikvm(10402): WAIT_FOR_CONCURRENT_GC blocked 12ms
W/System.err(10402): Loading font factory failed com.sun.javafx.font.t2k.T2KFactory
E/dalvikvm(10402): Could not find class 'com.sun.javafx.font.freetype.PangoGlyphLayout', referenced from method com.sun.javafx.font.freetype.FTFactory.createGlyphLayout
W/dalvikvm(10402): VFY: unable to resolve new-instance 3015 (Lcom/sun/javafx/font/freetype/PangoGlyphLayout;) in Lcom/sun/javafx/font/freetype/FTFactory;
D/dalvikvm(10402): VFY: replacing opcode 0x22 at 0x0006
I/dalvikvm(10402): Could not find method com.sun.javafx.font.freetype.OSPango.FcConfigAppFontAddFile, referenced from method com.sun.javafx.font.freetype.FTFactory.registerEmbeddedFont
W/dalvikvm(10402): VFY: unable to resolve static method 27159: Lcom/sun/javafx/font/freetype/OSPango;.FcConfigAppFontAddFile (JLjava/lang/String;)Z
D/dalvikvm(10402): VFY: replacing opcode 0x71 at 0x003f
D/dalvikvm(10402): DexOpt: unable to opt direct call 0x6a18 at 0x08 in Lcom/sun/javafx/font/freetype/FTFactory;.createGlyphLayout
E/dalvikvm(10402): dlopen("/vendor/lib/libjavafx_font_freetype.so") failed: dlopen failed: library "/vendor/lib/libjavafx_font_freetype.so" not found
E/dalvikvm(10402): dlopen("/system/lib/libjavafx_font_freetype.so") failed: dlopen failed: library "/system/lib/libjavafx_font_freetype.so" not found
W/dalvikvm(10402): Exception Ljava/lang/UnsatisfiedLinkError; thrown while initializing Lcom/sun/javafx/font/freetype/OSFreetype;
W/System.err(10402): Loading font factory failed com.sun.javafx.font.freetype.FTFactory
W/System.err(10402): *** Loading primary font factory failed. ***
W/System.err(10402): *** Fallbacking to com.sun.javafx.font.freetype.FTFactory ***
W/dalvikvm(10402): Exception Ljava/lang/NullPointerException; thrown while initializing Ljavafx/scene/CssStyleHelper;
W/System.err(10402): Exception in Application start method
I/lens    (10402): Finishing terminating
I/GLASS   (10402): Shutting down
I/GLASS   (10402): DeleteGlobalRef(pApplication(0x1d20041a))
V/FXActivity(10402): notify_glassShutdown

So a font seems to be missing?
I have no idea what I need to do to fix this.


BTW Today is a holiday here in the States. I may not be doing any more on this until Tuesday.

Johan Vos

unread,
Sep 1, 2014, 11:27:48 AM9/1/14
to javafx...@googlegroups.com
My mistake. I double-checked and then created the build on a system without freetype support.
I corrected that, and uploaded b2 again. There were only a few downloads yet, so apologizes to the early adopters that already downloaded it.

Thank you very much for reporting this issue so fast!

- Johan

Op maandag 1 september 2014 14:59:55 UTC+2 schreef Joseph Remes:

feli...@gmail.com

unread,
Sep 3, 2014, 3:50:49 AM9/3/14
to javafx...@googlegroups.com
понедельник, 1 сентября 2014 г., 16:41:13 UTC+6 пользователь Johan Vos написал:
I tried to run the sample project. Build succeeds, but when I run the application in the emulator for android, it has failed:

I/ActivityManager( 1105): Start proc org.javafxports.helloworld for activity org.javafxports.helloworld/javafxports.android.FXActivity: pid=2303 uid=10047 gids={50047, 1028, 1015, 3003}
W/dalvikvm( 2303): Exception Ljava/lang/UnsatisfiedLinkError; thrown while initializing Ljavafxports/android/FXActivity;
W/dalvikvm( 2303): Class init failed in newInstance call (Ljavafxports/android/FXActivity;)
D/AndroidRuntime( 2303): Shutting down VM
W/dalvikvm( 2303): threadid=1: thread exiting with uncaught exception (group=0xb1f5c648)
E/AndroidRuntime( 2303): FATAL EXCEPTION: main
E/AndroidRuntime( 2303): java.lang.UnsatisfiedLinkError: Couldn't load activity from loader dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/org.javafxports.helloworld-1.apk"],nativeLibraryDirectories=[/data/app-lib/org.javafxports.helloworld-1, /system/lib]]]: findLibrary returned null
E/AndroidRuntime( 2303): at java.lang.Runtime.loadLibrary(Runtime.java:355)
E/AndroidRuntime( 2303): at java.lang.System.loadLibrary(System.java:525)
E/AndroidRuntime( 2303): at javafxports.android.FXActivity.<clinit>(FXActivity.java:122)
E/AndroidRuntime( 2303): at java.lang.Class.newInstanceImpl(Native Method)
E/AndroidRuntime( 2303): at java.lang.Class.newInstance(Class.java:1130)
E/AndroidRuntime( 2303): at android.app.Instrumentation.newActivity(Instrumentation.java:1061)
E/AndroidRuntime( 2303): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2128)
E/AndroidRuntime( 2303): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2261)
E/AndroidRuntime( 2303): at android.app.ActivityThread.access$600(ActivityThread.java:141)
E/AndroidRuntime( 2303): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
E/AndroidRuntime( 2303): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 2303): at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime( 2303): at android.app.ActivityThread.main(ActivityThread.java:5103)
E/AndroidRuntime( 2303): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 2303): at java.lang.reflect.Method.invoke(Method.java:525)
E/AndroidRuntime( 2303): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
E/AndroidRuntime( 2303): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
E/AndroidRuntime( 2303): at dalvik.system.NativeStart.main(Native Method)
W/ActivityManager( 1105): Force finishing activity org.javafxports.helloworld/javafxports.android.FXActivity

more information at https://bitbucket.org/javafxports/android/issue/39/crash-helloworld

Johan Vos

unread,
Sep 3, 2014, 3:55:30 AM9/3/14
to feli...@gmail.com, javafx...@googlegroups.com
What version of Android is this? Can you show a bit more of the logcat output, e.g. starting here:
V/FXActivity(....): onCreate called, using 8udev

- Johan




--
You received this message because you are subscribed to the Google Groups "JavaFXAndroid" group.
To unsubscribe from this group and stop receiving emails from it, send an email to javafxandroi...@googlegroups.com.
To post to this group, send email to javafx...@googlegroups.com.
Visit this group at http://groups.google.com/group/javafxandroid.
To view this discussion on the web visit https://groups.google.com/d/msgid/javafxandroid/60b504f1-2a26-4952-8d9b-8d45f9d049d5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

feli...@gmail.com

unread,
Sep 3, 2014, 4:12:20 AM9/3/14
to javafx...@googlegroups.com, feli...@gmail.com
Andoid info:

felix@felix:/devel/lib/android/android-sdk-linux/tools$ android list avd
Available Android Virtual Devices:
Name: Test
Device: Nexus 7 (Google)
Path: /home/felix/.android/avd/Test.avd
Target: Android 4.3 (API level 18)
Tag/ABI: default/x86
Skin: WVGA800
Sdcard: 1024M
Snapshot: true

No more info about application in logcat. logcat does not contain records with tag "FXActivity":

felix@felix:/devel/lib/android/android-sdk-linux/tools$ adb logcat -s "FXActivity"
--------- beginning of /dev/log/main
--------- beginning of /dev/log/system


Full logcat:



felix@felix:/devel/lib/android/android-sdk-linux/tools$ adb logcat -c
felix@felix:/devel/lib/android/android-sdk-linux/tools$ adb logcat
--------- beginning of /dev/log/system
I/ActivityManager( 1099): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=org.javafxports.helloworld/javafxports.android.FXActivity} from pid 1426
W/WindowManager( 1099): Screenshot failure taking screenshot for (246x410) to layer 21005
--------- beginning of /dev/log/main
D/dalvikvm( 1930): Not late-enabling CheckJNI (already on)
I/ActivityManager( 1099): Start proc org.javafxports.helloworld for activity org.javafxports.helloworld/javafxports.android.FXActivity: pid=1930 uid=10047 gids={50047, 1028, 1015, 3003}
W/dalvikvm( 1930): Exception Ljava/lang/UnsatisfiedLinkError; thrown while initializing Ljavafxports/android/FXActivity;
W/dalvikvm( 1930): Class init failed in newInstance call (Ljavafxports/android/FXActivity;)
D/AndroidRuntime( 1930): Shutting down VM
W/dalvikvm( 1930): threadid=1: thread exiting with uncaught exception (group=0xb1f7a648)
E/AndroidRuntime( 1930): FATAL EXCEPTION: main
E/AndroidRuntime( 1930): java.lang.UnsatisfiedLinkError: Couldn't load activity from loader dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/org.javafxports.helloworld-1.apk"],nativeLibraryDirectories=[/data/app-lib/org.javafxports.helloworld-1, /system/lib]]]: findLibrary returned null
E/AndroidRuntime( 1930): at java.lang.Runtime.loadLibrary(Runtime.java:355)
E/AndroidRuntime( 1930): at java.lang.System.loadLibrary(System.java:525)
E/AndroidRuntime( 1930): at javafxports.android.FXActivity.<clinit>(FXActivity.java:122)
E/AndroidRuntime( 1930): at java.lang.Class.newInstanceImpl(Native Method)
E/AndroidRuntime( 1930): at java.lang.Class.newInstance(Class.java:1130)
E/AndroidRuntime( 1930): at android.app.Instrumentation.newActivity(Instrumentation.java:1061)
E/AndroidRuntime( 1930): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2128)
E/AndroidRuntime( 1930): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2261)
E/AndroidRuntime( 1930): at android.app.ActivityThread.access$600(ActivityThread.java:141)
E/AndroidRuntime( 1930): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
E/AndroidRuntime( 1930): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 1930): at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime( 1930): at android.app.ActivityThread.main(ActivityThread.java:5103)
E/AndroidRuntime( 1930): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 1930): at java.lang.reflect.Method.invoke(Method.java:525)
E/AndroidRuntime( 1930): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
E/AndroidRuntime( 1930): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
E/AndroidRuntime( 1930): at dalvik.system.NativeStart.main(Native Method)
W/ActivityManager( 1099): Force finishing activity org.javafxports.helloworld/javafxports.android.FXActivity
W/WindowManager( 1099): Screenshot failure taking screenshot for (246x410) to layer 21010
D/LightsService( 1099): Excessive delay setting light: 61ms
W/ActivityManager( 1099): Activity pause timeout for ActivityRecord{b2497fd0 u0 org.javafxports.helloworld/javafxports.android.FXActivity}
W/ActivityManager( 1099): Activity destroy timeout for ActivityRecord{b2497fd0 u0 org.javafxports.helloworld/javafxports.android.FXActivity}




среда, 3 сентября 2014 г., 13:55:30 UTC+6 пользователь Johan Vos написал:

Johan Vos

unread,
Sep 3, 2014, 4:46:30 AM9/3/14
to feli...@gmail.com, javafx...@googlegroups.com
Can you attach the .apk that has been created?


Johan Vos

unread,
Sep 3, 2014, 4:58:37 AM9/3/14
to Юрий Витковский, javafx...@googlegroups.com
The strange thing is that the .apk that caused the crash there, is working fine on devices with API level 16 and 19.

Johan Vos

unread,
Sep 3, 2014, 5:13:46 AM9/3/14
to Юрий Витковский, javafx...@googlegroups.com
... the reason for this might be similar to the reason in https://bitbucket.org/javafxports/android/issue/39/crash-helloworld
Are you using an emulator instead of a real device? Emulators won't work at this moment, due to missing opengl extensions.

- Johan
Reply all
Reply to author
Forward
0 new messages