Search Unity

Pre-installed or System APK, Unable to find native library: main

Discussion in 'Getting Started' started by Ranjit, Oct 19, 2015.

  1. Ranjit

    Ranjit

    Joined:
    Mar 24, 2014
    Posts:
    1
    Hi,

    We are trying to make an exported apk as system app, when we are installing it as normal app, it works fine but when we try to push it in system folder it crashes with error "Unable to find native library :main"

    We have tried to manually copy the .so files to system/lib folder and giving it 644/777 permission.
    We are using UnityPlayerNativeActivity to send some instructions and get some variable values from
    UnityPlayer view. Also we have tried to load these library in code but even that does not work and these libraries are not loading.

    We added this code in UnityPlayerNativeActivity
    System.load("/system/lib/libmain.so"); // Possible preload location
    System.load("/system/lib/libmono.so");
    System.load("/system/lib/libunity.so");

    App still crashes.

    Is it even possible to make a unity app as system app?

    Thanks.