2012-11-16 118 views
3

我試着改變我的包名稱,如com.project_name,但它沒有找到。我的項目中真正的問題是什麼?AndroidManifest.xml錯誤「必須至少有2段」

,我發現了以下錯誤:

Error in AndroidManifest.XML file "Application package 'AndroidManifest.xml' must have a minimum of 2 segments"

AndroidManifest.xml文件;

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

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

    <supports-screens 
     android:anyDensity="true" 
     android:largeScreens="true" 
     android:normalScreens="true" 
     android:smallScreens="true" /> 

    <application 
     android:icon="@drawable/icon" 
     android:label="@string/app_name" > 
     <activity 
      android:name=".splash" 
      android:label="@string/app_name" 
      android:screenOrientation="portrait" 
      android:theme="@android:style/Theme.NoTitleBar.Fullscreen" > 
      <intent-filter> 
       <action android:name="android.intent.action.MAIN" /> 

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

</manifest> 
+0

它應該像com.something.project_name,我該怎麼做:com.bigflow.project_name – Bigflow

+0

com.project_name是可以接受的。 @Serkan你是如何改變你的包名的?通過重構? – jnthnjns

+0

首先,您是如何創建一個包裝細分的項目? – jnthnjns

回答

0

這可能是一個紅色的鯡魚。我從來沒有得到它,因爲我一直使用完整的企業層次結構(當然這比二層深)。你不顯示(你爲什麼要知道要顯示它?)主要的ListActivity代碼的包名。假設這是RssReader.java:這必須在com.rssreader.RssReader.java。這應該做到這一點。如果你發現你的主要活動不在那個地方,請修復它。如果它仍然不起作用,那麼爲你的軟件包名稱添加一個額外的層次結構,並嘗試這樣做,這肯定應該解決它。希望這可以幫助。

相關問題