0

I tried to release android apk from example gluon project in netbeans but it didn't work.

build.gradle: http://pastebin.com/un5uBh7h error: http://pastebin.com/aW6ebPPR

Any ideas? Thanks in advance!

siemaeniu500
  • 115
  • 1
  • 9
  • Possible duplicate of [java.lang.ClassNotFoundException on working app](http://stackoverflow.com/questions/3781151/java-lang-classnotfoundexception-on-working-app) – Bertrand Martel Oct 29 '16 at 22:16
  • nope it's not a doplication of this, there is a problem i guess with retrolambda – siemaeniu500 Oct 29 '16 at 22:22
  • Does it happen with the templates from the Gluon plugin for NetBeans, without any modification? Can you run successfully `gradlew android`, or `gradlew androidInstall`? – José Pereda Oct 29 '16 at 23:08
  • Also, about the Android platform, do you have Android 23 (M) or 24 (N) sdk installed? Do you have Android build tools 23 or 24? – José Pereda Oct 29 '16 at 23:20
  • Yes it also happens when i run gradlew android or gradlew androidInstall through cmd. My sdk is 24 (N), android build tools version: 24.0.3 – siemaeniu500 Oct 30 '16 at 08:55
  • I've successfully tested this on Mac and Windows. Which is your gradle version? Are you using the wrapper (`gradlew`)? – José Pereda Oct 30 '16 at 17:52
  • Yes i use wrapper gradlew. I tested many gradle versions like 2.14/2.2/2.5 with the same result. – siemaeniu500 Oct 30 '16 at 18:44
  • Notice on NetBeans, Options->Miscellaneous->Gradle, there is a tick: `Prefer Wrapper`. Also have you tested it on command line, outside NetBeans? On the root of the project, run `gradlew --info android` and see if it helps. – José Pereda Oct 31 '16 at 09:45
  • I tested "gradlew --info android" on command linke outside NetBeans, It gave me the same error: http://pastebin.com/CSBLqt1B – siemaeniu500 Oct 31 '16 at 11:03
  • @José Pereda can you look at this ? – siemaeniu500 Nov 01 '16 at 11:15
  • Did you try it always over the same project? Try to clean the cache: delete the `.nb-gradle`, `.gradle` and `private` folders of the project, and run again on command line `gradlew --info clean android` – José Pereda Nov 01 '16 at 11:31
  • Deleting cache didn't help: http://pastebin.com/GWVXiXvS Nope i tried with many projects, all give the same error. – siemaeniu500 Nov 01 '16 at 11:51
  • @José Pereda Maybe this is the problem ? "Caused by: java.lang.NoClassDefFoundError: android/app/Application$ActivityLifecycleCallbacks" – siemaeniu500 Nov 01 '16 at 15:28
  • I finally found another solution for the problem. Thanks for help @José Pereda – siemaeniu500 Nov 01 '16 at 20:21
  • I see a difference in your output, line 142, Classpath: it doesn't contain the android.jar, and it should. Probably this leads to the error. I thought it was related to retrolambda, but maybe you are not adding the right path for the android sdk. On NetBeans, do you see the android.jar under Dependencies->Compile for Android? – José Pereda Nov 01 '16 at 20:22
  • I just added "compile group: 'org.robolectric', name: 'android-all', version: '5.0.0_r2-robolectric-1'" into dependecies :) – siemaeniu500 Nov 01 '16 at 20:43
  • I don't see why you need that, but probably it solves your issue. Anyway, make sure you add the right path of the android sdk (case sensitive) and you have android.jar under dependencies for android. – José Pereda Nov 01 '16 at 20:55
  • @José Pered Could you tell me why ported javafx apps into android have poor performance? And how to solve it ? – siemaeniu500 Nov 01 '16 at 21:47
  • Create a new question for this, and specify what are you testing and which is your device – José Pereda Nov 01 '16 at 21:48
  • Ok i just created: http://stackoverflow.com/questions/40369300/poor-performance-of-javafx-ported-app – siemaeniu500 Nov 01 '16 at 21:58

0 Answers0