I am using AGP 8.7.1
with Android Studio Ladybug:
Android Studio Ladybug | 2024.2.1 Patch 1
Build #AI-242.23339.11.2421.12483815, built on October 10, 2024
Runtime version: 21.0.3+-79915917-b509.11 aarch64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Toolkit: sun.lwawt.macosx.LWCToolkit
macOS 14.7
GC: G1 Young Generation, G1 Concurrent GC, G1 Old Generation
Memory: 5120M
Cores: 10
Metal Rendering is ON
Registry:
ide.instant.shutdown=false
ide.experimental.ui=true
i18n.locale=
Non-Bundled Plugins:
idea.plugin.protoeditor (242.23339.11)
io.github.composegears.valkyrie (0.9.1)
org.norbye.tor.kdocformatter (1.6.5)
com.jetbrains.kmm (0.8.3(242)-4)
org.jetbrains.compose.desktop.ide (1.7.0)
I have a project that works great with a debug
build. I set up signing for the release
build using a custom keystore, and when I run it, I get a cryptic error message centered around INSTALL_BASELINE_PROFILE_FAILED
:
The application could not be installed: INSTALL_BASELINE_PROFILE_FAILED Installation failed due to: 'Baseline profile did not install"
Why am I getting this and what can I do to fix it?
For me, it started happening while installing on Android 15 devices.
In the Run debug configuration,
Run -> Edit Configurations
Selecting APK from app bundle solved the issue
You already have a build installed on this device with the same applicationId
but a different signing key. A common scenario for this: you have a debug
build signed by your normal debug keystore. Android is trying to install a replacement build with a different signing key, and that will not work.
Assuming that you want to be able to use both builds on the same device, you need to give them distinct applicationId
values. For the debug
scenario described above, the simple solution is to use applicationIdSuffix
:
android {
// cool stuff goes here
buildTypes {
// more cool stuff goes here
debug {
applicationIdSuffix = ".debug"
}
}
}
(the above is for build.gradle.kts
; adjust as needed for build.gradle
and Groovy syntax)
Now, if your applicationId
in defaultConfig
is com.commonsware.awesomeapp
, your debug
build will get an applicationId
of com.commonsware.awesomeapp.debug
. Now you can have both your debug
and your release
builds installed side by side with different signing keys.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With