0

Who can tell what is wrong with my test project where I am trying to use native C++ code in unity from .so files generated from Android Studio?

Link for unity project: https://github.com/Sv9zIsT/UnityTest/blob/master/C%2B%2BTEST.rar

Link for Android Studio project: https://github.com/Sv9zIsT/UnityTest/blob/master/CTestUnityPackage.rar

I did all recommendations from unity docs: https://docs.unity3d.com/Manual/AndroidNativePlugins.html

I tried example from unity docs above.

Always result is DllNotFoundException and it appears when I call the any function from the .so first time in C# class like:

[DllImport("unityTest")]
private static extern int PrintANumber();

void Start()
{
    String str = "";
    str += "PrintANumber() " + PrintANumber() + "\n";

...

I have put the plugins into Assets/Plugins/Android/armeabi-v7a/ and Assets/Plugins/Android/x86/ respectively.

Test in several unity's editor versions - it isn't influenced.

What I've done wrong guys?

Stéphane Gourichon
  • 6,493
  • 4
  • 37
  • 48

0 Answers0