Using Droid-fu

by Marco Rodriguez-Suarez » Tue, 08 Mar 2011 05:38:49 GMT


Sponsored Links
 Hello everyone,
                       I'm trying to use the droid-fu libraries in my
project but I guess I have no idea what I am doing. I plan on using
BetterAsyncTask to send a couple of images to a server and then have
the program return a response. The problem I am having is after I add
the droid-fu .jar file into my build path. I then try to extend my
main activity as follows

import com.github.droidfu.activities.BetterDefaultActivity;

        public class MainActivity extends BetterDefaultActivity {
        /** Called when the activity is first created. */
        @Override
        protected void onCreate(Bundle savedInstanceState) {
                super.onCreate(savedInstanceState);
                setContentView(R.layout.main);

}
}


Before I even add any code to my project the program crashes if I try
to run it. I get the following exception:


03-02 20:43:47.784: ERROR/AndroidRuntime(3238):
java.lang.RuntimeException: Unable to start activity
ComponentInfo{com.marco.servertest/com.marco.servertest.MainActivity}:
java.lang.ClassCastException: android.app.Application

Any help would really be appreciated! I am about ready to give up on
the droid-fu libraries and just use the regular AsyncTask . Do I need
to add anything to my manifest file??

-- 



Re: Using Droid-fu

by TreKing » Tue, 08 Mar 2011 22:28:05 GMT


 On Wed, Mar 2, 2011 at 10:55 PM, Marco Rodriguez-Suarez




Does this library not have a dedicated site / forum? That would be a more
appropriate place for such a question.



Always include the names of Services, Activities, Application, etc, sub
classes.

Your error, in particular, indicates a problem with the app's Application
class.

-------------------------------------------------------------------------------------------------
TreKing < http://sites.google.com/site/rezmobileapps/treking> ; - Chicago
transit tracking app for Android-powered devices

-- 


Sponsored Links


Re: Using Droid-fu

by Sandeep sp » Mon, 25 Apr 2011 20:14:37 GMT


 Hi Mr Marco,

      Did you able to resolve the crash? I Am also facing the same
issue, please let me know. What needs to be done to resolve this
issue?

Regards
Sandeep S.P






-- 



Other Threads

1. How do I delete unwanted downloads and download history

I would like to delete not only the unwanted downloads but the
downloaded history. Who do I do that?

--~--~---------~--~----~------------~-------~--~----~

2. More than one EditText - not getting focus, no soft keyboard?

Hi all,

I'm pretty new to Android development, enjoying it a lot so far, but
I've hit my first stumbling block for which I couldn't find an answer
in the documentation or online.

The home screen of my application has three EditText views, meant to
be used as three different search functions, each with a "Search"
button.

The app works perfectly on the device (G1) when using the trackball:
I can move between the EditTexts with the trackball, all the events
fire as expected, I can enter text using the physical keyboard in the
selected EditText, Enter correctly submits the proper search, etc.
etc.

However, I can't switch between the EditText views using touches -
only by using the trackball.  Touches seem to be completely ignored by
the EditText.  Touches do fire for the buttons, but very hard - takes
a lot of tries to make a touch register.

In the simulator, clicking on any EditText does nothing - the first
one always remains selected, and I never get a soft keyboard.

This is all inside a TabHost - I've read there are some problems with
that configuration, but it sounds like a slightly different issue (the
EditText doesn't seem to lose focus - everything works perfectly with
the trackball).

Any suggestions for what I can check?

Thanks,

Alex

--~--~---------~--~----~------------~-------~--~----~

3. Javascript document.cookie in Android ?

4. Any email confirmation after submit the application for ADC 2?

5. Mediaplay Problem

6. Request for Joinning the group

7. Displaying Bitmap from PictureCallback works on emulator but not on G1