Android activity has java.lang.IllegalArgumentException: View=com.android.internal.policy.impl.PhoneWindow$DecorView Exception and get crashed -
it got below error sometime when android activity starting.
java.lang.illegalargumentexception: view=com.android.internal.policy.impl.phonewindow$decorview{16055902 v.e..... r......d 0,0-639,154} not attached window manager
this .java file step 1 : invitefriendsactivity.java public class invitefriendsactivity extends appcompatactivity implements view.onclicklistener {
@bind(r.id.btn_invite) monoserratregularbutton btninvite; @bind(r.id.ll_main) linearlayout llmain; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_invite_friends); butterknife.bind(this); btninvite.setonclicklistener(this); } }
step2 :login.java
private void loadurl(boolean istrue) { mapp = new instagramapp(this, applicationdata.client_id, applicationdata.client_secret, applicationdata.callback_url, istrue); mapp.setlistener(new instagramapp.oauthauthenticationlistener() { @override public void onsuccess() { // tvsummary.settext("connected " + mapp.getusername()); // userinfohashmap = mapp. mapp.fetchusername(handler); intent intent = new intent(loginactivity.this,invitefriendsactivity.class); startactivity(intent); finish(); } @override public void onfail(string error) { toast.maketext(loginactivity.this, error, toast.length_short) .show(); } }); }
Comments
Post a Comment