-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Detox failed to install apk files #274
Comments
Use an API 24 emulator , I think it only works on newer OS versions |
@rotemmiz thanks! It works fine on API 24 emulator. install [-lrtsdg] PACKAGE
install-multiple [-lrtsdpg] PACKAGE...
push package(s) to the device and install them
-l: forward lock application
-r: replace existing application
-t: allow test packages
-s: install application on sdcard
-d: allow version code downgrade (debuggable packages only)
-p: partial application install (install-multiple only)
-g: grant all runtime permissions |
Can I may ask that with this thread. Does this mean that Detox already support Android? Thanks. |
We just encountered this error. Removing
|
@Crash-- , I think you are right. This is something we could fix. API lvl 23 introduced runtime permissions. If I remember correctly However, we should be able to support API lvl 22 and lower and API lvl 24 and higher. I'll take a look at this when I'll have time to work on detox again. |
I spent a small time on this. API lvl 22 device accepts API lvl 24+ device accepts Great. :(
|
At least the latest RN versions doesn't need the I mean, the main reason to call |
Update: |
It accidentally works for API lvl 23 too. This whole |
This bothered me a lot even after the fix. So I made some research. First weirdness, is that apparently there are multiple The command line parsers code is 2000+ LOC. Wow. There are tools that generate this code. But this was written by hand. And here is the line, that causes this weird issue : On |
can |
I don't get your question. What else are left to do here? I tested it in the detox/test app with API levels from 21 - 26. It worked. |
Nevermind, your last comment answered my question :) |
:D Reading back this thread, I didn't communicate well the stages. |
Hi there!
Description
I'm trying to add detox for android into existing project. We already got ios tests on detox running.
I found that both apk files (app-release.apk & app-release-androidTest.apk) are failing to install.
full log here
So, it looks like problem are here:
adb -s emulator-5554 install -r -g /Users/paynd/Repo/Work/tipsi-react-app/android/app/build/outputs/apk/app-release-androidTest.apk
If I change a line in EmulatorDriver.js
From:
this.adbCmd(deviceId, 'install -r -g ' + binaryPath))
To:
this.adbCmd(deviceId, 'install -rg ' + binaryPath))
Installation succeed.
Steps to Reproduce
Node, Device, Xcode and macOS Versions
@simonracz @rotemmiz
The text was updated successfully, but these errors were encountered: