2

When i try in a blank delphi project to add this library :

https://bintray.com/google/webrtc/download_file?file_path=org%2Fwebrtc%2Fgoogle-webrtc%2F1.0.25331%2Fgoogle-webrtc-1.0.25331.aar

Then, when i compile the app and when delphi execute

"C:\SDKs\android-sdk-windows\build-tools\28.0.3\dx.bat" --dex --output="C:\FmxLiveChatVideo_source\Android\Debug\libwebrtc-dexed.jar" "C:\lib\jar\org.webrtc\libwebrtc.jar"

I receive this error

Uncaught translation error: com.android.dx.cf.code.SimException: ERROR in org.webrtc.Camera1Session.listenForTextureFrames:()V: invalid opcode ba - invokedynamic requires --min-sdk-version >= 26 (currently 13)

Outside delphi, from the command line, if i add --min-sdk-version=26 to the line

"C:\SDKs\android-sdk-windows\build-tools\28.0.3\dx.bat" --dex --output="C:\FmxLiveChatVideo_source\Android\Debug\libwebrtc-dexed.jar" "C:\lib\jar\org.webrtc\libwebrtc.jar"

then it's compile BUT now of course i can not deploy anymore the app to target lower than api 26 :(

As I understand, it's connected to the java version. Android in the past only supported Java code up to version 1.7 and seam we need 1.8. No idea what i can do :(

zeus
  • 12,173
  • 9
  • 63
  • 184
  • The Android manifest for the WebRTC aar file says: `` – Brian Oct 31 '18 at 17:14
  • @Brian ... yes minSdkVersion="16" it's OK, then i don't understand why I receive requires --min-sdk-version >= 26 – zeus Oct 31 '18 at 19:45
  • There may be something that helps over here: https://stackoverflow.com/questions/54589632/xamarin-android-binding-invalid-opcode - it's pretty much the same error. I haven't used Delphi in years, but the solution involves tweaking the build config to get the Android-delegated build aspect to play ball with Java v7 vs v8. It may be possible to port that solution to yours? – wislon Jun 28 '19 at 02:11

0 Answers0