无法在 Xamarin 中启动 Repl()
Cannot launch Repl() in Xamarin
我正在 Xamarin 上编写 UITests
我尝试启动 Repl window,但它没有启动。
我的代码:
using System;
using System.IO;
using System.Linq;
using NUnit.Framework;
using Xamarin.UITest;
using Xamarin.UITest.Android;
using Xamarin.UITest.Queries;
namespace MurakamiKiev.UITests
{
[TestFixture]
public class Tests
{
AndroidApp app;
[SetUp]
public void BeforeEachTest ()
{
app = ConfigureApp.Android.StartApp();
}
[Test]
public void ClickingButtonTwiceShouldChangeItsLabel ()
{
app.Repl();
}
}
}
这就是我尝试启动 Repl 的方式:
也就是我在控制台中的内容。
我的代码有什么问题??
我尝试了断点,但没有任何反应。
我试图更新参考文献,但没有帮助。
或者,如果问题不在代码中,我该如何启动 Repl window?
请帮助我,我写了 Xamarin 论坛,但没有答案。
更新
我尝试使用 Debug 和 x86
有这个错误
Severity Code Description Project File Line Suppression State
Error java.lang.OutOfMemoryError. Consider increasing the value of $(JavaMaximumHeapSize). Java ran out of memory while executing 'java.exe -jar C:\android-sdk\build-tools.0.1\lib\dx.jar --no-strict --dex --output=obj\x86\Debug\android\bin obj\x86\Debug\android\bin\classes "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v6.0\mono.android.jar" C:\Users\nemes\Documents\GitHub\Murakami_kiev\MurakamiKiev\obj\x86\Debug\__library_projects__\Square.OkHttp\library_project_imports\okhttp.jar C:\Users\nemes\Documents\GitHub\Murakami_kiev\MurakamiKiev\obj\x86\Debug\__library_projects__\Square.OkIO\library_project_imports\okio-1.6.0.jar C:\Users\nemes\Documents\GitHub\Murakami_kiev\MurakamiKiev\obj\x86\Debug\__library_projects__\Square.Picasso\library_project_imports\picasso-2.5.2.jar C:\Users\nemes\Documents\GitHub\Murakami_kiev\MurakamiKiev\obj\x86\Debug\__library_projects__\UrlImageViewHelper\library_project_imports\bin\classes.jar C:\Users\nemes\AppData\Local\Xamarin\Android.Support.Animated.Vector.Drawable.3.0.0\embedded\classes.jar C:\Users\nemes\AppData\Local\Xamarin\Android.Support.v4.3.0.0\embedded\classes.jar C:\Users\nemes\AppData\Local\Xamarin\Android.Support.v4.3.0.0\embedded\libs\internal_impl-23.3.0.jar C:\Users\nemes\AppData\Local\Xamarin\Android.Support.v7.AppCompat.3.0.0\embedded\classes.jar C:\Users\nemes\AppData\Local\Xamarin\Android.Support.v7.MediaRouter.3.0.0\embedded\classes.jar C:\Users\nemes\AppData\Local\Xamarin\Android.Support.v7.MediaRouter.3.0.0\embedded\libs\internal_impl-23.3.0.jar C:\Users\nemes\AppData\Local\Xamarin\Android.Support.Vector.Drawable.3.0.0\embedded\classes.jar C:\Users\nemes\AppData\Local\Xamarin\GooglePlayServices.Analytics.4.0\embedded\classes.jar C:\Users\nemes\AppData\Local\Xamarin\GooglePlayServices.Base.4.0\embedded\classes.jar C:\Users\nemes\AppData\Local\Xamarin\GooglePlayServices.Basement.4.0\embedded\classes.jar C:\Users\nemes\AppData\Local\Xamarin\GooglePlayServices.Maps.4.0\embedded\classes.jar' MurakamiKiev
我的堆大小设置为 1G
任何关于如何启动 Repl 的答案?????
考虑为初始化程序添加平台规范
[TestFixture(Platform.Android)]
public class Tests
{
IApp app;
Platform platform;
public Tests(Platform platform)
{
this.platform = platform;
}
[SetUp]
public void BeforeEachTest()
{
app = AppInitializer.StartApp(platform);
}
[Test]
public void AppLaunches()
{
app.Repl();
}
}
我还注意到您的项目处于发布模式 - 将其置于调试模式。
我正在 Xamarin 上编写 UITests
我尝试启动 Repl window,但它没有启动。
我的代码:
using System;
using System.IO;
using System.Linq;
using NUnit.Framework;
using Xamarin.UITest;
using Xamarin.UITest.Android;
using Xamarin.UITest.Queries;
namespace MurakamiKiev.UITests
{
[TestFixture]
public class Tests
{
AndroidApp app;
[SetUp]
public void BeforeEachTest ()
{
app = ConfigureApp.Android.StartApp();
}
[Test]
public void ClickingButtonTwiceShouldChangeItsLabel ()
{
app.Repl();
}
}
}
这就是我尝试启动 Repl 的方式:
也就是我在控制台中的内容。
我的代码有什么问题??
我尝试了断点,但没有任何反应。 我试图更新参考文献,但没有帮助。 或者,如果问题不在代码中,我该如何启动 Repl window?
请帮助我,我写了 Xamarin 论坛,但没有答案。
更新
我尝试使用 Debug 和 x86
有这个错误
Severity Code Description Project File Line Suppression State
Error java.lang.OutOfMemoryError. Consider increasing the value of $(JavaMaximumHeapSize). Java ran out of memory while executing 'java.exe -jar C:\android-sdk\build-tools.0.1\lib\dx.jar --no-strict --dex --output=obj\x86\Debug\android\bin obj\x86\Debug\android\bin\classes "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v6.0\mono.android.jar" C:\Users\nemes\Documents\GitHub\Murakami_kiev\MurakamiKiev\obj\x86\Debug\__library_projects__\Square.OkHttp\library_project_imports\okhttp.jar C:\Users\nemes\Documents\GitHub\Murakami_kiev\MurakamiKiev\obj\x86\Debug\__library_projects__\Square.OkIO\library_project_imports\okio-1.6.0.jar C:\Users\nemes\Documents\GitHub\Murakami_kiev\MurakamiKiev\obj\x86\Debug\__library_projects__\Square.Picasso\library_project_imports\picasso-2.5.2.jar C:\Users\nemes\Documents\GitHub\Murakami_kiev\MurakamiKiev\obj\x86\Debug\__library_projects__\UrlImageViewHelper\library_project_imports\bin\classes.jar C:\Users\nemes\AppData\Local\Xamarin\Android.Support.Animated.Vector.Drawable.3.0.0\embedded\classes.jar C:\Users\nemes\AppData\Local\Xamarin\Android.Support.v4.3.0.0\embedded\classes.jar C:\Users\nemes\AppData\Local\Xamarin\Android.Support.v4.3.0.0\embedded\libs\internal_impl-23.3.0.jar C:\Users\nemes\AppData\Local\Xamarin\Android.Support.v7.AppCompat.3.0.0\embedded\classes.jar C:\Users\nemes\AppData\Local\Xamarin\Android.Support.v7.MediaRouter.3.0.0\embedded\classes.jar C:\Users\nemes\AppData\Local\Xamarin\Android.Support.v7.MediaRouter.3.0.0\embedded\libs\internal_impl-23.3.0.jar C:\Users\nemes\AppData\Local\Xamarin\Android.Support.Vector.Drawable.3.0.0\embedded\classes.jar C:\Users\nemes\AppData\Local\Xamarin\GooglePlayServices.Analytics.4.0\embedded\classes.jar C:\Users\nemes\AppData\Local\Xamarin\GooglePlayServices.Base.4.0\embedded\classes.jar C:\Users\nemes\AppData\Local\Xamarin\GooglePlayServices.Basement.4.0\embedded\classes.jar C:\Users\nemes\AppData\Local\Xamarin\GooglePlayServices.Maps.4.0\embedded\classes.jar' MurakamiKiev
我的堆大小设置为 1G
任何关于如何启动 Repl 的答案?????
考虑为初始化程序添加平台规范
[TestFixture(Platform.Android)]
public class Tests
{
IApp app;
Platform platform;
public Tests(Platform platform)
{
this.platform = platform;
}
[SetUp]
public void BeforeEachTest()
{
app = AppInitializer.StartApp(platform);
}
[Test]
public void AppLaunches()
{
app.Repl();
}
}
我还注意到您的项目处于发布模式 - 将其置于调试模式。