I am able to build and run samples from Github for Leia Android Media SDK,
but with my own app I get this runtime error:
I/LeiaSDK: Display SDK 7.0.20
V6 platform APIs not available.
I/LeiaSDK: V6 platform APIs not available.
V5 platform APIs not available.
V4 platform APIs not available.
V3 platform APIs not available.
V2 platform APIs not available.
We were unable to load the Leia Platform. This error is normally caused by running on a non-Leia device, or running with old (EVT0) firmware. If you feel this message is in error, please contact Leia for support
I am running on Lume-Pad so the firmware should be good.
Is there a build error? My code is all Java, no Kotlin.
Thanks for reaching out @javamind. Considering that you’re able to run the sample apps, its not an issue with your device. In order to debug, I’d like to get some more information about your Android app.
Are you using Proguard for code obfuscation? If yes, please send me your proguard-rules.pro file.
What’s the minimum SDK version and target SDK version for your app?
2020-11-28 08:48:03.996 4704-4704/? I/dymodla.r3dree: Late-enabling -Xcheck:jni
2020-11-28 08:48:04.011 4704-4704/? E/dymodla.r3dree: Unknown bits set in runtime_flags: 0x8000
2020-11-28 08:48:04.345 4704-4704/com.andymodla.r3dreel I/Perf: Connecting to perf service.
2020-11-28 08:48:04.395 4704-4704/com.andymodla.r3dreel I/LeiaSDK: Display SDK 7.0.20
2020-11-28 08:48:04.395 4704-4704/com.andymodla.r3dreel I/LeiaSDK: V6 platform APIs not available.
2020-11-28 08:48:04.395 4704-4704/com.andymodla.r3dreel I/LeiaSDK: V6 platform APIs not available.
2020-11-28 08:48:04.395 4704-4704/com.andymodla.r3dreel I/LeiaSDK: V5 platform APIs not available.
2020-11-28 08:48:04.396 4704-4704/com.andymodla.r3dreel I/LeiaSDK: V4 platform APIs not available.
2020-11-28 08:48:04.396 4704-4704/com.andymodla.r3dreel I/LeiaSDK: V3 platform APIs not available.
2020-11-28 08:48:04.396 4704-4704/com.andymodla.r3dreel I/LeiaSDK: V2 platform APIs not available.
2020-11-28 08:48:04.396 4704-4704/com.andymodla.r3dreel I/LeiaSDK: We were unable to load the Leia Platform. This error is normally caused by running on a non-Leia device, or running with old (EVT0) firmware. If you feel this message is in error, please contact Leia for support
2020-11-28 08:48:04.396 4704-4704/com.andymodla.r3dreel D/AndroidRuntime: Shutting down VM
2020-11-28 08:48:04.397 4704-4704/com.andymodla.r3dreel E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.andymodla.r3dreel, PID: 4704
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.andymodla.r3dreel/com.andymodla.r3dreel.MainActivity}: java.lang.NullPointerException: Attempt to invoke interface method 'void com.leiainc.androidsdk.display.LeiaDisplayManager.requestBacklightMode(com.leiainc.androidsdk.display.LeiaDisplayManager$BacklightMode)' on a null object reference
My code only runs when I comment out these last two lines in onCreate, of course it does not try to use Leia Media SDK then.
Do I need any developer out of ordinary USB debugging settings?
Hi @javamind! I agree with @clintonpinto that this sounds likely to be a proguard issue. Would it be possible to share your APK? (We can decompile it and confirm whether or not the issue is proguard). Would it be possible to see your build.gradle? (or at least the proguard configuration part?)
Turns out it was not a proguard issue (the file had only comments).
After trying different changes I found the app worked as coded when I changed my AndroidManifest.xml file from:
Don’t know why the replace in the manifest upset run time library. It turns out, I did not need a replace node after all because only one app flavor existed after revising my code to use Android Media SDK.
Thanks for your help with this, problem resolved.
Note: Replying by email to the Forum is at risk for losing content.
Ah, this makes sense. tools:node="replace" is probably removing the manifest tag that our SDK uses to identify your app as Leia-compatible. Thank you for your feedback!
My old days as visual basic .net programmer are far, far away. I can’t even run a simple Hello World with Kotlin/IntelliJs. Seems I need to select a module for run as Android App, but the dropdown box is empty.
Also I don’t know how to incorporate Leia Android Media SDK to the code.
I only wanted to do a simple 3D YouTube App for playing SBS videos.
If there’s anyone experimenting with Leia Media SDK I think the most important App can do is this: Please somebody use this code to make 3D YouTube
(I will pay for the App or even a subscription for more features)