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>
4

1 回答 1

0

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

于 2013-01-23T01:37:10.070 回答