android - Null pointer excpetion on intent creation -


i've got error i've never had before : when i'm using following

intent intent = new intent().setclass(this, research.class); 

i've got nullpointerexception... research.class not null , "this" neighter... research class in different package, problematic ? different package same projet.

my stack trace :

java.lang.nullpointerexception  @ android.content.contextwrapper.getpackagename(contextwrapper.java:135)  @ android.content.componentname.<init>(componentname.java:75)   @ android.content.intent.<init>(intent.java:3491)  @ mypackage.connect.disconnect(connect.java:92), , line 92 1 posted. 

i've imported class needed intent , it's declared in manifest.xml.

try this:

intent intent = new intent(this, research.class); 

Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -