Page 1 of 1

Could not compile application class

Posted: Wed Jan 17, 2018 6:30 pm
by DavJans
I have found a few forum posts about this issue. None of them have helped. One suggested installing a different SDK Build-Tool. the tool they suggested to use is already installed. Another said to use JDK 1.9 I had 1.8 installed. 1.9 doesn't exist as far as I can tell. JDK 9 doesn't work at all it seams. any help would be greatly appreciated. As always, Thank you in advance.

Re: Could not compile application class

Posted: Wed Jan 17, 2018 7:31 pm
by quailcreek
It sounds like you're trying to generate an Android standalone and you're getting the error "Could not compile application class"?

What OS are you on?
What version of LC are you using?
Are you using Android studio or...?

Re: Could not compile application class

Posted: Wed Jan 17, 2018 7:45 pm
by DavJans
OK, Thank you, I cant believe I didn't post those things already.

Yes, android app.

Windows 7 x64
LC 8.1.8
Android Studio 3.0.1

Re: Could not compile application class

Posted: Wed Jan 17, 2018 8:14 pm
by livecodeali
Could you could edit the script of stack "revSaveAsAndroidStandalone" and find the line

Code: Select all

answer "Could not compile application class"

and change it to

Code: Select all

answer "Could not compile application class" & return & the result

and see what happens? There should be a more informative error.

Re: Could not compile application class

Posted: Wed Jan 17, 2018 9:23 pm
by quailcreek
Do your Mobile Support Preferences look something like this?
MobilePrefs.png

Re: Could not compile application class

Posted: Wed Jan 17, 2018 11:23 pm
by DavJans
Image

Image


Not sure why these images don't work, but if you right click and open in a new tab they work.

If you don't trust my external links...

1. Location of Android development SDK root:
C:/Users/Davidj/AppData/Local/Android/sdk
JDK Path: C:\Program Files\Java\jdk1.8.0_162

2. There was an error while saving the standalone application
could not encode class bundle
-Djaca.ext.dirs=C:\Users\Davidj\AppData\Local\Android\sdk\BUILD-~1\270~1.3\lib is not supported. Use -classpath instead.
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

Re: Could not compile application class

Posted: Thu Jan 18, 2018 2:23 am
by quailcreek
I had the same issue.

viewtopic.php?f=53&t=29660

Re: Could not compile application class

Posted: Fri Jan 19, 2018 12:13 am
by DavJans
Thank you, all fixed, just needed to get rid of JDK 1.8.0_162 and install JDK1.8.0_144.