我正在使用Intent启动新活动。我也在我的AndroidManifest中添加了它。但是,当我单击按钮调用ContactsActivity.class
时,应用程序崩溃。
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".ContactsActivity">
</activity>
</application>
Mainactivity.class
Intent myIntent = new Intent(MainActivity.this, ContactsActivity.class);
startActivityForResult(myIntent,SECOND_ACTIVITY_RESULT_CODE);
致命异常:
2019-01-20 08:04:48.101 30203-30203/com.example.musicplayeronline E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.musicplayeronline, PID: 30203
java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.example.musicplayeronline-2/base.apk"],nativeLibraryDirectories=[/data/app/com.example.musicplayeronline-2/lib/x86_64, /system/lib64, /vendor/lib64]]] couldn't find "libnative-lib.so"
at java.lang.Runtime.loadLibrary0(Runtime.java:972)
at java.lang.System.loadLibrary(System.java:1530)
at com.example.musicplayeronline.ContactsActivity.<clinit>(ContactsActivity.java:24)
at java.lang.Class.newInstance(Native Method)
at android.app.Instrumentation.newActivity(Instrumentation.java:1078)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2538)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2707)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1460)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6077)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:756)