0

I have to develop one BBC_NEWS_READER android application from here

The app is force closed while run the application also gave me following error. The error is :

       E/WindowManager(17630): Activity com.digitallizard.bbcnewsreader.ReaderActivity 
      has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView@4a4dc
       760 that was originally added here

        E/WindowManager(17630): android.view.WindowLeaked: Activity 
        com.digitallizard.bbcnewsreader.ReaderActivity has leaked window
        com.android.internal.policy.impl.PhoneWindow$DecorView@4a4dc760 that was originally 
        added here
            at android.view.ViewRoot.<init>(ViewRoot.java:247)

        E/WindowManager(17630):     at android.app.Dialog.show(Dialog.java:241)
         com.digitallizard.bbcnewsreader.Eula.show(Eula.java:87)

         E/WindowManager(17630):    at 
         com.digitallizard.bbcnewsreader.ReaderActivity.onCreate(ReaderActivity.java:444)

How can i resolve these error??? please help me.i have used same code as that github project.

Lazy Badger
  • 94,711
  • 9
  • 78
  • 110
android
  • 33
  • 3
  • 12
  • move `Eula.show(this);` line after `this.setContentView(R.layout.reader_activity);` then try to run – ρяσѕρєя K Feb 08 '13 at 05:32
  • Hi now also am getting same error :02-08 11:26:13.615: E/WindowManager(19151): at com.digitallizard.bbcnewsreader.Eula.show(Eula.java:87) 02-08 11:26:13.615: E/WindowManager(19151): at com.digitallizard.bbcnewsreader.ReaderActivity.onCreate(ReaderActivity.java:466) – android Feb 08 '13 at 05:56

1 Answers1

0

Just add the Eula.show(this); line after setting the content view as below:

 this.setContentView(R.layout.reader_activity);
    Eula.show(this); // show the eula
GrIsHu
  • 29,068
  • 10
  • 64
  • 102
  • Hi after i have moved the line i got the following error on my console window:http://pastie.org/private/d9l5f9lc97agtkjfzuseuq please check it – android Feb 08 '13 at 06:05
  • Change the `onResume` code by `this.getSupportActionBar().setTitle(text);` and try out . – GrIsHu Feb 08 '13 at 06:24
  • what is the meaing for these line: builder.create().show(); on Eula.java here ly i have faced problem – android Feb 08 '13 at 06:35
  • `obj.create()`-For create Dialog `obj.show()`-For show Dialog <- without it you cant show dialog if you created. and `obj.create().show()`-create and show Dialog i mean both same as above two in one statement. – GrIsHu Feb 08 '13 at 06:55
  • yes ...here i have to create the builder.create();builder.show(); means am getting the error on builer.show(); line.why am getting these error ??? – android Feb 08 '13 at 07:02