I have a clean Android project on Android Studio (just with a "hello world' screen), and I'm trying to install the app on my Samsung Galaxy S10e.
I click the Run button, and this is what I see in the Build Output:
And the apk is generated successfully. But it's not launched and not installed on the device (no icon, and it doesn't appear in the apps list).
When I try manually installing the apk by adb install app-debug.apk
, it works. The app shortcut appears on the device, it's added to the apps list, and I can launch the app.
At first also adb install
didn't work, giving out the error INSTALL_FAILED_TEST_ONLY
, but I solved that by adding android.injected.testOnly=false
to gradle.properties
.
I tried changing Gradle version to 6.0.1 (looks like this is the latest at the moment), and it didn't help.
I also have my device selected at the top:
How can I make Android Studio install and launch the app on my device?
Android Studio version: 3.5.3
Edit:
I'm seeing the same behavior on an Emulator. I opened AVD from Android Studio and chose Pixel 3A. The emulator opens up, I run the app, nothing happens on the emulator (and I see the same Build Output messages).
The Android app not installed error can be combated after resetting app permissions. Go to Settings > Apps > Reset App Preferences/Reset Application Permissions. After this, third-party software can be installed on your device.
Why APK won't install on Android? First, make sure that your Android version supports the APK version you want to install. Also, remove the Play Store version of the app before installing an APK. Don't forget to check the storage space and permission to install apps from unknown sources.
Unplug your device from the USB port on the computer. Restart the device by powering off and back on. Verify that Settings => Developer options => USB Debugging is enabled. Quit and re-launch Android Studio.
There isn't enough information to find the cause of this issue.
But since it works with adb, it means you run adb command. There could be only one instance of adb daemon running. So if it's involved externally my guess is Android Studio won't have access to it.
Possibly try adb kill-server
and running again from Android Studio and see if that helps.
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