Unable to build app for testing: apk preparation failed
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Unable to build app for testing: apk preparation failed
Any solutions for this? i have deleted .android, i dont have accents in file names, its the same if i try with an empty stack too..
-
- Livecode Staff Member
- Posts: 821
- Joined: Fri Feb 06, 2015 4:03 pm
Re: Unable to build app for testing: apk preparation failed
Hi brotee,
Which version of LC are you using, and in which platform?
Moreover what is the version of your Android SDK Tools, SDK Build Tools, and SDK Platform Tools?
Best,
Panos
--
Which version of LC are you using, and in which platform?
Moreover what is the version of your Android SDK Tools, SDK Build Tools, and SDK Platform Tools?
Best,
Panos
--
Re: Unable to build app for testing: apk preparation failed
i have tried LC 9.01 9.0 8.1.9
windows 7
SDK platforms installed: 2.2, 4.03, 4.4, 5.1, 8.0
SDK build tools i have tried 22.0.1, 26.00, 28.01
SDK platform tools: 28.0.0
SDK tools: 26.1.1
windows 7
SDK platforms installed: 2.2, 4.03, 4.4, 5.1, 8.0
SDK build tools i have tried 22.0.1, 26.00, 28.01
SDK platform tools: 28.0.0
SDK tools: 26.1.1
-
- Livecode Staff Member
- Posts: 821
- Joined: Fri Feb 06, 2015 4:03 pm
Re: Unable to build app for testing: apk preparation failed
Hmm strange. I am not sure why you get that error. Can you please try the following in LC 9.0.1 RC-1:
1. Open the msg box
2. Type
3. Type
The script editor should open now, showing the script of the stack you requested.
4. Find line (should be line no 912)
5. Add a breakpoint to this line.
6. Find line (should be 917) and change it to:
7. Click the "Apply" button (top left)
8. Try to save again as an android standalone
9. The execution should now stop at the breakpoint you added
10. Click on the "Step over" button, until the updated line is executed.
What is the new error message? Hopefully it should be more informative.
Best regards,
Panos
1. Open the msg box
2. Type
Code: Select all
put true into gRevDevelopment
Code: Select all
edit the script of stack revSaveAsAndroidStandalone at 912
4. Find line
Code: Select all
buildAPK tUnalignedApkFile, tUnsignedParam, tAssetArchive, tClassesFile, tLibsBuildFolder
5. Add a breakpoint to this line.
6. Find line
Code: Select all
throw "apk preparation failed"
Code: Select all
throw "apk preparation failed" & the result
8. Try to save again as an android standalone
9. The execution should now stop at the breakpoint you added
10. Click on the "Step over" button, until the updated line is executed.
What is the new error message? Hopefully it should be more informative.
Best regards,
Panos
Re: Unable to build app for testing: apk preparation failed
yes it is
it would be great if error messages would be informative
message was:
"failederror opening registry key
'Software\JavaSoft\Java Runtime Environment'
it would be great if error messages would be informative
message was:
"failederror opening registry key
'Software\JavaSoft\Java Runtime Environment'
-
- Livecode Staff Member
- Posts: 821
- Joined: Fri Feb 06, 2015 4:03 pm
Re: Unable to build app for testing: apk preparation failed
Thanks, this is helpful. Which version of Java have you installed? Note that Java 9 and 10 will not work, you need Java 8.
Re: Unable to build app for testing: apk preparation failed
Yep, i have read the posts before about this topic and i had 8.171
i have uninstalled every java, and deleted the whole directory.. and reinstalled 8.171 only and now it works
ty for your helping
i have uninstalled every java, and deleted the whole directory.. and reinstalled 8.171 only and now it works
ty for your helping
-
- Livecode Staff Member
- Posts: 821
- Joined: Fri Feb 06, 2015 4:03 pm
Re: Unable to build app for testing: apk preparation failed
You are welcome
Re: Unable to build app for testing: apk preparation failed
I have used LC Community 9,5 with no problem, but with the LCIndy 9,5 trial, i'm unable to save a standalone.
Error "apk preparation failed". More info with APK compilation code modified is "THIS TOOL IS DEPRECATED. See --help for more informations"
But same LC project under LCCommunity 9,5 is running without problems
Any idea ?
Error "apk preparation failed". More info with APK compilation code modified is "THIS TOOL IS DEPRECATED. See --help for more informations"
But same LC project under LCCommunity 9,5 is running without problems
Any idea ?
-
- Livecode Staff Member
- Posts: 821
- Joined: Fri Feb 06, 2015 4:03 pm
Re: Unable to build app for testing: apk preparation failed
Hello synto,
Are you on Mac, Linux or Windows?
Also, are you trying to build the exact same stack in Indy vs Community?
In your android-sdk folder, what is the version of the following:
- SDK platforms
- SDK build tools
- SDK platform tools
- SDK tools
Kind regards,
Panos
--
Are you on Mac, Linux or Windows?
Also, are you trying to build the exact same stack in Indy vs Community?
In your android-sdk folder, what is the version of the following:
- SDK platforms
- SDK build tools
- SDK platform tools
- SDK tools
Kind regards,
Panos
--
Re: Unable to build app for testing: apk preparation failed
Hi Panos,
I'm on Ubuntu and yes, i'm loading the same LC project
The only difference is that Indy9,5,0 requesting API28 in Android SDK directory
Here is all the version numbers:
- SDK platforms API 28
- SDK build tools 29,0,1
- SDK platform tools 29,0,1
- SDK tools 26,1,1
Thanks for your help
Fred
I'm on Ubuntu and yes, i'm loading the same LC project
The only difference is that Indy9,5,0 requesting API28 in Android SDK directory
Here is all the version numbers:
- SDK platforms API 28
- SDK build tools 29,0,1
- SDK platform tools 29,0,1
- SDK tools 26,1,1
Thanks for your help
Fred
-
- Livecode Staff Member
- Posts: 821
- Joined: Fri Feb 06, 2015 4:03 pm
Re: Unable to build app for testing: apk preparation failed
Hello Fred,
>>>>>The only difference is that Indy9,5,0 requesting API28 in Android SDK directory
Do you get that request only on Indy? This is a requirement for all editions, including community.
Anyway, the setup I have in my Ubuntu box that works with LC 9.5 Indy is:
- SDK platforms API 15,19,23,28
- SDK build tools 19.1
- SDK platform tools 20
- SDK tools 24.4.1
It might be worth giving a try with these ^^^^ versions installed. If you try this, make sure you uninstall the newer versions first.
Kind regards,
Panos
--
>>>>>The only difference is that Indy9,5,0 requesting API28 in Android SDK directory
Do you get that request only on Indy? This is a requirement for all editions, including community.
Anyway, the setup I have in my Ubuntu box that works with LC 9.5 Indy is:
- SDK platforms API 15,19,23,28
- SDK build tools 19.1
- SDK platform tools 20
- SDK tools 24.4.1
It might be worth giving a try with these ^^^^ versions installed. If you try this, make sure you uninstall the newer versions first.
Kind regards,
Panos
--
Re: Unable to build app for testing: apk preparation failed
>>>>>The only difference is that Indy9,5,0 requesting API28 in Android SDK directory
Do you get that request only on Indy? This is a requirement for all editions, including community.
Yes only on Indy, but i have developed the stack on Communty 9,5,0dp
Ok i will try to install Indy on clear platform.
Do you get that request only on Indy? This is a requirement for all editions, including community.
Yes only on Indy, but i have developed the stack on Communty 9,5,0dp
Ok i will try to install Indy on clear platform.
-
- Livecode Staff Member
- Posts: 821
- Joined: Fri Feb 06, 2015 4:03 pm
Re: Unable to build app for testing: apk preparation failed
Hello Fred,
Do I suggest you install these versions of the following tools:
- SDK platforms API 15,19,23,28
- SDK build tools 19.1
- SDK platform tools 20
- SDK tools 24.4.1
and uninstall the existing versions you have:
Aha! This explains why only 9.5.0 Indy asks you for API 28. LC 9.5.0 DP-1 does not ask for API 28, but 9.5.0 (STABLE) does.Yes only on Indy, but i have developed the stack on Communty 9,5,0dp
Do I suggest you install these versions of the following tools:
- SDK platforms API 15,19,23,28
- SDK build tools 19.1
- SDK platform tools 20
- SDK tools 24.4.1
and uninstall the existing versions you have:
It might be the case that one of the newer versions of the tools you have installed does not work quite well with API 28 and/or LiveCode- SDK build tools 29,0,1
- SDK platform tools 29,0,1
- SDK tools 26,1,1
Re: Unable to build app for testing: apk preparation failed
I've downgraded everything but Platforms-tools cause i wasn't be able to found it on web, it seems to be a very older version.
Unfortunately, i've got the same "DEPRECATED TOOL" error...
Unfortunately, i've got the same "DEPRECATED TOOL" error...