1

I had this issue with my android studio and I solved it with this answer.

Now my application is running on android studio and I will get a notification from android studio that the application has been installed and is launched but the application will not open on an emulator or on a physical device.

After android studio says the app has been installed the icon will show on the device bit if I click on it, I will get "App isn't installed" toast.

What can I do?

App level build.gradle file contains:

plugins {
    id 'com.android.application'
}

android {
    compileSdkVersion 31

    defaultConfig {
        configurations.all {
            resolutionStrategy { force 'androidx.core:core:1.6.0' }
        }
        applicationId "com.olalekanamoo.service"
        minSdkVersion 16
        targetSdkVersion 31
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}

dependencies {

//    def work_version = "2.6.0"
//    // Force WorkManager 2.6.0 for transitive dependency
//    implementation("androidx.work:work-runtime:$work_version") {
//        force = true
//    }
    implementation 'androidx.appcompat:appcompat:1.4.1'
    implementation 'com.google.android.material:material:1.5.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
    testImplementation 'junit:junit:4.+'
    androidTestImplementation 'androidx.test.ext:junit:1.1.3'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
}

My physical device that I use for debugging is running android 11.

I also tried this solution but it didn't work.

Lekan
  • 115
  • 1
  • 6

0 Answers0