Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio not installing app on device, no error messages

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: 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:

device-selected

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).

like image 228
Alaa M. Avatar asked Dec 06 '19 14:12

Alaa M.


People also ask

How do I fix app not installing error?

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 app is not installing from APK?

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.

Why Android studio is not running the app?

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.


1 Answers

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.

like image 135
S Praveen Kumar Avatar answered Oct 16 '22 08:10

S Praveen Kumar