I am trying to run a simple jni code in Android, But all I am getting Unsatisfiedlinkerror .
Here is my Java code:
package com.lipcap;
import androi
This isn't really been called quite right...
Try:
package com.lipcap;
import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;
public class MainActivity extends Activity {
/** Called when the activity is first created. */
TextView a;
public native String sniff();
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
a=new TextView(this);
String b = sniff();
a.setText(b);
setContentView(a);
}
static{
System.loadLibrary("native");
}
}
Lastly... is this in your Android.mk?
LOCAL_MODULE := native