Reputation: 362
I am unable to run my android project on any android device.
I am getting error on android studio. My project is building and compiling without any error.
Attaching screenshot
Upvotes: 21
Views: 10119
Reputation: 365
If you are using physical device, go to settings/developer options in your device and turn on "Install via USB" option. This will allow installation via USB.
Upvotes: 0
Reputation: 646
Blockquote
In my device don't have efficient space .After remove some apps this error solved.
Upvotes: 2
Reputation: 3763
I have faced this issue on the Android Emulator (last available version, HAXM 7.5.1) installing a project with API 28 under AS 3.4.1 (a simple run, not a debug!). The solution was to set check to
File -> Settings -> Debugger -> Allow unsigned requests checkbox.
UPDATE 28/07/2019 The reason was an insufficient internal memory of API 28 Emulator in my case. The error have disappeared after adding extra space.
Upvotes: 1
Reputation: 11
I was getting the same error without any other build/compilation error after editing my AndroidManifest.xml and accidentally leaving a meta-data tag without a corresponding android:value or android:resource attribute. Check your manifest for similar errors
Wrong:
<meta-data android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED"/>
Right
<meta-data android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED" android:resource="@xml/device_filter"/>
Upvotes: 0
Reputation: 667
Upvotes: 12
Reputation: 338
Sometimes, the actual error message shows up in IDE (internal) Fatal Errors, accessible at the bottom right of the Android Studio IDE (should be a red circle with an exclamation mark within).
When it happened for me, I found out through Fatal Errors that my target device was out of space.
Upvotes: 16
Reputation: 19243
Wiping emulator may help, but what if I'm using physical, configured for use device? This bug is weird and a bit random... for me restarting IDE and device helped, also used Android Studio -> Files -> Invalidate Caches / Restart
and manual killing/restarting daemon with adb kill-server
and adb start-server
commands
also: note that some devices have additional toggles to turn on for developing purposes, e.g. Xiaomi have separated option in dev prefs for allowing installing apks through USB, USB debugging turned on isn't sufficient
Upvotes: 2