Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Android Build a Self-Destructing Message Android App Using Fragments for Tabs Modifying Fragments from the Template

My project is crashing and i can't figure out neither why and neither when

So i am working on the Ribbit project in android studio (eclipse was buggy already and Google updated its so the vids are little bit outdated both in eclipse and in Android studio)

After the part (episode?) of "Modifying Fragments from the Template" the project is crashing when it get to the main activity, i can remember what i did that started it so i tried to track down the error and so far this what i can say: No problem at all in LoginActivity and in SignupActivty. and i tried a little bit of debugging and i saw that the app dont crash in the onCreate function.

where should i check next ?

Git Code : https://github.com/ozadari/Ribbit

1 Answer

Hi Oz - is everything updated within the Android Manifest file? Make sure all activities related to the fragments are included in the manifest file - that may be why you are able to get to the login page and signup page, but the app crashes when it gets to the main activity.

Also I recommend using git for Version control - it can be helpful whenever you want to revert back to previous versions of the code, or compare your code at different points in time.

Hope this was helpful!

Matt

Thanks for you reply! I'm not home so I can't check this now, I looked it a bit more and its important to state that the app is no crashing but just closing, that's why there is no expetion thrown

My next course will defiantly be the git one its just that I really want to finish the ribbit app, I learn a lot in this app

"""xml <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.ozadari.ribbit" >

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

<application
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme"
    android:name = ".RibbitApplication">

    <activity
        android:name="com.ozadari.ribbit.MainActivity"
        android:label="@string/app_name"
        android:screenOrientation="portrait" >

        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>

    <activity
        android:name="com.ozadari.ribbit.LoginActivity"
        android:label="@string/title_activity_login"
        android:screenOrientation="portrait" >
    </activity>
    <activity
        android:name="com.ozadari.ribbit.SignUpActivity"
        android:label="@string/title_activity_sign_up"
        android:screenOrientation="portrait"
        android:parentActivityName=".LoginActivity">
    </activity>
</application>

</manifest>

"""

this is my manifest, i cant really say if something is wrong with it, i wirtten in all by hand.

also there is that in the logact: "05-18 18:30:06.768 6944-6944/com.ozadari.ribbit W/dalvikvm? threadid=1: thread exiting with uncaught exception (group=0x4188fce0)"