Android Development

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

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
chipsm
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 244
Joined: Wed May 11, 2011 7:50 pm
Location: Southern California

Android Development

Post by chipsm » Tue May 01, 2018 5:06 pm

This is quite a long post, so I apologize in advanced.
I had to rebuild my computer and now I am having problems with my Android Development process.
First off it is a Windows 10 o/s. I have been working on this project for some time and I have successfully deployed to my Android devices in the past.
I am using LC 9 - the last release (9.0).
I have reloaded the Android Studio several times after completely uninstalling it. Sometimes the Android SDK is recognized and several times it was not. I made sure that the correct SDK was installed and I even went back to a previous Android Studio version.
My APK's are failing.
I have followed the instructions about Android development on the LiveCode Site.
I have attached a couple of images of the error dialog box from my Android build.
The most frustrating part is the fact that this use to work so well.
I would also like to have all of the Inclusions explained in the stand alone application dialogs. It seems as though there are some new ones and since there are no explanations or definitions for them they how does one decide which ones to use. For example there is a new Inclusion called Map. Is this self explanatory or not? It is new in version 9.0 and errors when included in my builds.
Attachments
2018-05-01_8-40-26.png
2018-05-01_8-35-57.png
Clarence Martin
chipsm@themartinz.com

chipsm
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 244
Joined: Wed May 11, 2011 7:50 pm
Location: Southern California

Re: Android Development - another question

Post by chipsm » Tue May 01, 2018 5:24 pm

which version of Java is recommended with LiveCode for Android Development?
Clarence Martin
chipsm@themartinz.com

AxWald
Posts: 578
Joined: Thu Mar 06, 2014 2:57 pm

Re: Android Development

Post by AxWald » Tue May 01, 2018 6:17 pm

Hi,

I'm using in Win 10 64bit:
- Java JDK 1.8.0_144
- Android SDK Manager 24.4.1
- in the SDK, I have APIs 7,8,15,21 installed
Building for LC 6.7.10 works flawlessly this way.

I've had bad experiences updating the SDK, so I leave it at a version that's known to work.

In your case, have you tried to build a most simple "Hello-World" stack instead of your full project? And if this doesn't work, too, have you tried a previous LC version?

Have fun!
All code published by me here was created with Community Editions of LC (thus is GPLv3).
If you use it in closed source projects, or for the Apple AppStore, or with XCode
you'll violate some license terms - read your relevant EULAs & Licenses!

LiveCode_Panos
Livecode Staff Member
Livecode Staff Member
Posts: 818
Joined: Fri Feb 06, 2015 4:03 pm

Re: Android Development

Post by LiveCode_Panos » Tue May 01, 2018 6:42 pm

Hi chipsm,

Your setup is probably OK, since the standalone is built and LC tries to install it to your device. What happens in this case is probably that you already have an app with the same app id (e.g. com.yourcompany.yourapp) installed in your device, probably from a different computer, so LC thinks the app you are trying now to install is an update, and for some reason it marks it as "INCOMPATIBLE_UPDATE"

If you just use a different app id (e.g. com.yourcompany.yournewapp) it should work as expected.

Alternatively, delete the old app from your device if you no longer need it.

Best,
Panos
--

chipsm
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 244
Joined: Wed May 11, 2011 7:50 pm
Location: Southern California

Re: Android Development

Post by chipsm » Tue May 01, 2018 10:10 pm

Thanks AxWald,
I'll keep your info on file and in my mind.
Have you tried the latest Java- i believe jdk 10.0.1?
All of these updates can be the death of a person especially to ones sanity.
Last edited by chipsm on Tue May 01, 2018 11:26 pm, edited 1 time in total.
Clarence Martin
chipsm@themartinz.com

chipsm
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 244
Joined: Wed May 11, 2011 7:50 pm
Location: Southern California

Re: Android Development

Post by chipsm » Tue May 01, 2018 10:14 pm

Panos,
thanks for the reply. I had not thought of that. My Android use to update te old app automatically.
Can you provide a reference to me that shows all of the definitions of the Inclusions in the StandALone Inclusions Window?
Also what is the MAP inclusion? it seems to be new in LC 9.0
Clarence Martin
chipsm@themartinz.com

LiveCode_Panos
Livecode Staff Member
Livecode Staff Member
Posts: 818
Joined: Fri Feb 06, 2015 4:03 pm

Re: Android Development

Post by LiveCode_Panos » Wed May 02, 2018 12:43 pm

Hi Clarence,

The Map inclusion is needed if you use the Map Widget (available on Indy and Business).

As far as I know, there is not a document describing the Inclusions in the standalone settings window, but most of them are self explanatory.

In LC 9 we have added a lot of new widgets and libraries, for which you can find more info in the Dictionary.

- Open the Dictionary
- In the "Filters" section at the left, click "widget". You will now see all the available widgets
- Similarly, click "library". You will now see all the available libraries

Best,
Panos
--

chipsm
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 244
Joined: Wed May 11, 2011 7:50 pm
Location: Southern California

Re: Android Development

Post by chipsm » Wed May 02, 2018 6:25 pm

Panos,
I have removed and re-installed the Android Studio,and the Java SDK to try and get LiveCode to run my Android Application to no avail.
The current java SDK is:1.8.0_171 and the current Android SDK is from the Android Studio 3.1.2, SDK Manager 4.0.3.
I am still having problems creating an APK to test on my Android Device. This use to work well before I had to reload and rebuild my Windows 10.
I still get the error dialog similar to the Images that I have posted in my earlier post.
I am at my wits end because this is stopping my application development .
Any advice would greatly be appreciated.
Clarence Martin
chipsm@themartinz.com

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

Re: Android Development

Post by jacque » Wed May 02, 2018 8:10 pm

Clarence, Panos means you need to delete the old copy of the app off your phone. There is a conflict between that and the one you are currently building.

I've seen the same error. Removing the old copy of the app fixed it. Once you've done that and installed the new app, it should update itself normally. The conflict happens when something in your setup changes.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

chipsm
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 244
Joined: Wed May 11, 2011 7:50 pm
Location: Southern California

Re: Android Development

Post by chipsm » Wed May 02, 2018 10:22 pm

Hi Jacque,
I have removed the old app but to no avail.
Clarence Martin
chipsm@themartinz.com

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

Re: Android Development

Post by jacque » Thu May 03, 2018 12:28 am

I wonder if you need a different version of Java, I vaguely remember that Windows users had to go back to 1.7 (I think) but am not sure that's still the case. Panos would know.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

LiveCode_Panos
Livecode Staff Member
Livecode Staff Member
Posts: 818
Joined: Fri Feb 06, 2015 4:03 pm

Re: Android Development

Post by LiveCode_Panos » Thu May 03, 2018 9:13 am

Hi Clarence,

The version of Java and SDK you use works fine with Windows 10 and LC 9. The error you see ("INSTALL_FAILED_UPDATE_INCOMPATIBLE") means that an app with the same app id is already installed in the phone.

Could you try changing the app id in the standalone settings to something that definitely does not already exist in the phone? For example try setting the app id to "com.test.thisisnew" and try again.

Let us know if this works.

Best,
Panos
--

chipsm
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 244
Joined: Wed May 11, 2011 7:50 pm
Location: Southern California

Re: Android Development

Post by chipsm » Thu May 03, 2018 4:06 pm

Panos,
That actually worked. The interesting thing is that this had not happened to me before. Is this something that I need to watch out for each iteration of my application?
It just goes to show Everyday we get to learn something new!
I was really getting frustrated and even wondered if I was that stupid.
Thanks for following this issue for me.
I truly appreciate your help. Follow this post and other things on the list, I know that you plate is full of problems. I want to thank you and Jacque for following and helping with this problem.
The LiveCode support has been GREAT for me.
I encourage anyone to utilize the forum to get help with their issues.
Thank You, Thank You,Thank You!
Clarence Martin
chipsm@themartinz.com

LiveCode_Panos
Livecode Staff Member
Livecode Staff Member
Posts: 818
Joined: Fri Feb 06, 2015 4:03 pm

Re: Android Development

Post by LiveCode_Panos » Thu May 03, 2018 5:18 pm

Hi Clarence,

You are welcome, I am glad this fixed the problem.
Is this something that I need to watch out for each iteration of my application?
If you use a *different* computer (or if you rebuild your computer, as you did) to build an android standalone that has an app id that already exists in your phone, then you will see that error message. In this case, you have to either:

(1) Delete the old app from your phone OR
(2) Use a different app id that definitely does not already exist in the phone

If you tried (1) and saw no difference, then it is quite possible that you did not delete the correct app. It has happened to me millions of times, especially if you have a lot of LC apps installed in the phone. The problem is that in the phone you can only see the *label* of the standalone, not the actual *app id*. So it can happen that you delete the wrong app.

Kind regards,
Panos
--

Post Reply

Return to “Android Deployment”