Could not compile service support class

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

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
wolfilein
Posts: 14
Joined: Wed May 30, 2018 12:44 pm

Could not compile service support class

Post by wolfilein » Fri Jun 01, 2018 5:08 pm

Hi
On my iMac with Livecode 9 I get this error message, when trying to make an Android app. The standalone settings seem okay, SDK 11.2 and Java 8.171 are installed.

In Android Studio, SDK is in /Users/myname/Library/Android/sdk, Android 5.0 to 8.0 is installed.
In Livecode, Preferences, Mobile Support, SDK is in /Users/myname/meineMacdokumente/Android/sdk.

So I have two different locations for the SDK, but as I do not get a message that the SDK is not found, it should not be a problem.
(The reason why I have two locations is that in Livecode I cannot access the Library folder, even though I entered this command into the terminal:
chflags nohidden ~/Library, it did not help!). Apple is hiding this folder from the user, and this method I found in the Internet (https://www.lifewire.com/os-x-is-hiding ... er-2260833) appears not to function.

Has anybody an idea how this not so rare problem can be solved?
Regards
wolfilein

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7215
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Could not compile service support class

Post by jacque » Sat Jun 02, 2018 6:16 pm

I made my library folder visible a long time ago. Use either of the last two methods in the link you posted. When I was on Mavericks I held down the Option key while choosing the Go menu, then put the Library folder in the Finder sidebar.

Or you can just show the folder once and drag the SDK out of there.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

wolfilein
Posts: 14
Joined: Wed May 30, 2018 12:44 pm

Re: Could not compile service support class

Post by wolfilein » Sat Jun 02, 2018 7:51 pm

As mentioned above, as I do not get a message that the SDK is missing, the two folders should not be the problem. There must be a different kind of problem?

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7215
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Could not compile service support class

Post by jacque » Sat Jun 02, 2018 8:33 pm

The error means the SDK was not found, or it is missing required components. I think it is dangerous to have two copies of the SDK, it would be better to use only one for both LC and Studio. Each SDK will store its own copies of the packages you download, and you will need to keep both copies up to date individually. It is much easier to work with only one SDK.

Hold the Option key down and choose the Go menu in Finder. Then choose Library. When the folder opens, delete or rename one of the SDK folders. Choose that location in LC's Mobile Prefs.

Be sure that the SDK has the correct packages installed. You will need Android 4.0.3, which LC requires. You can also install other packages if you like. Be sure you install the correct version of Build Tools also. You can do this in Android Studio, as explained here:
http://lessons.livecode.com/m/2571/l/62 ... oid-studio Near the top of that page, there is a link to the correct version of Android Studio also, that is the one you should install.

The instructions in that lesson should work.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

wolfilein
Posts: 14
Joined: Wed May 30, 2018 12:44 pm

Re: Could not compile service support class

Post by wolfilein » Sat Jun 02, 2018 9:28 pm

I have now installed Android 4.03 (never thought that one needs such an old version, as Android 8.1 is the latest version) and deleted one of the SDKs, but with no effect, I still get this error message. My Android Studio is the present version 3.1.2, as I also want to try Android Studio itself, I do not want to install an older version, but as Android 4.03 is installed, this should not be the problem. ??

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7215
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Could not compile service support class

Post by jacque » Sun Jun 03, 2018 9:14 pm

I assume 4.0.3 is required so that your app will be compatible with older Android phones. LC used to require 2.3. ;)

I have never used Android Studio. I installed the Android SDK and Java SDK and that is all I needed. It is still my setup. I double-click the "android" file inside the SDK->Tools folder, the SDK Manager launches, and I install any packages I need. After that I ignore it. LC uses the Android command tools to create its apps.

So I can't give you any more info about using Android Studio. Right now I am using Java 1.8_152 and the copy of Android Command Tools you can download at the bottom of the Studio download page. In the SDK Manager I have the SDK tools installed, the platform tools, the package for 4.0.3 and the SDK Platform file for several other API versions. I also have Android SDK Build Tools installed for every version. You don't really need all of them, but I have been downloading the latest every time I update so they are all still installed.

My SDK folder is located in a development folder I created in my user account:
~/Development/android-sdk-macosx/

I would not use the Library to store the android sdk, it has more restrictive permissions. Move it out, make sure you have all the right packages installed, and add the new path to LC mobile prefs.
Attachments
Screen Shot 2018-06-03 at 3.02.48 PM.png
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Post Reply

Return to “Android Deployment”