Problem with installing apk android studio - android-studio

I don't see Installing APKs process when I run the AVD but it's work fine and the virtual device runs but I don't see my application

Related

Don't run Android Studio 4.0.1

I install Android Studio about 2 week ago and all work fine. But today I run studio and it don't start. I remove and install again. But it also don't work.
open -a /Applications/Android\ Studio.app
LSOpenURLsWithRole() failed for the application /Applications/Android Studio.app with error -10810.
macOS Catalina 10.15.6
I deleted folder /Users/user/Library/Preferences/AndroidStudio4.0
And run app. App run and work correct.

When I am trying to install APK file in my device they shows error

When I am trying to run my android studio program in my device which is connected with USB, It show an error msg:
Installation failed with message Failed to commit install session 482678384 with command cmd package install-commit 482678384. Error: INSTALL_FAILED_USER_RESTRICTED: Install canceled by user.
It is possible that this issue is resolved by uninstalling an existing version of the apk if it is present, and then re-installing.
)
I tried all possible methods but at the end I am not able run my code.

How do I run React-Native-Navigation v2 Playground from the cloned repo on my Windows?

I have cloned Wix RNN2 repo [Branch v2] and I am not sure how to run playground on my emulator.
If I just run npm run start, I get this error:
> rm -rf ./lib/dist && tsc
'rm' is not recognized as an internal or external command,
operable program or batch file.
Windows cannot recognize that command because its linux.
I have tried running the app from Android Studio, and on my emulator, it says:
Unable to load scripts from assets 'index.android.bundle - which is because I don't have Metro Bundler making a bundle for me.
Anyways, what is the right way to run this example by Wix RNN2?
I have VSCode, Expo, Android Studio and my android build has no errors for the Android project.
follow these steps:
1) git clone https://github.com/wix/react-native-navigation.git
2) cd react-native-navigation
3) npm install
4) npm start
5) open xcode

React-native build - APK

I am using two methods to build an APK in React Native project.
using react-native run-android and take the latest apk from projectFolder>android>app>build>output>apk.
react-native bundle --dev false --platform android --entry-file index.android.js --bundle-output ./android/app/build/intermediates/assets/debug/index.android.bundle --assets-dest ./android/app/build/intermediates/res/merged/debug
then run:
cd android
gradlew assembleDebug
then physically locate the file at android/app/build/outputs/apk folder:
app-debug.apk
app-debug-unaligned.apk
The problem I am facing is that if I am building apk from above-mentioned methods then generated apk is not the build of updated code. But the same code which I am running on the Android simulator of Android Studio is working perfectly. Also if I am using a real device as an emulator connected to the android studio, it's running on the older version of build.
(Posted on behalf of the question author, from a comment).
This was solved as follows:
enable usb debugging.
download latest usb driver for phone.
setx PATH "%PATH%;C:\Program Files\android-sdk\platform-tools" (see here)
execute adb. exe from C:\Users[youruser]\AppData\Local\Android\android-studio\sdk\platform-tools
run adb devices in cmd to see list of connected devices
Run the following in a command prompt:
$ adb -s <device name> reverse tcp:8081 tcp:8081
To find the device name, run the following adb command:
$ adb devices

Output of React Native packager on Linux

I see no output of React Native packager on Linux (Ubuntu 17.04) and react-native 0.51.0 even though it is running.
A teammate uses Windows 10 and after react-native run-android he gets a new window with output from the packager.
Is there a way to see the packager's output ?
Before running react-native run-android try running react-native start in a different terminal, this command will start the packager manually.
PS: react-native run-android is optional if you didn't change one of native android files, you can just start the packager and then reload the already installed app.

Resources