Another Plea for help building Kodi For android
#1
Ok so I've tried to helping myself and manage to fix each of the problem up until this error so far but now I'm stuck because I can't find any post referencing the same errors.

here's what I'm using:

Ubuntu 14.04.4 downloaded from here http://releases.ubuntu.com/14.04/ubuntu-...-amd64.iso
NDK version r10e downloaded from here https://dl.google.com/android/repository...x86_64.zip
toolchain I assume 4.8 create with
Code:
./make-standalone-toolchain.sh --ndk-dir=../../ --install-dir=/home/kodidev/Android/Toolchain/android-17 --platform=android-17 --toolchain=arm-linux-androideabi-4.8 --system=linux-x86_64
OpenJRE 6 java version 1.6.0_39 (was originally using OpenJRE 7 but downgraded to fix problem but problem still exist)

though it stated that I have successfully build the dependencies, I did notice that it generated this message while building python27-native

Code:
make[1]: Entering directory `/home/kodidev/kodi-android/tools/depends/native/python27-native/x86_64-linux-native'
running build
running build_ext
INFO: Can't locate Tcl/Tk libs and/or headers

Python build finished, but the necessary bits to build these modules were not found:
_bsddb             _curses            _curses_panel  
_tkinter           bsddb185           bz2            
dbm                dl                 gdbm            
imageop            sunaudiodev                        
To find the necessary bits, look in setup.py in detect_modules() for the module's name.

running build_scripts
make[1]: Leaving directory `/home/kodidev/kodi-android/tools/depends/native/python27-native/x86_64-linux-native'

was able to successfully build Kodi up till this point
$ cd $HOME/kodi-android
$ make -C tools/depends/target/xbmc
$ make

but make apk generated this error which I assume that I'm not using the right version of java though I tried to downgrade to java version 1.6.0_27 I could only find the version 1.6.0_39
Code:
Crunching PNG Files in source dir: xbmc/res
To destination dir: tmp/res
/home/kodidev/Android/Sdk/build-tools/24.0.0/aapt p -f -I /home/kodidev/Android/Sdk/platforms/android-17/android.jar -S tmp/res/ -M xbmc/AndroidManifest.xml -F images/kodiapp-debug-skeleton.apk -J xbmc/src
    (skipping file '.gitkeep' due to ANDROID_AAPT_IGNORE pattern '.*')
    (skipping file '.gitkeep' due to ANDROID_AAPT_IGNORE pattern '.*')
    (skipping file '.gitkeep' due to ANDROID_AAPT_IGNORE pattern '.*')
    (skipping file '.gitkeep' due to ANDROID_AAPT_IGNORE pattern '.*')
    (skipping file '.gitkeep' due to ANDROID_AAPT_IGNORE pattern '.*')
mkdir -p xbmc/obj
Exception in thread "main" java.lang.UnsupportedClassVersionError: com/android/dx/command/Main : Unsupported major.minor version 52.0
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:643)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:277)
    at java.net.URLClassLoader.access$000(URLClassLoader.java:73)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:212)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:323)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:296)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:268)
    at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:406)
make[1]: *** [xbmc/classes.dex] Error 1
make[1]: Leaving directory `/home/kodidev/kodi-android/tools/android/packaging'
make: *** [apk] Error 2

Any Help would be appreciated. Since I've put a couple days into this already I really would like to get it working. P.S I'm a linux Noobie so please dumb the complicated stuff down for me Big Grin
though donation is not necessary but just in case you want to: Donate Here
Reply
#2
You seem to be building using Java 8.
Check what java version is actually active with "java - version"
Reply
#3
Hi Koying,

i have similar Error, please help me Huh

Code:
java -version
java version "1.6.0_39"
OpenJDK Runtime Environment (IcedTea6 1.13.11) (6b39-1.13.11-0ubuntu0.14.04.1)
OpenJDK 64-Bit Server VM (build 23.25-b01, mixed mode)
Reply
#4
(2016-07-13, 19:23)sensman Wrote: i have similar Error, please help me Huh

Yeah, right. Not related at all, not even Kodi Wink
Re-do point 3.3 (update sdk) and re-do the ./bootstrap and ./configure in tools/depends.
Reply
#5
Please use pastebin.com for logs!
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
#6
Smile 
@Martijn

Sorry for that

@Koying


Thank you, thank you
now it works Smile
Reply
#7
(2016-07-13, 07:48)Koying Wrote: You seem to be building using Java 8.
Check what java version is actually active with "java - version"

Yes I've ran that command but nothing directly tells me what java version I have. Below is the output. I assume if I knew the details about the different java version for linux this might be enough but not sure if IcedTea6 means java 6 or not

Code:
java version "1.6.0_39"
OpenJDK Runtime Environment (IcedTea6 1.13.11) (6b39-1.13.11-0ubuntu0.14.04.1)
OpenJDK 64-Bit Server VM (build 23.25-b01, mixed mode)

Here's the pastebin of the full output of the make apk
http://pastebin.com/KUPYDZDT

FYI if you have the the link to the specific android SDK and OpenJDK that you know works I'm willing to start from scratch and try it with those files instead
though donation is not necessary but just in case you want to: Donate Here
Reply
#8
Ah, looks like build tools 24 actually *requires* Java 8...
Reply
#9
Hi Koying,

Have you a actually guide for compile SPMC for android.
The included instructions for android are not up to date.
Have unfortunately still errors in the creation of the apk file. (Build Dependancies + Building SPMC are OK!)
Tested java 6 and 7 with same errors. -> "cannot find symbol import android.media.AudioDeviceInfo"
What I can do , please give me instructions.

Sorry for my english
Reply
#10
(2016-07-14, 08:43)Koying Wrote: Ah, looks like build tools 24 actually *requires* Java 8...

so does that mean it by default automatically install java 8 ? even though I did a sudo apt-get install openjdk-6-jre? What do you suggest I do?
though donation is not necessary but just in case you want to: Donate Here
Reply
#11
Nope, it means you need to install Java 8.
Reply
#12
(2016-07-15, 08:00)Koying Wrote: Nope, it means you need to install Java 8.

I removed openjdk 6 and install openjdk8 still no success. Same type of error but now there's more of it. I've even tried removing OpenJDK and used oracle's version of java8 still has the same error message. I also played around with setting the Java_Home variable but it had no effect.
I think it would probably be easier if I can use the exact version of each component what works. originally I spent two days trying to build the dependency and it turn out I shouldn't use the latest NDK but 10e. Now i'm wondering if using the latest android SDK with the studio install is causing my problem.

here's the output of the make for the kodi build

http://pastebin.com/19rvx4dE

and here's the output of the make apk with the error message
http://pastebin.com/JU0m5cMG

and below is the snippet with the error message.

Code:
mkdir -p tmp/res; /home/kodidev/Android/Sdk/build-tools/24.0.0/aapt c -S xbmc/res -C tmp/res; cp -r -n xbmc/res tmp/ || true
Crunching PNG Files in source dir: xbmc/res
To destination dir: tmp/res
/home/kodidev/Android/Sdk/build-tools/24.0.0/aapt p -f -I /home/kodidev/Android/Sdk/platforms/android-17/android.jar -S tmp/res/ -M xbmc/AndroidManifest.xml -F images/kodiapp-debug-skeleton.apk -J xbmc/src
    (skipping file '.gitkeep' due to ANDROID_AAPT_IGNORE pattern '.*')
    (skipping file '.gitkeep' due to ANDROID_AAPT_IGNORE pattern '.*')
    (skipping file '.gitkeep' due to ANDROID_AAPT_IGNORE pattern '.*')
    (skipping file '.gitkeep' due to ANDROID_AAPT_IGNORE pattern '.*')
    (skipping file '.gitkeep' due to ANDROID_AAPT_IGNORE pattern '.*')
mkdir -p xbmc/obj

PARSE ERROR:
unsupported class file version 52.0
...while parsing org/xbmc/kodi/Main.class

PARSE ERROR:
unsupported class file version 52.0
...while parsing org/xbmc/kodi/Main$1.class

PARSE ERROR:
unsupported class file version 52.0
...while parsing org/xbmc/kodi/Main$2.class

PARSE ERROR:
unsupported class file version 52.0
...while parsing org/xbmc/kodi/Main$3.class

PARSE ERROR:
unsupported class file version 52.0
...while parsing org/xbmc/kodi/Main$3$1.class

PARSE ERROR:
unsupported class file version 52.0
...while parsing org/xbmc/kodi/Main$4.class

PARSE ERROR:
unsupported class file version 52.0
...while parsing org/xbmc/kodi/R.class

PARSE ERROR:
unsupported class file version 52.0
...while parsing org/xbmc/kodi/R$attr.class

PARSE ERROR:
unsupported class file version 52.0
...while parsing org/xbmc/kodi/R$drawable.class

PARSE ERROR:
unsupported class file version 52.0
...while parsing org/xbmc/kodi/R$id.class

PARSE ERROR:
unsupported class file version 52.0
...while parsing org/xbmc/kodi/R$layout.class

PARSE ERROR:
unsupported class file version 52.0
...while parsing org/xbmc/kodi/R$raw.class

PARSE ERROR:
unsupported class file version 52.0
...while parsing org/xbmc/kodi/R$string.class

PARSE ERROR:
unsupported class file version 52.0
...while parsing org/xbmc/kodi/Splash.class

PARSE ERROR:
unsupported class file version 52.0
...while parsing org/xbmc/kodi/Splash$1.class

PARSE ERROR:
unsupported class file version 52.0
...while parsing org/xbmc/kodi/Splash$2.class

PARSE ERROR:
unsupported class file version 52.0
...while parsing org/xbmc/kodi/Splash$DownloadObb.class

PARSE ERROR:
unsupported class file version 52.0
...while parsing org/xbmc/kodi/Splash$FillCache.class

PARSE ERROR:
unsupported class file version 52.0
...while parsing org/xbmc/kodi/Splash$StateMachine.class

PARSE ERROR:
unsupported class file version 52.0
...while parsing org/xbmc/kodi/XBMCBroadcastReceiver.class

PARSE ERROR:
unsupported class file version 52.0
...while parsing org/xbmc/kodi/XBMCInputDeviceListener.class

PARSE ERROR:
unsupported class file version 52.0
...while parsing org/xbmc/kodi/XBMCOnAudioFocusChangeListener.class

PARSE ERROR:
unsupported class file version 52.0
...while parsing org/xbmc/kodi/XBMCOnFrameAvailableListener.class

PARSE ERROR:
unsupported class file version 52.0
...while parsing org/xbmc/kodi/XBMCSettingsContentObserver.class

PARSE ERROR:
unsupported class file version 52.0
...while parsing org/xbmc/kodi/XBMCVideoView.class
25 errors; aborting
make[1]: *** [xbmc/classes.dex] Error 1
make[1]: Leaving directory `/home/kodidev/kodi-android/tools/android/packaging'
make: *** [apk] Error 2
though donation is not necessary but just in case you want to: Donate Here
Reply
#13
Quote:unsupported class file version 52.0

This means that Android java files where compiled with Java 8 level and they must not unless using jack that I'm sure Kodi does not support yet.

I'm not fluent with Kodi Android compilation for the moment but when using standard gradle compilation the needed part is :

Quote: compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}

From a quick git search it sounds like someone must modify

https://github.com/xbmc/xbmc/blob/master...akefile.in

And add : -source 1.6 -target 1.6 (Or -source 1.7 -target 1.7) depending on needs and targets to all javac calls.

But @Koying or @MrMC would be better to confirm this is the place java compilation takes place, and eventually propose a PR.
Reply
#14
(2016-07-16, 12:29)Tolriq Wrote:
Quote:unsupported class file version 52.0

This means that Android java files where compiled with Java 8 level and they must not unless using jack that I'm sure Kodi does not support yet.

I'm not fluent with Kodi Android compilation for the moment but when using standard gradle compilation the needed part is :

Quote: compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}

From a quick git search it sounds like someone must modify

https://github.com/xbmc/xbmc/blob/master...akefile.in

And add : -source 1.6 -target 1.6 (Or -source 1.7 -target 1.7) depending on needs and targets to all javac calls.

But @Koying or @MrMC would be better to confirm this is the place java compilation takes place, and eventually propose a PR.

thanks for your suggestion. It has gotten me further. I am able to build the apk but the apk seems a little smaller than the official kodi apk. also when I place the apk on the android device it doesn't have the right icon and I when I click on it to install I get "problem parsing the package" but at least I've gotten a little further.
though donation is not necessary but just in case you want to: Donate Here
Reply

Logout Mark Read Team Forum Stats Members Help
Another Plea for help building Kodi For android0