When I am running Android Studio play button it is throwing me this error:
Installation did not succeed.
The application could not be installed: INSTALL_FAILED_USER_RESTRICTED
Installation via USB is disabled.
Related
I have recently installed the Android Studio Dolphin | 2021.3.1 Patch 1 on a Fedora Linux OS and when I tried to run my first app on the physical device via USB debugging I noticed that the app will not run on my Samsung S22 device even the Android studio recognize my device and does not throw any error.
So when I click on the run app button the Android studio starts the build process and finishes the same process, but after the build process, the same app will not install and run on my phone.
So what is the problem?
Here is the screenshot:
Here is the screenshot of my SDK manager:
I have an Android device recognized by adb devices but not recognized by chrome development tools (with or without discover USB devices checked).
My machine development is a Mac and I have
installed Android Studio 3.1
Installed SDK platforms Android 8.0 and 8.1
Installed SDK Tools: Android SDK Build-Tools 28 rc-2, Android emulator, Android SDK platform-tools, Android SDK tools, Intel x86 emulator, Android support Repository and Google repository
If disconnect and reconnect the cable, or if I switch on/off the USB debugging on my device makes no difference.
ADB kill-server / start-server don't produce any reaction in Chrome.
Apparently adb is working properly
I've already changed android development environment, from android studio to brew cask version (android-sdk, android-ndk, android-platform-tools) and vice-versa with no success (similar results).
I have reinstalled Chrome
Currently I have android studio and in my ~/bash_profile I have set:
export ANDROID_HOME=/Users/${USER}/Library/Android/sdk
#export ANDROID_SDK_HOME=/Users/${USER}/Library/Android/sdk
#export ANDROID_SDK_ROOT=/Users/${USER}/Library/Android/sdk
export PATH=$PATH:$ANDROID_HOME/platform-tools:$ANDROID_HOME/emulator:$ANDROID_$
export ANDROID_ADB_SERVER_PORT=5038
This problem started a coupled of days ago. Previously worked fine for months. Not sure what led to the problem, but I made some trials with ionic dev app (not sure on any cause-effect) and some time after my development environment started with problems.
My problem is I cannot have remote debug with Chrome. I can deploy my ionic application into my connected mobile and run it, but not debug the development
Debugging with emulator is not efficient in my case since I use physical components such as scanning and photos
Any help help is more than welcome. I've spent hours with this ...
I installed Android Studio and also I have an emulator in AS.
I started new react native project and I running successfully on emulator.
This process was successful.
But
I just connected my new device to Android Studio and selected Deployment target also
But I don't know what to do next. But from my knowledge I tried to react-native run-android in my terminal, but it shows
FAILURE: Build failed with an exception. Could not install the app on
the device, read the error above for details. Make sure you have an
Android emulator running or a device connected and have set up your
Android development environment:
https://facebook.github.io/react-native/docs/android-setup.html
So can't run the project in device.
Please help me to do next steps.
Enable Debugging over USB
Most Android devices can only install and run apps downloaded from Google Play, by default. You will need to enable USB Debugging on your device in order to install your app during development.
To enable USB debugging on your device, you will first need to enable the "Developer options" menu by going to Settings → About phone and then tapping the Build number row at the bottom seven times. You can then go back to Settings → Developer options to enable "USB debugging".
Plug in your device via USB
Let's now set up an Android device to run our React Native projects. Go ahead and plug in your device via USB to your development machine.
Now check that your device is properly connecting to ADB, the Android Debug Bridge, by running adb devices.
$ adb devices
List of devices attached
emulator-5554 offline # Google emulator
14ed2fcc device # Physical device
Seeing device in the right column means the device is connected. You must have only one device connected at a time.
Run your app
Type the following in your command prompt to install and launch your app on the device:
$ react-native run-android
If you get a "bridge configuration isn't available" error, see Using adb reverse.
Hint
You can also use the React Native CLI to generate and run a Release build (e.g. react-native run-android --variant=release).
Make sure to shutdown the emulator and only have one device connected.
Read further here :- https://facebook.github.io/react-native/docs/running-on-device.html
You have to run tcp command in platform-tools in command line for connecting your mobile.
I was using Android studio on windows 8.1 and it was working fine. Now I upgraded to windows 10 with a clean install and installed android studio. When I open AVD manager and creates a new emulator, it says /dev/kvm not found. I tried these after googling but nothing worked for me-
Go to sdk\extras\intel\Hardware_Accelerated_Execution_Manager and install intelhaxm-android.exe
Download a fresh copy of Intel HAXM and install, but it says failed to configure driver: unknown error. failed to open driver.
Re-install HAXM from SDK manager, but it says Windows blocked the installation of a digitally unsigned driver. Uninstall the program or device that uses the driver and check the publisher's website for a digitally signed version of the driver
Downloading workground patch for HAXM, extract to haxm folder and Run as administrator.
My System
OS- Windows 10
Processor- Intel Core i3 third gen
Intel Virtual Technology already enabled from bios.
Hyper-V is also unchecked
I found that, when I start my PC by disabling driver signature enforcement, the emulator is working fine..
At least its solved i justa instled the new HAXM version 6.0.4 at this will work:
Here is the link:
HAXM v6.0.4
Using the Cordova CLI, I set up an app and build it:
cordova create hi com.example.hi Hi
cd hi
cordova platform add android
cordova build android
I run Genymotion and start a device named "api9". I run the Android Debug Bridge adb devices and it shows as
192.168.8.101:5555
I try to launch the app with cordova emulate android but I get:
Error: An error occurred while emulating/deploying the android project. ...spawn ENOENT
However, launching the Android Virtual Device manager and starting an emulated device; the cordova emulate android works and adb devices lists;
192.168.8.101:5555
emulator-5554
What should I do to make Cordova emulate through Genymotion devices?
It seems that adb sees genymotion virtual device as a real device and not as an emulated one, try cordova run android instead of cordova emulate android.
When the device list is empty, which is not covered in this case, then you need to connect adb manually to the genymotion device.
Therefore you have it run in the same JAVA SDK environment so don't use the inbuilt one in Genymotion.
Then start up your device. On screen should appear some genymotion icon. Click it and you will see the IP.
Use then in the console the command "adb connect 198.123.123.123" (use your own IP of course).
After that your device list is updated.
Finally use "cordova run android" and it will install your app to the virtual device.
Same applies also for ionic framework: "ionic run android".
Caution: without any device found it will fallback to emulator...