Unable to build app for testing: apk preparation failed

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

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

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

Re: Unable to build app for testing: apk preparation failed

Post by LiveCode_Panos » Thu Aug 01, 2019 2:56 pm

Hello Fred,

Could you post a screenshot of your android standalone application settings?

Also the platform-tools version is not a problem, I just upgraded mine to the same version as yours and i can still successfully build an Android standlone on 9.5 LC Indy.

Also could you post a screenshot of the LC Preferences, in the "Mobile Support" section?

Kind regards,
Panos
--

synto
Posts: 40
Joined: Thu Jul 18, 2019 9:31 am
Location: Paris, Fr

Re: Unable to build app for testing: apk preparation failed

Post by synto » Thu Aug 01, 2019 3:19 pm

Ok thanks Panos, here is the 2 screenshoots

So the platforms-tools isn't the problem.
Can you use LC with the latest SDK Tools version ?
- SDK build tools 29,0,1
- SDK tools 26,1,1
Attachments
standalone.jpg
Standalone settings
pref.jpg
Mobile Preferences

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

Re: Unable to build app for testing: apk preparation failed

Post by LiveCode_Panos » Thu Aug 01, 2019 6:45 pm

Hello Fred,

I have updated my SDK components to:

Android SDK Tools: 25.2.5
Android SDK Platform Tools: 29.0.1
Android SDK Build Tools: 29.0.1

I can still successfully build an android standalone on LC 9.5 Indy on Linux. Do you see this error with any stack you try - even with a simple stack that has only a button and no script at all?

Regards,
Panos
--

keliko
Posts: 29
Joined: Thu Aug 01, 2019 8:15 am

Re: Unable to build app for testing: apk preparation failed

Post by keliko » Fri Aug 02, 2019 2:02 am

I experienced the same thing, and I had a live chat with support asking about this problem. After I bought an indy license. Everything works fine. I really love livecode. :D

synto
Posts: 40
Joined: Thu Jul 18, 2019 9:31 am
Location: Paris, Fr

Re: Unable to build app for testing: apk preparation failed

Post by synto » Fri Aug 02, 2019 11:29 am

Hello Panos,
Thank you for your tests, so the SDK version seems not to be the problem.

I have uninstalled all Android, SDK, and Livecode materials and reinstalled it with LC Community 9.5 stable.
Only différence is that the SDK Manager on Android Studio ask me for license agreement when installing API 28.

All my old projects made with LCCommunity 9.5dp are now build successfully on LCCommunity 9.5 stable ! :P
I will try the same with LCIndy 9.5 this afternoon.

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

Re: Unable to build app for testing: apk preparation failed

Post by LiveCode_Panos » Fri Aug 02, 2019 11:58 am

Great news Fred.

Maybe the previous installation of Android API 28 was not complete/successful, this would explain why now (and not before) you were asked to agree to the license.

Fingers crossed until the afternoon then :)

Let us know what happened.

Kind regards,
Panos
--

synto
Posts: 40
Joined: Thu Jul 18, 2019 9:31 am
Location: Paris, Fr

Re: Unable to build app for testing: apk preparation failed

Post by synto » Sat Aug 03, 2019 9:03 am

So now I have 2 PC
- a Community PC
- an Indy PC

Unfortunately, after clean install of Android Studio, SDK and Indy on the Indy PC, same "DEPRECATED TOOL" error appears when i build the app.
EVEN with a simple stack with a no scripted button. :?

The only difference between the two PC is java jdk
- OracleJDK on Community PC
- OpenJDK on Indy PC

I will try to install OracleSDK 8 on IndyPC, but hope it's not really the problem. :roll:

EDIT: still the error with Oracle JDK 8... So i have uninstalled the Indy and replaced it by Community ON THE INDY PC

And the build is successfull and installed on my phone... :(

After 1h of use, Community is working great... just the mobilePickDate command isn't working on my phone (and was working with 9,5,0dp version) but perhaps it's my code.

keliko
Posts: 29
Joined: Thu Aug 01, 2019 8:15 am

Re: Unable to build app for testing: apk preparation failed

Post by keliko » Tue Aug 06, 2019 4:48 am

Are you in indy trial mode?

synto
Posts: 40
Joined: Thu Jul 18, 2019 9:31 am
Location: Paris, Fr

Re: Unable to build app for testing: apk preparation failed

Post by synto » Tue Aug 06, 2019 6:20 am

Yes i am, just 1 day left but can't really test it... :cry:

synto
Posts: 40
Joined: Thu Jul 18, 2019 9:31 am
Location: Paris, Fr

Re: Unable to build app for testing: apk preparation failed

Post by synto » Tue Aug 06, 2019 6:46 pm

So, i have bought the Indy license, completely uninstalled the LC (Community or Trial Indy), and installed the full licensed Indy.
All the app are compiled and installed on the phone.

Strange problem, but now it's working.

Still some issue with mobileXXXX commands, seems to do nothing on the phone, but it's another problem.

Thank you all for your help.

Post Reply

Return to “Android Deployment”