Previously I have seen the same error if I start the instrumentation test without any device connected, but Android Studio as well as the output from adb devices showed that the remote device is seen by the toolchain. However the same test could not be even started on the remote device. I use the gradle task connectedAndroidTest to run the instrumentation tests and is working fine on a handheld device connected over USB directly to my PC. “Unknown API level” error when trying to run instrumentation test I tried to run a test on a device(non-handheld) that is connected over ethernet, but all I see is failure. ERROR DEVICE UNAUTHORIZED ADB EMULATOR MAC CODEYou could either wait for cordova to fix their code to eliminate the race condition altogether (or maybe even do it yourself) or just use userdebug (or eng) Android image with ro.adb.secure=0 You are obviously experiencing a race condition where adb device is already enumerated/connected but not yet authorized. Additionally I updated loadUrlTimeoutValue to be a bit higher and everything started working. I removed my avd device and created a new one. This doesn't seem to be the answer - upon some more time, I'm still receiving However, I still have to run this from time to time and it can't be the perfect solution. Remove and re-add android platform and rebuild the same Try creating a new AVD and mention it as target while launching the AVD Kill and restart adb server before every launch The possible solutions for this inconsistent scenario is as follows:Īdd this preference in you config.xml under android platform: This application works on other people's computers so I imagine there is something misconfigured on my system but I'm not sure the best way to proceed determining what is wrong. If I reboot, I need to start this process all over again. one more time the application loads successfully and I can run through the application as expected. The connection to the server was unsuccessful. The emulator and application appear to launch without the previous adb issues, however, after showing the splash screen, the application crashes with the following error dialog in the Android emulator: :Įrror: Failed to execute shell command "getprop,dev.bootcomplete"" on device: Error: adb: Command failed with exit code 1 Error output:įrom here, I run adb-kill server and run cordova run android. Initially, I receive the following error when running cordova run android. ERROR DEVICE UNAUTHORIZED ADB EMULATOR MAC HOW TOOn iOS, the workflow seems about what I was expecting but on Android it's quite the balancing act and I'm not entirely sure how to fix. This way we ensured the device would be available while testing.Ĭordova and adb-server issue I'm building a project with Cordova. %ANDROID_SDK%-current\platform-tools\adb.exe wait-for-device %ANDROID_SDK%-current\platform-tools\adb.exe root %ANDROID_SDK%-current\platform-tools\adb.exe devices if fail again you should to use other's emulator in markets.Īny hint so far? In my former ant script, to ensure adb was connected to the device, we used to to do: to find out why the Gradle task works on my machine.įirstly clean your project,and than recreate an Android emulator,execute a cmd commond adb start-service. I'm also happy to get advice to further pinpoint the problem, e.g. So before doing additional work, I wonder how can I "repair" that Gradle task so that it detects the emulator. I already half-made a shell script that installs the APKs and runs am instrument, but the latter doesn't produce a JUnit-compatible output. Therefore I can say that the problem is that :app:connectedAndroidTest doesn't detect the running emulator. by manually starting the emulator and running the Gradle task from the command line Įven though the Jenkins output warned about using nonstandard ports, the issue occurs even when using the more usual 5554-5555 Īdb devices shows the emulator in online state ERROR DEVICE UNAUTHORIZED ADB EMULATOR MAC MAC OSThe issue only occurs on that machine on my machine (another Mac OS X), the task has always worked as expected, inside and outside Android Studio > .api.DeviceException: No connected devices! But the task has always been unstable, sometimes being able to run the tests just fine, but most of the times failing with the following error:Įxecution failed for task ':app:connectedAndroidTest'. My Jenkins project starts an Android emulator and runs the Gradle task :app:connectedAndroidTest. ConnectedAndroidTest fails with “no connected devices” but am instrument works - android I'm setting up a Jenkins node (on Mac OS X) running instrumentation tests for my Android app.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |