Unable to start activity ComponentInfo and GC_FOR_ALLOC Errors on Different Devices Android -


i can see 1 problem in computer when start , complete android project. friend see diffrent problems when starts same project in computer , phone. these our logcat reports. problem, please help, thank you.

my logcat report :

05-19 19:20:22.564: d/dalvikvm(949): gc_for_alloc freed 1022k, 32% free 3626k/5324k, paused 233ms, total 273ms  05-19 19:20:22.564: i/dalvikvm-heap(949): grow heap (frag case) 4.596mb 960016-byte allocation  05-19 19:20:22.853: d/dalvikvm(949): gc_concurrent freed 7k, 15% free 4556k/5324k, paused 5ms+6ms, total 247ms  05-19 19:21:25.005: d/dalvikvm(949): gc_concurrent freed 1033k, 23% free 4147k/5356k, paused 77ms+7ms, total 153ms  05-19 19:21:25.005: d/dalvikvm(949): wait_for_concurrent_gc blocked 44ms  05-19 19:21:25.044: i/dalvikvm-heap(949): grow heap (frag case) 5.143mb 1000016-byte allocation  05-19 19:21:25.295: d/dalvikvm(949): gc_concurrent freed 1499k, 43% free 3623k/6336k, paused 81ms+104ms, total 257ms  05-19 19:21:25.415: d/dalvikvm(949): gc_for_alloc freed <1k, 43% free 3623k/6336k, paused 34ms, total 34ms  05-19 19:21:25.424: i/dalvikvm-heap(949): grow heap (frag case) 4.632mb 1000016-byte allocation  05-19 19:21:25.534: d/dalvikvm(949): gc_concurrent freed 0k, 28% free 4600k/6336k, paused 75ms+6ms, total 108ms  05-19 19:21:25.534: d/dalvikvm(949): wait_for_concurrent_gc blocked 21ms  05-19 19:21:25.574: e/savetoexternalstorage()(949): open failed: eacces (permission denied)  05-19 19:21:25.574: i/choreographer(949): skipped 223 frames!  application may doing work on main thread. 

other devices' logcat reports :

emulator logcat report :

05-19 18:41:08.442: e/androidruntime(798): fatal exception: main 05-19 18:41:08.442: e/androidruntime(798): java.lang.runtimeexception: unable start activity componentinfo{com.example.yoritgenerator/com.example.yoritgenerator.qrhandler}: java.lang.nullpointerexception 05-19 18:41:08.442: e/androidruntime(798):  @ android.app.activitythread.performlaunchactivity(activitythread.java:2180) 05-19 18:41:08.442: e/androidruntime(798):  @ android.app.activitythread.handlelaunchactivity(activitythread.java:2230) 05-19 18:41:08.442: e/androidruntime(798):  @ android.app.activitythread.access$600(activitythread.java:141) 05-19 18:41:08.442: e/androidruntime(798):  @ android.app.activitythread$h.handlemessage(activitythread.java:1234) 05-19 18:41:08.442: e/androidruntime(798):  @ android.os.handler.dispatchmessage(handler.java:99) 05-19 18:41:08.442: e/androidruntime(798):  @ android.os.looper.loop(looper.java:137) 05-19 18:41:08.442: e/androidruntime(798):  @ android.app.activitythread.main(activitythread.java:5039) 05-19 18:41:08.442: e/androidruntime(798):  @ java.lang.reflect.method.invokenative(native method) 05-19 18:41:08.442: e/androidruntime(798):  @ java.lang.reflect.method.invoke(method.java:511) 05-19 18:41:08.442: e/androidruntime(798):  @ com.android.internal.os.zygoteinit$methodandargscaller.run(zygoteinit.java:793) 05-19 18:41:08.442: e/androidruntime(798):  @ com.android.internal.os.zygoteinit.main(zygoteinit.java:560) 05-19 18:41:08.442: e/androidruntime(798):  @ dalvik.system.nativestart.main(native method) 05-19 18:41:08.442: e/androidruntime(798): caused by: java.lang.nullpointerexception 05-19 18:41:08.442: e/androidruntime(798):  @ com.example.yoritgenerator.qrhandler.oncreate(qrhandler.java:24) 05-19 18:41:08.442: e/androidruntime(798):  @ android.app.activity.performcreate(activity.java:5104) 05-19 18:41:08.442: e/androidruntime(798):  @ android.app.instrumentation.callactivityoncreate(instrumentation.java:1080) 05-19 18:41:08.442: e/androidruntime(798):  @ android.app.activitythread.performlaunchactivity(activitythread.java:2144) 05-19 18:41:08.442: e/androidruntime(798):  ... 11 more 

phone logcat report :

05-19 21:47:09.701: w/dalvikvm(17334): threadid=1: thread exiting uncaught exception (group=0x40f672a0) 05-19 21:47:09.706: e/androidruntime(17334): fatal exception: main 05-19 21:47:09.706: e/androidruntime(17334): java.lang.runtimeexception: unable start activity componentinfo{com.example.yoritgenerator/com.example.yoritgenerator.qrhandler}: java.lang.nullpointerexception 05-19 21:47:09.706: e/androidruntime(17334):    @ android.app.activitythread.performlaunchactivity(activitythread.java:2110) 05-19 21:47:09.706: e/androidruntime(17334):    @ android.app.activitythread.handlelaunchactivity(activitythread.java:2135) 05-19 21:47:09.706: e/androidruntime(17334):    @ android.app.activitythread.access$700(activitythread.java:140) 05-19 21:47:09.706: e/androidruntime(17334):    @ android.app.activitythread$h.handlemessage(activitythread.java:1237) 05-19 21:47:09.706: e/androidruntime(17334):    @ android.os.handler.dispatchmessage(handler.java:99) 05-19 21:47:09.706: e/androidruntime(17334):    @ android.os.looper.loop(looper.java:137) 05-19 21:47:09.706: e/androidruntime(17334):    @ android.app.activitythread.main(activitythread.java:4921) 05-19 21:47:09.706: e/androidruntime(17334):    @ java.lang.reflect.method.invokenative(native method) 05-19 21:47:09.706: e/androidruntime(17334):    @ java.lang.reflect.method.invoke(method.java:511) 05-19 21:47:09.706: e/androidruntime(17334):    @ com.android.internal.os.zygoteinit$methodandargscaller.run(zygoteinit.java:1027) 05-19 21:47:09.706: e/androidruntime(17334):    @ com.android.internal.os.zygoteinit.main(zygoteinit.java:794) 05-19 21:47:09.706: e/androidruntime(17334):    @ dalvik.system.nativestart.main(native method) 05-19 21:47:09.706: e/androidruntime(17334): caused by: java.lang.nullpointerexception 05-19 21:47:09.706: e/androidruntime(17334):    @ com.example.yoritgenerator.qrhandler.oncreate(qrhandler.java:24) 05-19 21:47:09.706: e/androidruntime(17334):    @ android.app.activity.performcreate(activity.java:5206) 05-19 21:47:09.706: e/androidruntime(17334):    @ android.app.instrumentation.callactivityoncreate(instrumentation.java:1094) 05-19 21:47:09.706: e/androidruntime(17334):    @ android.app.activitythread.performlaunchactivity(activitythread.java:2074) 05-19 21:47:09.706: e/androidruntime(17334):    ... 11 more 

our code :

submitbutton.setonclicklistener(new onclicklistener()     {          @override         public void onclick(view v)         {                        if( userpassword.gettext().tostring().equals(loginpassword) )             {                 if( loginpassword.equals( defaultpassword ) )                 {                     toast.maketext(login.this, "do not forget change default password!!!", toast.length_short).show();                     //changepassword();                      if(!iscreate){                         //createmenu();                          intent qrcodegenerate = new intent( "com.example.yoritgenerator.qrhandler" );                             startactivity( qrcodegenerate );                     } 

qrhandler class:

package com.example....  import com.google.zxing.barcodeformat; import com.google.zxing.writerexception;  import android.app.activity; import android.graphics.bitmap; import android.os.bundle; import android.view.view; import android.view.view.onclicklistener; import android.widget.button; import android.widget.edittext; import android.widget.imageview;  public class qrhandler extends activity {       @override         protected void oncreate(bundle savedinstancestate) {             super.oncreate(savedinstancestate);             setcontentview(r.layout.activity_main);              final edittext qrmessage = (edittext)findviewbyid(r.id.qrtext);             final button convertbutton = (button)findviewbyid(r.id.generate);             convertbutton.setonclicklistener(new onclicklistener()             {                  @override                 public void onclick(view v)                 {                       setcontentview(r.layout.qr_image);                      imageview imageview = (imageview) findviewbyid(r.id.qr_image);                      string qrdata = qrmessage.gettext().tostring();                      int qrcodedimention = 500;                       generator qrcodeencoder = new generator(qrdata, null, contents.type.text, barcodeformat.qr_code.tostring(), qrcodedimention);                        try                       {                           bitmap bitmap = qrcodeencoder.encodeasbitmap();                           imageview.setimagebitmap(bitmap);                       }                        catch (writerexception e)                       {                             e.printstacktrace();                       }                  }             });                 } } 


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -