"Package installer keeps stopping" Error on android 14 when installing my .apk

227 views Asked by At

My android kotlin app install and runs fine on android versions upto 13. But in android 14 i get the error "Package installer keeps stopping" while installing the app. Below are error screenshots and my project manifest,gradle file: error

Manifest:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools">

    <uses-feature
        android:name="android.hardware.camera"
        android:required="false" />

    <uses-permission android:name="android.permission.RECORD_AUDIO" />
    <uses-permission android:name="android.permission.CAMERA" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"
        android:maxSdkVersion="32" />
    <uses-permission android:name="android.permission.CAMERA" />
    <uses-permission android:name="android.permission.READ_MEDIA_IMAGES"/>
    <uses-permission android:name="android.permission.READ_MEDIA_AUDIO"/>
    <uses-permission android:name="android.permission.READ_MEDIA_VIDEO"/>
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>

    <application
        android:name=".MyApp"
        android:allowBackup="true"
        android:dataExtractionRules="@xml/data_extraction_rules"
        android:fullBackupContent="@xml/backup_rules"
        android:icon="@drawable/app_logo"
        android:label="@string/app_name"
        android:roundIcon="@drawable/app_logo"
        android:supportsRtl="true"
        android:theme="@style/Theme.CUCApplication"
        android:usesCleartextTraffic="true"
        tools:targetApi="31">
        <activity
            android:name=".ui.activities.MapsActivity"
            android:exported="false" />

        <meta-data
            android:name="com.google.android.geo.API_KEY"
            android:value="" />

        <activity
            android:name=".ui.activities.VideoViewActivity"
            android:exported="false" />
        <activity
            android:name=".ui.activities.ImageViewActivity"
            android:exported="false" />
        <activity
            android:name=".ui.activities.CallingActivity"
            android:exported="false" />

        <service
            android:name=".call.CallService"
            android:enabled="true"
            android:exported="false" />

        <activity
            android:name=".ui.activities.GroupCallActivity"
            android:exported="false" />
        <activity
            android:name=".ui.activities.MessageInfoActivity"
            android:exported="false" />

        <service
            android:name=".notifications.FcmService"
            android:enabled="true"
            android:exported="false">
            <intent-filter>
                <action android:name="com.google.firebase.MESSAGING_EVENT" />
            </intent-filter>
        </service>

        <activity
            android:name=".ui.activities.SelectChatsActivity"
            android:exported="false" />
        <activity
            android:name=".ui.activities.CallActivity"
            android:exported="false" />
        <activity
            android:name=".ui.activities.CreateGroupActivity"
            android:exported="false" />
        <activity
            android:name=".ui.activities.RegistrationActivity"
            android:exported="false" />
        <activity
            android:name=".ui.activities.LoginActivity"
            android:exported="false"
            android:label="@string/title_activity_login" />
        <activity
            android:name=".ui.activities.MessageActivity"
            android:exported="false"
            android:label="@string/title_activity_message"
            android:theme="@style/Theme.CUCApplication" />
        <activity
            android:name=".ui.activities.StartupActivity"
            android:exported="true">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name=".MainActivity"
            android:exported="false"
            android:theme="@style/Theme.CUCApplication" />

        <receiver
            android:name=".di.NotificationBroadcastReceiver"
            android:exported="false">
            <intent-filter>
                <action android:name="ooo" />
            </intent-filter>
        </receiver>
        <receiver
            android:name=".di.NotificationReplyReceiver"
            android:exported="false">
            <intent-filter>
                <action android:name="replyy" />
            </intent-filter>
        </receiver>
        <receiver
            android:name=".db.RoomDbCleaner"
            android:exported="false">
            <intent-filter>
                <action android:name="ooo" />
            </intent-filter>
        </receiver>
        <receiver
            android:name=".di.AlarmSchedulerBootReceiver"
            android:enabled="false"
            android:exported="true">
            <intent-filter>
                <action android:name="android.intent.action.BOOT_COMPLETED" />
            </intent-filter>
        </receiver>
    </application>

</manifest>

Gradle(app):

import org.jetbrains.kotlin.js.facade.exceptions.TranslationRuntimeException

plugins {
    id("com.android.application")
    id("org.jetbrains.kotlin.android")
    id("kotlin-kapt")
    id("com.google.gms.google-services")
    id("com.google.android.libraries.mapsplatform.secrets-gradle-plugin")
}

android {
    namespace = "com.dev.cucapp"
    compileSdk = 34

    defaultConfig {
        applicationId = "com.dev.cucapp"
        minSdk = 24
        targetSdk = 34
        versionCode = 1
        versionName = "1.0"

        testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        release {
            isMinifyEnabled = false
            proguardFiles(
                getDefaultProguardFile("proguard-android-optimize.txt"),
                "proguard-rules.pro"
            )
        }
    }
    compileOptions {
        sourceCompatibility = JavaVersion.VERSION_1_8
        targetCompatibility = JavaVersion.VERSION_1_8
    }
    kotlinOptions {
        jvmTarget = "1.8"
    }
    buildFeatures {
        viewBinding = true
        dataBinding = true

    }
}


dependencies {

    implementation("androidx.core:core-ktx:1.9.0")
    implementation("androidx.appcompat:appcompat:1.6.1")
    implementation("com.google.android.material:material:1.9.0")
    implementation("androidx.constraintlayout:constraintlayout:2.1.4")
    implementation("androidx.legacy:legacy-support-v4:1.0.0")
    implementation("androidx.annotation:annotation:1.7.0")
    implementation("com.google.firebase:firebase-messaging:23.3.0")
    implementation("com.google.android.gms:play-services-maps:18.2.0")
    implementation("com.google.android.gms:play-services-location:21.1.0")
    testImplementation("junit:junit:4.13.2")
    androidTestImplementation("androidx.test.ext:junit:1.1.5")
    androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")

    //data store & prefernces store
    implementation("androidx.datastore:datastore-preferences:1.0.0")
    implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.9")
    implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.9")

    //lifecycle cscope
    implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.6.2")
    implementation("androidx.lifecycle:lifecycle-livedata-ktx:2.6.2")
    implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.2")


    //recyclerview
    implementation("androidx.recyclerview:recyclerview:1.3.2")

    //image library
    implementation("com.github.dhaval2404:imagepicker:2.1")

    //retrofit library
    implementation("com.squareup.retrofit2:retrofit:2.9.0")
    implementation("com.squareup.retrofit2:converter-gson:2.9.0")
    implementation("com.squareup.retrofit2:converter-scalars:2.7.1")

    //gson
    implementation("com.google.code.gson:gson:2.10.1")

    // Room
    val room_version = "2.5.2"
    implementation("androidx.room:room-runtime:$room_version")
    implementation("androidx.room:room-ktx:$room_version")
    kapt("androidx.room:room-compiler:$room_version")

    //socket
    implementation ("io.socket:socket.io-client:2.1.0") {
        // excluding org.json which is provided by Android
        exclude(group="org.json", module="json")
    }

    //videosdk.live
    implementation("live.videosdk:rtc-android-sdk:0.1.21")

    //notify
    implementation("io.karn:notify:1.4.0")

    //signal
    implementation(files("libs/libsignal-android-0.32.1.aar"))

    //video picker
    val pickerVersion = "1.1.0"
    implementation("com.github.FunkyMuse.MediaPicker:core:$pickerVersion")
    implementation("com.github.FunkyMuse.MediaPicker:videopicker:$pickerVersion")

}

Tried running on emulator. It runs there but does not install on phones.

0

There are 0 answers