Android Studio 2.3.3 - could not encode class bundle
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Posts: 746
- Joined: Sun Feb 04, 2007 11:01 pm
- Location: McKenna, WA
Android Studio 2.3.3 - could not encode class bundle
Hi,
I saw where people were having this problem with earlier versions of Android SDK but I couldn't find anything regarding Studio 2.3.3. I'm getting the error when I send to the sim or build a standalone. The IOS version of my app builds fine.
I'm running:
LC 8.1.6, Indy
Java 8 Update 144
Studio 2.3.3
Here are my standalone settings: Here are the SDK components I have loaded: Also 4.0.3 15 And the tools I have loaded: Any help would be appreciated.
I saw where people were having this problem with earlier versions of Android SDK but I couldn't find anything regarding Studio 2.3.3. I'm getting the error when I send to the sim or build a standalone. The IOS version of my app builds fine.
I'm running:
LC 8.1.6, Indy
Java 8 Update 144
Studio 2.3.3
Here are my standalone settings: Here are the SDK components I have loaded: Also 4.0.3 15 And the tools I have loaded: Any help would be appreciated.
Tom
MacBook Pro OS Mojave 10.14
MacBook Pro OS Mojave 10.14
-
- VIP Livecode Opensource Backer
- Posts: 7210
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: Android Studio 2.3.3 - could not encode class bundle
You have to install a legacy version of Java for OS X, here:
https://support.apple.com/kb/dl1572?locale=en_US
Oracle's version 8 won't work. Restart LC after installation.
Edit: after installing, check the path in the mobile pane of LC prefs to be sure it's listed there next to "JDK Path:"
https://support.apple.com/kb/dl1572?locale=en_US
Oracle's version 8 won't work. Restart LC after installation.
Edit: after installing, check the path in the mobile pane of LC prefs to be sure it's listed there next to "JDK Path:"
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
-
- Posts: 746
- Joined: Sun Feb 04, 2007 11:01 pm
- Location: McKenna, WA
Re: Android Studio 2.3.3 - could not encode class bundle
Hi Jacqueline,
Thanks for the help. Installed the legacy version.
I must have done something wrong.
Still no joy.
Thanks for the help. Installed the legacy version.
I must have done something wrong.
Still no joy.
Tom
MacBook Pro OS Mojave 10.14
MacBook Pro OS Mojave 10.14
-
- VIP Livecode Opensource Backer
- Posts: 7210
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: Android Studio 2.3.3 - could not encode class bundle
That's odd, my copy says Java 1.6.0. I got it from the link I posted. If I remember right, 1.6 is what we need to use but they've changed a lot of things since I first installed. I'm not using Android Studio, I'm still using the older Java app.
I assume you got all the installations mentioned in the LC lesson?
http://lessons.livecode.com/m/2571/l/62 ... -5-onwards
I don't know how Studio manages the files, but with the Java app I had to download the latest platform tools and build tools. I don't see those listed in the LC Studio lesson.
I assume you got all the installations mentioned in the LC lesson?
http://lessons.livecode.com/m/2571/l/62 ... -5-onwards
I don't know how Studio manages the files, but with the Java app I had to download the latest platform tools and build tools. I don't see those listed in the LC Studio lesson.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
-
- Posts: 746
- Joined: Sun Feb 04, 2007 11:01 pm
- Location: McKenna, WA
Re: Android Studio 2.3.3 - could not encode class bundle
Thanks Jacqueline. Yes, I have gone thru that lesson. Everything I've read says to install Java 8 144 for Studio
Guess I'll keep poking a this.
Guess I'll keep poking a this.
Tom
MacBook Pro OS Mojave 10.14
MacBook Pro OS Mojave 10.14
-
- VIP Livecode Opensource Backer
- Posts: 7210
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: Android Studio 2.3.3 - could not encode class bundle
I know and either they've changed things or it's wrong. It's been incorrect before when providing the link to Oracle's site, which didn't work in the past, but I think we need verification from the team.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
-
- Posts: 746
- Joined: Sun Feb 04, 2007 11:01 pm
- Location: McKenna, WA
Re: Android Studio 2.3.3 - could not encode class bundle
I hear you! This is why I've avoided converting any of my apps to Android. Just thought I'd give it another go because I want to convert my latest project. Thought the kinks would have been worked out by now.
Tom
MacBook Pro OS Mojave 10.14
MacBook Pro OS Mojave 10.14
-
- VIP Livecode Opensource Backer
- Posts: 7210
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: Android Studio 2.3.3 - could not encode class bundle
Do you feel like asking tech support to verify their lesson content? It would help a lot of people.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
-
- Posts: 746
- Joined: Sun Feb 04, 2007 11:01 pm
- Location: McKenna, WA
Re: Android Studio 2.3.3 - could not encode class bundle
Great idea. I'll ping them and once I get this figured out I'll post the results. Thanks again, J.
Tom
MacBook Pro OS Mojave 10.14
MacBook Pro OS Mojave 10.14
-
- Posts: 746
- Joined: Sun Feb 04, 2007 11:01 pm
- Location: McKenna, WA
Re: Android Studio 2.3.3 - could not encode class bundle
A quick update.
Studio does require Java 8 144. The problem I was having was that there was a previous Java folder in the Library folder and even though I have admin on my machine, the Java 8 144 install wasn't added to the existing folder. I renamed the existing folder and re-installed Java 8 144 and it build a new folder with the correct Java level in it. That fixed the Java problem. I don't get "could not encode class bundle" anymore.
Now I get this. But I'm thinking it's just the way I have the VM configured... I hope.
Studio does require Java 8 144. The problem I was having was that there was a previous Java folder in the Library folder and even though I have admin on my machine, the Java 8 144 install wasn't added to the existing folder. I renamed the existing folder and re-installed Java 8 144 and it build a new folder with the correct Java level in it. That fixed the Java problem. I don't get "could not encode class bundle" anymore.
Now I get this. But I'm thinking it's just the way I have the VM configured... I hope.
Tom
MacBook Pro OS Mojave 10.14
MacBook Pro OS Mojave 10.14
-
- VIP Livecode Opensource Backer
- Posts: 7210
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: Android Studio 2.3.3 - could not encode class bundle
It sounds like the EABI image wasn't downloaded and installed, or you didn't choose it as the VM. Glad you got it fixed.
I've just moved to a new Mac and got the same "class bundle" error. I fixed it by installing the 1.6 Apple version of Java and getting an old copy of the Android tools from a backup. There's a warning in this lesson about not using the latest build tools, which I'd accidentally updated before seeing it:
http://lessons.livecode.com/m/4069/l/56 ... r-on-a-mac
One of these days I may move to Android Studio, though really all we need to have for LC builds are the command line tools.
I've just moved to a new Mac and got the same "class bundle" error. I fixed it by installing the 1.6 Apple version of Java and getting an old copy of the Android tools from a backup. There's a warning in this lesson about not using the latest build tools, which I'd accidentally updated before seeing it:
http://lessons.livecode.com/m/4069/l/56 ... r-on-a-mac
One of these days I may move to Android Studio, though really all we need to have for LC builds are the command line tools.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
-
- Posts: 746
- Joined: Sun Feb 04, 2007 11:01 pm
- Location: McKenna, WA
Re: Android Studio 2.3.3 - could not encode class bundle
Sorry for showing my ignorance once again. What's EABI image? Is that something in the AVD manager?
Tom
MacBook Pro OS Mojave 10.14
MacBook Pro OS Mojave 10.14
-
- VIP Livecode Opensource Backer
- Posts: 7210
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: Android Studio 2.3.3 - could not encode class bundle
It's one of the virtual images Android supplies as a template for setting up a VM. I'm not sure how Studio does it though. It shows up in my Java app in every version of the OS with an option to install. Sorry I can't help more, I'm still too old school.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
-
- Posts: 746
- Joined: Sun Feb 04, 2007 11:01 pm
- Location: McKenna, WA
Re: Android Studio 2.3.3 - could not encode class bundle
Looks like there are some files missing in Studio 2.3.3 under Android 8
I loaded 7.1.1 and created a VM using it. Sending to the sim gave the same result. I've asked Elanor to explain how she set up her VM. I'll post back when she replies.
I loaded 7.1.1 and created a VM using it. Sending to the sim gave the same result. I've asked Elanor to explain how she set up her VM. I'll post back when she replies.
Tom
MacBook Pro OS Mojave 10.14
MacBook Pro OS Mojave 10.14
-
- VIP Livecode Opensource Backer
- Posts: 7210
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: Android Studio 2.3.3 - could not encode class bundle
Looking at my list, the last copy of the system image is in Android 7.0 (API 24), named "ARM EABI v7a System Image". Presumably that one is shared by newer versions, but I can only guess. I haven't used a VM in some years, they're slow and dodgy and not really worth the trouble. It's way easier to cable your device to the Mac and just use the Test button in the IDE. Faster too.
Even building an APK standalone and transferring it to your device via Dropbox is faster.
Even building an APK standalone and transferring it to your device via Dropbox is faster.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com