Cmux
Cmux

Reputation: 13

Not able to install my application on other Android devices

I have made an Android app using AndroidStudio and want to test it on different phones. I have generated the signed apk (release version) and I could successfully install the apk on my device (Nexus 5).

Then I tried to install the same apk on a Nexus 4 but it throws an error after the installation that the package installer has stopped.

Here is what my manifest file looks like

<?xml version="1.0" encoding="utf-8"?>

<application
    android:permission="android.permission.WRITE_EXTERNAL_STORAGE"
    android:allowBackup="true"
    android:icon="@drawable/endecrypt_ico"
    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=".PostSubmission"
        android:label="@string/title_activity_post_submission"
        android:parentActivityName=".MainActivity" >
        <meta-data
            android:name="android.support.PARENT_ACTIVITY"
            android:value="com.example.psimit.encrypt.MainActivity" />
    </activity>
</application>

I am not able to understand where the problem lies. Since the app works when installed via the debugger and also using the apk on my phone, I am tempted to think if I need to do something more for compatibility across Nexus 4 and Nexus 5 during the generation of the signed apk.

I would quite appreciate some pointers if someone has encountered this problem earlier. Thanks in advance.

Upvotes: 0

Views: 92

Answers (1)

Hugo Gresse
Hugo Gresse

Reputation: 17899

It's a really strange issue you have. Maybe you're doing things wrong.

The permissions should be at the root of the manifest tag :

<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.app">

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />

    <application>

        <activity
            ...
        </activity>

    </application>

</manifest>

Upvotes: 1

Related Questions