2013-01-22 327 views
1

我正在开发一个应用程序,我试图与几个朋友分享,以便他们可以测试它。我使用这种http://www.androiddevelopment.org/tag/apk/方法创建了一个密钥。该应用程序安装在手机上没有问题,但是当我实际点击图标启动应用程序时,它显示“未安装应用程序”。考虑到我在我的应用程序列表中看到它,并且在我的应用程序抽屉中有一个图标,这是非常奇怪的。发生什么事?我在页面底部回答这个问题。这是可以正常工作的新XML文件。应用程序安装说“应用程序未安装”

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

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

<application 
    android:allowBackup="true" 
    android:icon="@drawable/ic_launcher" 
    android:label="@string/app_name" 
    android:theme="@style/AppTheme" > 
    <activity 
     android:name=".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 = ".SQLView" android:label ="@string/app_name" 
     android:exported="false"> 
     <intent-filter> 
      <action android:name="com.example.test.SQLVIEW" /> 
      <category android:name="android.intent.category.DEFAULT" />  
     </intent-filter> 
    </activity> 

    <activity android:name = ".Add_Flashcard" android:label ="@string/app_name" 
     android:exported="false"> 
     <intent-filter> 
      <action android:name="com.example.test.ADD_FLASHCARD" /> 
      <category android:name="android.intent.category.DEFAULT" />  
     </intent-filter> 
    </activity> 

    <activity android:name = ".Flashcards_List" android:label ="@string/app_name" 
     android:exported="false"> 
     <intent-filter> 
      <action android:name="com.example.test.FLASHCARDS_LIST" /> 
      <category android:name="android.intent.category.DEFAULT" />  
     </intent-filter> 
    </activity> 

    <activity android:name = ".Edit_Flashcard" android:label ="@string/app_name" 
       android:exported="false"> 
     <intent-filter> 
      <action android:name="com.example.test.EDIT_FLASHCARD" /> 
      <category android:name="android.intent.category.DEFAULT" />  
     </intent-filter> 
    </activity> 

    <activity android:name = ".Decks_List" android:label ="@string/app_name" 
     android:exported="false"> 
     <intent-filter> 
      <action android:name="com.example.test.DECKS_LIST" /> 
      <category android:name="android.intent.category.DEFAULT" />  
     </intent-filter> 
    </activity> 
</application> 

</manifest> 
+1

确保您的活动已正确指定。在上面的清单中,它被列为'com.example.test.MainActivity',但由于您在顶部编辑了包名,我怀疑它实际上是在一个不同的包中。通常这会导致一个关闭的力量,但它是要检查的东西。 – iagreen

+0

您是否尝试与默认密钥库共享?您的朋友设备还有设置启用:“从未知来源安装” –

+0

您是否更改了过去的软件包名称?您是否曾尝试从应用程序中完全删除应用程序? – WarrenFaith

回答

0

我发现了问题所在。当我想直接通过Eclipse导出应用程序(还添加密钥库和所有内容)时,我进入了软件包选项,并通过选项重命名了软件包。这显然没有重新命名所有内容,它也将.R插入到我的所有分类中。另外,当您重命名包时,您的classess中的包导入将保持不变。重命名时,确保所有内容都被正确更改,因为这显然是Eclipse中的一个已知错误。这反过来导致了奇怪的错误,因为不同的软件包与内部的软件包不匹配......超级怪异。