我创建了一个虚拟活动,我正在尝试深层链接我的虚拟活动,
我的清单
<activity android:name="com.eminosoft.ebookread.activity.DummyActivity"
android:screenOrientation="portrait"
android:theme="@style/Theme.AppCompat"
android:windowSoftInputMode="adjustPan">
<intent-filter >
<action android:name="android.intent.action.VIEW"></action>
<category android:name="android.intent.category.DEFAULT"></category>
<category android:name="android.intent.category.BROWSABLE"></category>
<data android:host="dashboard" android:scheme="wowioapp"></data>
</intent-filter>
</activity>/>
我的DummyActivity
public class DummyActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.dummy_activity);
Button btnSplashScreen=(Button)findViewById(R.id.btn_goSplashScreen);
btnSplashScreen.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent=new Intent(DummyActivity.this,SplashScreenActivity.class);
startActivity(intent);
}
});
}
}
但我在oncreate上遇到以下错误
12-19 12:52:48.061 7239-7239/com.wowio.ebookreader E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.wowio.ebookreader, PID: 7239
java.lang.VerifyError: android/support/v7/app/AppCompatDelegateImplV9
at android.support.v7.app.AppCompatDelegate.create(AppCompatDelegate.java:205)
at android.support.v7.app.AppCompatDelegate.create(AppCompatDelegate.java:185)
at android.support.v7.app.AppCompatActivity.getDelegate(AppCompatActivity.java:525)
at android.support.v7.app.AppCompatActivity.onCreate(AppCompatActivity.java:74)
at com.eminosoft.ebookread.activity.DummyActivity.onCreate(DummyActivity.java:20)
at android.app.Activity.performCreate(Activity.java:5343)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1088)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2331)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2429)
at android.app.ActivityThread.access$800(ActivityThread.java:151)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1342)
at android.os.Handler.dispatchMessage(Handler.java:110)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:5363)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:828)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:644)
at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:126)
at dalvik.system.NativeStart.main(Native Method)
但如果我使用活动而不是 AppCompactActivity 扩展我的dummyActivity,它的工作正常,为什么AppCompactActivity会出现此错误?
谢谢