Note that there are some explanatory texts on larger screens.

plurals
  1. POsystem.entrypointnotfoundexception in <Filename unknown> in Unity3d
    primarykey
    data
    text
    <p>I am trying to call a simple native function (C++) from Unity3D. I have done the following:</p> <ol> <li><p>Placed the <code>libMSDKWrapper.so</code> in Assets->Plugins->Android</p></li> <li><p>This is my C# code</p> <pre><code>using UnityEngine; using System.Collections; using System.Runtime.InteropServices; public class facebooktest : MonoBehaviour { [DllImport ("MSDKWrapper")] private static extern long getContextNative(); void Start () { Debug.Log("Hello, World!"); long context = getContextNative(); // &lt;-- Exception thrown here Debug.Log(context); } } </code></pre></li> </ol> <p>I am getting the following exception:</p> <blockquote> <p>system.entrypointnotfoundexception at [0x00000] in Filename unknown:0</p> </blockquote> <p>I used the same libMSDKWrapper.so using java using the command</p> <blockquote> <p>System.loadLibrary("MSDKWrapper");</p> </blockquote> <p>and I was able to access and use the getContextNative() method. </p> <p>Edit 1: I unzipped the contents of the apk and found that libMSDKWrapper.so file is present in test.apk/lib/armeabi-v7a</p> <p>Edit 2: Here are the logcat logs. 03-25 11:40:17.543: D/dalvikvm(26176): Trying to load lib /data/data/com.disney.citygirl.goo/lib/libMSDKWrapper.so 0x41566348 03-25 11:40:17.568: D/MSDK(26176): Register Provider: SN_COMMUNITY 03-25 11:40:17.568: D/MSDK(26176): Register Provider: SN_FACEBOOK 03-25 11:40:17.568: D/dalvikvm(26176): Added shared lib /data/data/com.disney.citygirl.goo/lib/libMSDKWrapper.so 0x41566348 03-25 11:40:17.568: I/MSDK(26176): JNI_OnLoad called 03-25 11:40:17.573: D/dalvikvm(26176): Trying to load lib /data/data/com.disney.citygirl.goo/lib/libMSDKWrapper.so 0x41566348 03-25 11:40:17.573: D/dalvikvm(26176): Shared lib '/data/data/com.disney.citygirl.goo/lib/libMSDKWrapper.so' already loaded in same CL 0x41566348 03-25 11:40:17.598: I/Unity(26176): System.EntryPointNotFoundException: getContextNative 03-25 11:40:17.598: I/Unity(26176): at (wrapper managed-to-native) SocialAccess:getContextNative () 03-25 11:40:17.598: I/Unity(26176): at SocialAccess.OnClick () [0x00000] in :0 03-25 11:40:17.598: I/Unity(26176):<br> 03-25 11:40:17.598: I/Unity(26176): (Filename: ./Runtime/ExportGenerated/AndroidManaged/UnityEngineDebug.cpp Line: 43)</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload