Announcement

Collapse
No announcement yet.

Android plugin works on Launch to device, but not once packaged.

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Android plugin works on Launch to device, but not once packaged.

    I've been using the screenshot sharing plugin from https://forums.unrealengine.com/show...book-Everyplay
    and it was working until recently, it just stopped.

    After tinkering around a bit I found that the plugin works using Launch to device(my phone), but won't once I package it into an APK and push to my device.

    I'm finding that the java side of the code isn't being called. I was able to determine this successfully by adding logcat debug text which appears when using Launch but not once compiled.

    What may be the cause of this?

  • replied
    As stated a couple times in this thread, it was an issue with proguard.

    Leave a comment:


  • replied
    Just add:

    Code:
    -keepclassmembers public class com.epicgames.ue4.GameActivity {
        *;
    	}
    at proguard additions in the APL file.

    I will update https://github.com/PandoraEntertainment/Sharing plugin, probably tomorrow.

    Leave a comment:


  • replied
    The Proguard issue is almost always an issue if you are trying shipping/distribution packaging. You can add to the Proguard rules in UPL (proguardAdditions section).

    I agree adding logging is the best way to track down the issue if this isn't the case. You can also look in the generated code in Intermediate/Android/APK/src and see exactly what was compiled.

    Leave a comment:


  • replied
    Some checklist tasks that have helped me track down this sort of issue before...

    - Any warnings/errors shown while packaging? What are they?
    - Have you tried launching/building in both development and shipping configurations? And with distribution flag set? Proguard will only run when distribution flag is set in packaging settings and often reveals a bunch of issues to run through
    - Are you making JNI calls from the engine? Add log statements that get removed for shipping builds within the C++ code as well as in the Java code you can then verify in Logcat on which end things are failing?
    - Are you making JNI calls from Java to engine? Same as previous.

    You may have tried some of these already but wanted to list as these things have worked for me in the past.

    Leave a comment:

Working...
X