targetting Java 8

135 views
Skip to first unread message

Dean Wild

unread,
May 14, 2018, 8:25:40 AM5/14/18
to discuss-webrtc
What exactly determines the target java version when building the libjingle JAR files?

I am able to build successfully but my resulting JAR files have .class files with a bytecode version of 51.0 (Java 7) and so certain Java 8 only items are not incluided in the JAR file. (such as the EglBase.create() static interface method).

I'm building branch 66 (same happens on latest master too), I have Java 1.8 JDK installed, is there something in a build config file I need to check to ensure the target is java 8?

Any help much appreciated.

Sami Kalliomäki

unread,
May 14, 2018, 8:57:10 AM5/14/18
to discuss-webrtc
out/Debug/lib.java/sdk/android/libwebrtc.jar contains all the unprocessed code.

--

---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/4a4fcfae-0e89-448c-90f4-f6b1634397ea%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Message has been deleted

Dean Wild

unread,
May 16, 2018, 7:05:04 AM5/16/18
to discuss-webrtc
I managed to resolve this by using the .aar generation script (src/tools_webrtc/android/build_aar.py).

Previously I was using the instructions on https://webrtc.org/native-code/android/ and also attempted using the scripts provided by https://github.com/pristineio/webrtc-build-scripts which have always worked fine in the past. I'm not sure why building it manually this way should give different results.

The build_aar.py script is very useful but I had no idea this had been introduced way back at version 58. The official documentation for building WebRTC for Android does not mention it at all, it would probably be very useful if the documentation was updated to reflect this.
Reply all
Reply to author
Forward
0 new messages