2012-11-16 119 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。这应该做到这一点。如果你发现你的主要活动不在那个地方,请修复它。如果它仍然不起作用,那么为你的软件包名称添加一个额外的层次结构,并尝试这样做,这肯定应该解决它。希望这可以帮助。

相关问题