0

Wenn ich Unit-Tests auf einer Xamarin-Android-App ausführen möchte, schlagen alle Tests fehl, weil die IDE (VS 2015) keine Geräte oder Emulatoren für die Bereitstellung der App gefunden hat man läuft.Xamarin IDE-Integration konnte nicht implementiert werden

Wenn ich die App normal laufe, funktioniert es.

VS Protokollausgabe:

Full log file: C:\Users\tester\AppData\Local\Temp\uitest\log-2016-08-03_10-57-46-734.txt 
Attempting IDE connection through pipe 0620e6c5f6094679bbb909f65a5f0702. 
Deploying app through IDE. 
Instructing the IDE to prepare the test app for execution. Session: Assembly=D:\Documents\Visual Studio 2015\Projects\MyTicketNativeApp\trunk\Cobeco.MyTicket.DroidApp.UITests\bin\Debug\Cobeco.MyTicket.DroidApp.UITests.DLL 
Platform=Android 
IDE integration failed to deploy app: There isn't any device or emulator available for running the application 
NUnit VS Adapter 2.0.0.0 executing tests is finished 
========== Run test finished: 11 run (0:00:02,6699974) ========== 

Auch Ausgabe von Vollprotokolldatei:

03-08-2016 10:57:46.749 +02:00 - 14 - Potential Android SDK location: (No path) - Not set. [ Source: ANDROID_HOME ] 
03-08-2016 10:57:46.750 +02:00 - 15 - Potential Android SDK location: D:\Android - Valid SDK. [ Source: Registry ] 
03-08-2016 10:57:46.750 +02:00 - 15 - Potential Android SDK location: D:\Android - Valid SDK. [ Source: Registry ] 
03-08-2016 10:57:46.750 +02:00 - 15 - Using Android SDK: D:\Android 
03-08-2016 10:57:46.750 +02:00 - 15 - Using JDK: C:\Program Files (x86)\Java\jdk1.7.0_55 [ Source: Registry ] 
03-08-2016 10:57:46.765 +02:00 - 30 - Attempting IDE connection for Android: D:\Documents\Visual Studio 2015\Projects\MyTicketNativeApp\trunk\Cobeco.MyTicket.DroidApp.UITests\bin\Debug\Cobeco.MyTicket.DroidApp.UITests.DLL. 
03-08-2016 10:57:46.765 +02:00 - 31 - Attempting IDE connection through pipe 0620e6c5f6094679bbb909f65a5f0702. 
03-08-2016 10:57:46.794 +02:00 - 59 - Deploying app through IDE. 
03-08-2016 10:57:46.794 +02:00 - 60 - Instructing the IDE to prepare the test app for execution. Session: Assembly=D:\Documents\Visual Studio 2015\Projects\MyTicketNativeApp\trunk\Cobeco.MyTicket.DroidApp.UITests\bin\Debug\Cobeco.MyTicket.DroidApp.UITests.DLL 
Platform=Android 
03-08-2016 10:57:46.807 +02:00 - 73 - IDE integration failed to deploy app: There isn't any device or emulator available for running the application 

Antwort

1

Ich endlich herausgefunden. Man muss im Unit-Test-Setup die IP manuell auf das Gerät und den Pfad zur APK-Datei setzen.

Z. B .:

AndroidApp app = ConfigureApp 
       .Android 
       .DeviceIp("127.0.0.1") //Localhost because i use an emulator 
       .ApkFile("<path-to-apk>") 
       .StartApp(); 
0

(kann leider noch nicht kommentieren) Haben Sie versucht, den Emulator erneuten Öffnen oder ein physikalisches Gerät anschließen? Und welchen Emulator verwendest du? Sind die Zielplattformen (armeabi, x86, etc.) an Ihr Emulatorgerät angepasst?

+0

Ich habe versucht, den Emulator erneute Öffnen und meinen Computer mehrmals neu starten. Ich habe nicht versucht, es auf einem physischen Gerät auszuführen, aber das Projekt muss auf einem Emulator ausgeführt werden. Verwendete Emulatoren sind Xamarin Android Player und die Google Emulatoren. Hyper-V funktioniert nicht auf meinem Computer. Zielplattformen sind angepasst. – meik99

+0

Welcher Emulator? Und welche Architektur Ihrer App unterstützt? – Zhyano

+0

Jede Architektur ist als unterstützt markiert. Mein Hauptemulator ist ein Nexus 5 mit Lollipop vom Xamarin Android Player – meik99

Verwandte Themen