0

xamarin-androidアプリケーションでユニットテストを実行しようとすると、IDE(VS 2015)がアプリケーションをデプロイするデバイスやエミュレータが見つからないため、すべてのテストが失敗します1つは実行中です。Xamarin IDEの統合でアプリケーションのデプロイに失敗しました

私はアプリを正常に実行すると動作します。

VSログ出力:

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) ========== 

また、完全なログファイルの出力:

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 

答えて

1

私はついにそれを理解しました。ユニットテストセットアップでipをデバイスに、apkファイルへのパスを手動で設定する必要があります。

例えば:

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

(申し訳ありませんが、まだコメントすることはできません)あなたがエミュレータを再開または物理的なデバイスを接続しようとしたことがありますか?どのエミュレータを使用していますか?ターゲットプラットフォーム(armeabi、x86など)がエミュレータデバイスに適合していますか?

+0

私は複数回エミュレータを再開し、自分のコンピュータを再起動してみました。私は物理的なデバイスでそれを実行しようとしていないが、プロジェクトはエミュレータ上で実行する必要があります。使用されているエミュレータは、Xamarin Android PlayerとGoogleエミュレータです。 Hyper-Vは自分のマシンでは動作しません。ターゲットプラットフォームが採用されています。 – meik99

+0

エミュレータとは?そしてあなたのアプリのアーキテクチャをサポートしているのは? – Zhyano

+0

すべてのアーキテクチャはサポートされているとマークされています。 メインエミュレータはXamarin Android PlayerのLollipop搭載Nexus 5です – meik99

関連する問題