java.lang.NullPointerException:尝试在空对象引用上调用虚拟方法“java.lang.String android.content.Context.getPackageName()”
MainActivity(OnCreate 函数外部):
Intent intent = new Intent(MainActivity.this, DatasheetActivity.class);
显现:
<activity
android:name=".DatasheetActivity"
android:label="DatasheetActivity"
android:screenOrientation="landscape">
</activity>
<activity
android:name=".MainActivity"
android:label="MainActivity"
android:screenOrientation="landscape">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
我也尝试new Intent(this, DatasheetActivity.class)过没有效果
蝴蝶刀刀
相关分类