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 Build a Simple Android App (2014) Getting Started with Android Running the Fun Facts Project

lucas shaw
lucas shaw
669 Points

Install parse failed manifest malformed

Waiting for device. "/Applications/Android Studio.app/sdk/tools/emulator" -avd Android442 -netspeed full -netdelay none

Device connected: emulator-5556 Device Android442 [emulator-5556] is online, waiting for processes to start up.. Device Android442 [emulator-5556] is online, waiting for processes to start up.. Device Android442 [emulator-5556] is online, waiting for processes to start up.. Device Android442 [emulator-5556] is online, waiting for processes to start up.. Device is ready: Android442 [emulator-5556] Target device: Android442 [emulator-5556] Uploading file local path: /Users/shawbone11/AndroidStudioProjects/FunFacts/app/build/outputs/apk/app-debug.apk remote path: /data/local/tmp/Shaworks.funfacts Installing Shaworks.funfacts DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/Shaworks.funfacts" pkg: /data/local/tmp/Shaworks.funfacts Failure [INSTALL_PARSE_FAILED_MANIFEST_MALFORMED]

Hello,

This means your final AndroidManifest.xml file has an error in it. Could you post your AndroidManifest.xml file and your build.gradle files?

lucas shaw
lucas shaw
669 Points

BUILD GRADLE FILES- apply plugin: 'com.android.application'

android { compileSdkVersion 19 buildToolsVersion "20.0.0"

defaultConfig {
    applicationId "Shaworks.funfacts"
    minSdkVersion 14
    targetSdkVersion 19
    versionCode 1
    versionName "1.0"
}
buildTypes {
    release {
        runProguard false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}

}

dependencies { compile fileTree(dir: 'libs', include: ['*.jar'])

ANDROID MANIFEST FILES- <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="Shaworks.funfacts" >

<application
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >
    <activity
        android:name=".FunFactsActivity"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

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

</manifest>

lucas shaw
lucas shaw
669 Points

got it to work .. thanks for all the help!

1 Answer

Hello,

Your package name has a capital letter in it. Try refactoring your package so that all the letters are lowercase. To do this, in the panel for your project, make sure you're in Android view mode, then click the gear that is a little to the right of the view indicator, then make sure compact empty middle packages is unchecked. Next, right click on your package with a capital letter in it and select refactor -> rename. Change it to have a lower case, double check your AndroidManifest.xml is now a lower case, if not, manually edit it.