Reputation: 2190
I have dowloaded an android app source code, and this is the only activity:
package net.itskewpie.freerdp;
import android.app.Activity;
import android.os.Bundle;
public class FreeRDPActivity extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
System.out.println("111111111111111111111");
String b = test();
System.out.println(b);
}
static{
System.loadLibrary("freerdp");
}
public native String test();
}
when I try to run it I get this:
08-13 14:15:34.307: W/dalvikvm(335): Exception Ljava/lang/UnsatisfiedLinkError; thrown while initializing Lnet/itskewpie/freerdp/FreeRDPActivity;
08-13 14:15:34.317: W/dalvikvm(335): Class init failed in newInstance call (Lnet/itskewpie/freerdp/FreeRDPActivity;)
08-13 14:15:34.317: D/AndroidRuntime(335): Shutting down VM
08-13 14:15:34.317: W/dalvikvm(335): threadid=1: thread exiting with uncaught exception (group=0x40015560)
08-13 14:15:34.357: E/AndroidRuntime(335): FATAL EXCEPTION: main
....
What's the problem?
Upvotes: 1
Views: 6230
Reputation: 718708
The exception ExceptionInInitializerError
is a fatal error that is thrown when an unchecked exception is thrown (and not caught) during static initialization of a class.
The stacktrace indicates that the exception that is being thrown is UnsatisfiedLinkError
. This is most likely being thrown because:
freerdp
, or native
method declaration FreeRDPActivity.text()
.Upvotes: 3