Could not complie the applicaton class

The place to discuss anything and everything about running your LiveCode on Android

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
pkmittal
Posts: 111
Joined: Thu Feb 08, 2007 11:27 am
Contact:

Could not complie the applicaton class

Post by pkmittal » Fri Jun 29, 2012 8:30 am

Hi,
I am looking into live code Android development and This is the first simple code I wrote to test the app.

Code: Select all

on mouseUp
   answer "Game Start"
end mouseUp
When I Save as standalone then I see the error. There was an error while saving the standalone application.. Could not complie the applicaton class.
Initially I was not using any key for signing the app.. but later on I used KeyStroke from commmand prompt and include the key in the standalone android settings. But even than I see the same error.. I am using Windows XP + C:\Program Files\Java\jre1.6.0_02\bin

1) Please help to solve the above error.

2. Also can anyone point me the list of structured tutorials and videos for Android and Ipad Application Development using Run Rev. Are there any custom you tube application which is developed using Run Rev?

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Could not complie the applicaton class

Post by Mark » Fri Jun 29, 2012 9:21 am

Hi,

Put a copy of adb (on Mac) or adb.exe and the two adb dll's (on Windows), which are all in the platform-tools folder, into the tools folder of your SDK installation.

Kind regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

pkmittal
Posts: 111
Joined: Thu Feb 08, 2007 11:27 am
Contact:

Re: Could not complie the applicaton class

Post by pkmittal » Fri Jun 29, 2012 10:34 am

Hello Mike, Thanks for your prompt response. I find the following dll files

AdbWinApi.dll, AdbWinUsbApi.dll and adb.exe

Where do I need to copy? I copied it to C:\Program Files\Android\android-sdk\tools folder. Are you asking to copy it in LiveCode Folder? There I do not see any tool folder.

I also tried Edit->prefrence ->Mobile Support. and then choose the location C:\Program Files\Android\android-sdk\tools But It gives me error message

The choosen folder is not a valid Android SDK. Please ensure you have instaled coorectly. and enabled support for Andriod 2.2 (Froyo)

By Default, when I installed Andriod SDK, I think it should have installed Andrioid 4.1. Do I need to install Andriod 2.2?

Please help.

pkmittal
Posts: 111
Joined: Thu Feb 08, 2007 11:27 am
Contact:

Re: Could not complie the applicaton class

Post by pkmittal » Fri Jun 29, 2012 10:57 am

I installed Android 2.2 and now when I select the Mobile support and location of Andrid SDK then it accepts it... However when I save the standalone.. i get same error message?

So please help about moving the dll and exe files?(where it should be moved to make it work? )

pkmittal
Posts: 111
Joined: Thu Feb 08, 2007 11:27 am
Contact:

Re: Could not complie the applicaton class

Post by pkmittal » Fri Jun 29, 2012 11:02 am

I have seen that JDK Path is "None" in the preference settings->mobile supports
Do I need to set the path? If yes then how do I do it? I do not see any button to choose the location of JDK

pkmittal
Posts: 111
Joined: Thu Feb 08, 2007 11:27 am
Contact:

Re: Could not complie the applicaton class

Post by pkmittal » Fri Jun 29, 2012 11:21 am

I also copied Copy the folder <android-sdk>\platform-tools\ to <android-sdk>\platforms\android-8\tools\

and also tried rennaming platform-tools to tools and then copy to <android-sdk>\platforms\android-8 but nothing works...

pkmittal
Posts: 111
Joined: Thu Feb 08, 2007 11:27 am
Contact:

Re: Could not complie the applicaton class

Post by pkmittal » Fri Jun 29, 2012 12:13 pm

The JDK Path was not appearing in the mobile support.. I reinstalled the latest version of java sdk.. now the path appears.

When I save the standalone.. something happens now.. it shows building classes... and keep doing something for few seconds.. but after that it throws same error message.."Could not compile the application class".

please help. What else I can do? Do I need to run any virtual andriod instance even to create the standalone... ?? I hope not...

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Could not complie the applicaton class

Post by Mark » Fri Jun 29, 2012 12:56 pm

Hi,

The first time you copied the files seems to be correct. All changes you made after copying the files were unnecessary and may have caused more problems. I recommend using the latest Android SDK and copying aforementioned files as I already explained. Especially moving or renaming other files and copying folder will break the whole thing.

On Windows, you need to point LiveCode to the C:\Program Files\Android\android-sdk, if that's the folder that contains add-ons, platform-tools, tools and other folders. I have installed Android SDK r18 for Mac OS X. When I start the Android command line utility, the SDK Manager lets me download and install Android 2.3.3 and Android 4.0.3, which are my favorites. LiveCode works fine with both 2.3.3 and 4.0.3. I expect it to work with 4.1 also.

You can download and install all three of them using the SDK manager. When you create a new AVD, you can choose which version of Android you want to use.

You don't need to run the Android simulator to build a standalone package. I did a test with LC 5.0.2 and 5.5 and both work fine if I compile the apps without a key.

Kind regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

pkmittal
Posts: 111
Joined: Thu Feb 08, 2007 11:27 am
Contact:

Re: Could not complie the applicaton class

Post by pkmittal » Fri Jun 29, 2012 1:21 pm

I have redone all the steps correctly.

I am using JDK 1.7.0_05 and Live Code 5.0.2 and latest Andriod SDK. Live Code was not accepting Andriod 4.1 so I also downloaded Andriod 2.2
But I get same compile error..

I copied the 3 files mentioned in the following folder C:\Program Files\Android\android-sdk\tools

Every one is talking about same errors in the forum. Things are really not clear.. Please help.

pkmittal
Posts: 111
Joined: Thu Feb 08, 2007 11:27 am
Contact:

Re: Could not complie the applicaton class

Post by pkmittal » Fri Jun 29, 2012 1:38 pm

Some members mentioned that it does not work with JDK 1.7? Is it true? Do I need to get version of JDK to make it work.?? It is clear that it was not working with Andriod 4.1 so I dowloaded andriod 2.2 and alteast I could load it from Mobile Support.

But things are not compiling... Is there any one who has managed to make it work on Windows xP, JDK 1.7 , with Live Code 5.0.2 Build 1469?

William Jamieson
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 212
Joined: Fri Feb 01, 2013 1:31 am
Contact:

Re: Could not complie the applicaton class

Post by William Jamieson » Tue Feb 05, 2013 6:36 am

pkmittal,

were you able to solve the problem? i am having the same issue testing with the android sdk. please let me know

raemay
Posts: 19
Joined: Sat May 11, 2013 12:05 am

Re: Could not complie the applicaton class

Post by raemay » Sat May 11, 2013 12:08 am

Same problem here. Any help would be very much appreciated.
I am running LiveCode 6.0.1
Android SDK Manager 21.1
Window 7 (64-bit)
I've installed Android 2.2 and added it into the AVD.
Thanks,
RaeMay

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Could not complie the applicaton class

Post by Mark » Sat May 11, 2013 12:33 am

Dear RaeMay,

Please use Android 2.3.3 or later. Earlier versions may not work with LiveCode.

Are you sure that you entered the correct settings in LiveCode's preferences window?

Kind regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

raemay
Posts: 19
Joined: Sat May 11, 2013 12:05 am

Re: Could not complie the applicaton class

Post by raemay » Tue May 14, 2013 7:29 pm

Thanks for the advise Mark.
I gave it a try with 2.3.3 and then again with 3.0 but still no luck. This is the path I have set in the mobile support in the preferences:
C:\SDK\adt-bundle-windows-x86_64-20130219\sdk
Do I need to point it to a specific android version sdk?
Anything else you can suggest?
-RaeMay

raemay
Posts: 19
Joined: Sat May 11, 2013 12:05 am

Re: Could not complie the applicaton class

Post by raemay » Wed May 22, 2013 12:19 am

Good grief! It ended up working after I downgraded my SDK Manager to 20.0.3. You can find the older version here:
Well, I tried to post the link but I guess I don't have permission to do so. Google it, I guess.
Just be sure to deselect the "Update available: rev 22" check box option before you install anything else you may need.
-RaeMay

Post Reply