Need help with android native plugin

I learn to build some native plugin and here is my Java class

package com.nct.nplay.androidutilities;

/**
* Created by locnv on 10/20/2015.
*/
public class AndroidBrigde {

    public String ReturnString(){
        return "abc";
    }

    public int ReturnInt(){
        return 5;
    }

    public static String ReturnStaticString(){
        return "static abc";
    }

    public static int ReturnStaticInt(){
        return 100;
    }
}

And then I use it in my unity script

public void OnShare( ){
        AndroidJavaClass jc = new AndroidJavaClass ("com.nct.nplay.androidutilities.AndroidBrigde");

        GameService.Log (jc.CallStatic<string> ("ReturnStaticString"));
        GameService.Log (jc.CallStatic<int> ("ReturnStaticInt"));

        AndroidJavaObject jo = new AndroidJavaObject ("com.nct.nplay.androidutilities.AndroidBrigde");
        GameService.Log (jo.Call<string> ("ReturnString"));
        GameService.Log (jo.Call<int> ("ReturnInt"));
    }

But when I use ABD to deploy it into my device it has this error message

2346255--158783--error_1.PNG

If I removed this line

AndroidJavaObject jo = new AndroidJavaObject (“com.nct.nplay.androidutilities.AndroidBrigde”);
GameService.Log (jo.Call (“ReturnString”));
GameService.Log (jo.Call (“ReturnInt”));

then it working fine ?

So how can I call an non-static function in Unity , and why I got this error message , and also is there any good tutorial about Android plugin out there ?

Thanks. :slight_smile:

P/S : sorry for my bad english and also I’m just started to learn Android though :frowning:

Its cause of android studio bug or something T_T

More info here : android - Unable to test app after upgrading to Lollipop - Stack Overflow

Your code looks OK, i don’t think the issue is related to that.

Is this error displayed when you install your APK or when you actually run it ?