Hi,

I have modified the code to follow but still get the force close
popup:
------------------------------
    private void bindFavorites(boolean isLaunching) {
        if (!isLaunching || mFavorites == null) {

            FileReader favReader;

            // Environment.getRootDirectory() is a fancy way of saying
ANDROID_ROOT or "/system".
            final File favFile = new File(Environment.getRootDirectory
(), DEFAULT_FAVORITES_PATH);

            /* move this up before try catch */
            if (mFavorites == null) {
                mFavorites = new LinkedList<ApplicationInfo>();
            } else {
                mFavorites.clear();
            }

            try {
                favReader = new FileReader(favFile);
            } catch (FileNotFoundException e) {
                Log.e(LOG_TAG, "Couldn't find or open favorites file "
+ favFile);
                return;
            }
----------------------------------------------

Please help. Thx.

Best Wishes,
Hsin Yee

On Jun 30, 2:40 pm, Romain Guy <romain...@google.com> wrote:
> This is a known bug we fixed today actually. The next Cupcake
> SDK/Donut SDK will have a fix. The fix is actually pretty simple, open
> Home.java, and in bindFavorites(), move the if (mFavorites) block
> *before* the try/catch.
>
>
>
>
>
> On Mon, Jun 29, 2009 at 8:34 PM, bayeeblue<bayeeb...@gmail.com> wrote:
>
> > Hi,
>
> > I have successfully compile the sample code  "Home" in the SDK for
> > platform 1.5, but when I tried to run in (both in emulator and real
> > phone) , it is force close. I pressed the Home key and it prompt me to
> > select "Home", "Home Sample", I select Home Sample and the force close
> > popup is show (repeatably).
>
> > May I know anyone get the code up and run in phone or emulator ?
>
> > Thanks.
>
> > Best Wishes,
> > Bayee
>
> --
> Romain Guy
> Android framework engineer
> romain...@android.com
>
> Note: please don't send private questions to me, as I don't have time
> to provide private support.  All such questions should be posted on
> public forums, where I and others can see and answer them
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"android-framework" group.
To post to this group, send email to android-framework@googlegroups.com
To unsubscribe from this group, send email to 
android-framework+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/android-framework?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to