The application could not be installed: INSTALL_PARSE_FAILED_NO_CERTIFICATES Error in kotlin?

  Kiến thức lập trình

I have an SDK project and I want to test whether Proguard corrupts some files when isMinifyEnabled true if so I try to configure proguard for release version, but I encounter the following error. I am trying to run this SDK project in build Variant release, but I get an error like this:

Error running ‘app’ The application could not be installed:
INSTALL_PARSE_FAILED_NO_CERTIFICATES

Installation did not succeed. The application could not be installed:
INSTALL_PARSE_FAILED_NO_CERTIFICATES

When I select debug mode in Build Variant, the app works fine.

I didn’t understand where the problem came from. I created generate signed bundle apk and I kept getting the same error. I tried some things from this link but I couldn’t do it :

What is INSTALL_PARSE_FAILED_NO_CERTIFICATES error?

I don’t know why I’m getting this error. This is the first time I’ve encountered this error and I couldn’t find a solution. Please help. I have shared the codes that I think may be necessary. If there is an extra code that is required, I can share it.

here are my configurations

build.gradle.kts (Module :app)

android {
    namespace = "xxx"
    compileSdk = 34

    defaultConfig {
        applicationId = "xxx"
        minSdk = 21
        targetSdk = 34
        versionCode = 1
        versionName = "1.0"

     
        vectorDrawables {
            useSupportLibrary = true
        }
    }

    buildTypes {
        release {
            isMinifyEnabled = false
            proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
        }
    } ... 
    dependencies {
        ...
       // implementation(project(":sdk")). // I commented this out to test the sdk library
        implementation("com.xxx:1.0.0")
    }

settings.gradle

dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        google()
        mavenCentral()
      //  mavenLocal()
        maven {
            url =
                uri("xxx")

            credentials {
                username = "xxx"
                password = "xxx"
            }
        }
    }
}

rootProject.name = "xxx"
rootProject.buildFileName = "build.gradle.kts"
//include(":app", ":sdk")
include(":app")

LEAVE A COMMENT