Error System.DllNotFoundException on Android

Options
04-15 23:22:04.251: E/Unity(17580): Connect() failed: System.DllNotFoundException: /data/app-lib/com.test.photontest-1/libPhotonSocketPlugin.so
04-15 23:22:04.251: E/Unity(17580): at (wrapper managed-to-native) ExitGames.Client.Photon.SocketUdpNativeDynamic:egconnect (string)
04-15 23:22:04.251: E/Unity(17580): at ExitGames.Client.Photon.SocketUdpNativeDynamic.DnsAndConnect () [0x00000] in <filename unknown>:0
04-15 23:22:04.251: E/Unity(17580):
04-15 23:22:04.251: E/Unity(17580): (Filename: ./artifacts/AndroidManagedGenerated/UnityEngineDebug.cpp Line: 56)
04-15 23:22:04.281: E/Unity(17580): Cause: ExceptionOnConnect
04-15 23:22:04.281: E/Unity(17580):
04-15 23:22:04.281: E/Unity(17580): (Filename: ./artifacts/AndroidManagedGenerated/UnityEngineDebug.cpp Line: 56)
04-15 23:22:04.291: D/dalvikvm(17580): Trying to load lib /data/app-lib/com.test.photontest-1/libPhotonSocketPlugin.so 0x437d59c0
04-15 23:22:04.291: W/dalvikvm(17580): Shared lib '/data/app-lib/com.test.photontest-1/libPhotonSocketPlugin.so' already opened by CL 0x0; can't open in 0x437d59c0
04-15 23:22:04.291: D/dalvikvm(17580): Trying to load lib /data/app-lib/com.test.photontest-1/libPhotonSocketPlugin.so 0x437d59c0
04-15 23:22:04.291: W/dalvikvm(17580): Shared lib '/data/app-lib/com.test.photontest-1/libPhotonSocketPlugin.so' already opened by CL 0x0; can't open in 0x437d59c0
04-15 23:22:04.291: E/Unity(17580): Unable to find PhotonSocketPlugin
I got this error today when running my game on Android. I've never got this error and the game run perfectly on Android before now it's still running in editor but not on Android build. I also created a new blank project and import PUN+ demo, build to Android and it's still not working (it's working in editor). I suspect it's because I updated PUN+ to 1.51 or Unity to 4.6 (I'm used to use 4.5) or both reason.

Any idea how to fix this?

Comments

  • vadim
    Options
    Check if Assets\Plugins\Android\libPhotonSocketPlugin.so file exists. Try to reinstall PUN+ if not.
    What is set in android player settings/device filter?
  • no1no
    Options
    libPhotonScoketPlugin.so exist. I reinstalled PUN+. And like I said above I created a new blank project, import PUN+ and run the demo which have the same problem. Here is the setting of the demo:
    I'm running the demo on ASUS Zenphone 5 which is using an Intel Atom CPU.

    Edit: The demo is running fine on Google Nexus 7.

    Edit 2: I also suspect it has something to do with the Android SDK Build-tools version, I was using 19.0.3 until recently when Unity keep telling me I'm using outdated build tools so I updated it to 22.0.1

    Edit 3: so I reinstall Unity 4.5.5 and try to build the demo again and... it worked :/
    Here is the setting (it's the default setting, I didn't touch anything):

    Notice Device FIlter is set to ARMv 7? I rebuild the project in Unity 4.6.4f1 again with this setting and the game couldn't even started.
  • vadim
    Options
    We do not have android x86 support yet in PUN+. To be released soon.

    You can try beta-version of x86 lib by copying files into existing PUN+ installation from archive https://dl.dropboxusercontent.com/u/429 ... oidx86.zip
    Check info.txt for exact file locations.
  • no1no
    Options
    Yes, it's finally working, thank you very much :)
    I don't understand why it's working with 4.5 ARMv7 and not working with 4.6 ARMv7 though.
  • Its really working i like that thanks for the sharing this with us keep it up....:)
  • vadim
    Options
    Starting from v 4.6 Unity supports android x86 platform.
    Files in archive are useful only for Unity with such support (in case you need x86).