Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Android

ms2030
ms2030
2,973 Points

App name

Running from emulator or my phone, the name in the application list is "MainActivity" instead of what I defined as the app_name. [From my phone it does use app_name in the Manage Apps list]

AndroidManifest.xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="self.mfs.crystalballbutton"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk
        android:minSdkVersion="7"
        android:targetSdkVersion="15" />

    <application
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name="self.mfs.crystalballbutton.CrystalBallButton"
            android:label="@string/title_activity_main" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

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

</manifest>

2 Answers

ms2030
ms2030
2,973 Points

I think I figured it out. under activity above, it has the line: android:label="@string/title_activity_main"

title_activity_main is defined as "MainActivity". I don't understand why. Somehow when I changed the definition of that string it messed everything up - probably a coincidence but it's frustrating.

Thanks for posting how you fixed it :) I appreciate it!!

ms2030
ms2030
2,973 Points

Since I'm just playing with the treehouse code, to fix my bigger errors, I just deleted the project and re-imported it from treehouse. Thanks for the project downloads. I'd be lost without them.

My eventual fix was to delete the line: android:label="@string/title_activity_main"