exception - Android - Unable to instantiate activity ComponentInfo -
when try run app error on logcat:
08-23 17:32:01.700: e/androidruntime(4518): fatal exception: main 08-23 17:32:01.700: e/androidruntime(4518): java.lang.runtimeexception: unable instantiate activity componentinfo{com.app.myapp/com.library.core.presentation.sessionactivity}: java.lang.nullpointerexception 08-23 17:32:01.700: e/androidruntime(4518): @ android.app.activitythread.performlaunchactivity(activitythread.java:1573) 08-23 17:32:01.700: e/androidruntime(4518): @ android.app.activitythread.handlelaunchactivity(activitythread.java:1667)
the problem appears when touch on list item, corresponding intent:
public void onitemclick(adapterview<?> adapterview, view view, int position, long id) { intent sessionintent = new intent(view.getcontext(), sessionactivity.class); //sessionintent.putextras(bundle); startactivity(sessionintent); }
sessionactivity class contained in library project have use app. manifest file this:
<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.app.myapp" android:versioncode="1" android:versionname="1.0" > <uses-sdk android:minsdkversion="8" android:targetsdkversion="10" /> <application android:allowbackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/apptheme" > <activity android:name="com.rdp.rdp_prova.mainactivity" android:label="@string/app_name" > <intent-filter> <action android:name="android.intent.action.main" /> <category android:name="android.intent.category.launcher" /> </intent-filter> </activity> <activity android:name="com.library.core.presentation.sessionactivity" /> </application> </manifest>
what's wrong?
Comments
Post a Comment