Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Application package 'AndroidManifest.xml' must have a minimum of 2 segments

I read this:
Error in AndroidManifest.xml "must have a minimum of 2 segments" but there is no solution.

Its happen after I change the name of the project by refactor->rename (instead com.example.my app to myapp only) and after that I change the name also in the manifest.

Here is the code:

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

    <uses-sdk
        android:minSdkVersion="8"
        android:targetSdkVersion="17" />

    <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" >
        <activity
            android:name="save_money.MainActivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name="save_money.Article"
            android:label="@string/title_activity_article" >
        </activity>
        <activity
            android:name="save_money.HashmalActivity"
            android:label="@string/title_activity_hashmal" >
        </activity>
        <activity
            android:name="save_money.ImageAdapter"
            android:label="a" >
        </activity>
        <activity
            android:name="save_money.SavedItems"
            android:label="פריטים שמורים" >
        </activity>
        <activity
            android:name="save_money.Screen2HashmalActivity"
            android:label="עלות צריכה" >
        </activity>
        <activity
            android:name="save_money.SelectArticle"
            android:label="בחר מאמר" >
        </activity>
    </application>

</manifest>
like image 458
user2073729 Avatar asked Apr 19 '13 14:04

user2073729


2 Answers

What it means is the package declaration in your manifest must have at least two portions separated by a period (.). Instead of just saying package="save_money", change it to package="com.save_money". That should remove your error. Likewise, everywhere you specify the name of an activity, you also need to update it there. Best of luck!

like image 60
Adam Avatar answered Oct 26 '22 15:10

Adam


My guess is you need to have a minimum of 2 segments for your package name. So instead of package="save_money Try package="me.save_money" or whatever you want.

like image 45
Damien R. Avatar answered Oct 26 '22 13:10

Damien R.