我不能为我的生活找到解决方案!我正在使用Swift.我突然得到这个错误:
Undefined symbols for architecture i386:
"_main", referenced from:
implicit entry/start for main executable
ld: symbol(s) not found for architecture i386
Run Code Online (Sandbox Code Playgroud)
无论我试图运行什么模拟器/设备,我仍然得到它:
Undefined symbols for architecture x86_64:
"_main", referenced from:
implicit entry/start for main executable
ld: symbol(s) not found for architecture x86_64
Run Code Online (Sandbox Code Playgroud)
这是什么?!我几乎删除了项目中的所有内容.即所有框架和一切.它还在那里.
请帮我
我刚升级到Xamarin studio 5.9(build 431),不能再运行我的项目了.它适用于一个干净的项目.
当我运行我的应用程序时,我甚至没有登陆Main.
Xamarin工作室中的应用程序输出打印了一堆装配.它到达MobileClientiOS.app/Newtonsoft.Json.dll [External],然后崩溃与以下输出:
无法加载文件或程序集"System.Threading.Tasks"或其依赖项之一.该系统找不到指定的文件.(System.IO.FileNotFoundException)在System.AppDomain.Load(System.Reflection.AssemblyName assemblyRef,System.Security.Policy.Evidence assemblySecurity)[0x00081]在... /单声道/ MCS /类/ corlib /系统/应用程序域. cs:706中的System.AppDomain.Load(System.Reflection.AssemblyName assemblyRef)[0x00000]位于.../mono/mcs/class/corlib/System/AppDomain.cs:674 at System.Reflection.Assembly.Load(System .Reflection.AssemblyName assemblyRef)[0x00000]在... /单声道/ MCS /类/ corlib /的System.Reflection/Assembly.cs:551在ObjCRuntime.Runtime.CollectReferencedAssemblies(System.Collections.Generic.List 1个组件,系统. Reflection.Assembly组件)[0x00019]在.../maccore/SRC/ObjCRuntime/Runtime.cs:在ObjCRuntime.Runtime.CollectReferencedAssemblies(System.Collections.Generic.List 1个组件,System.Reflection.Assembly组件)218 [0x0002c ]在.../maccore/src/ObjCRuntime/Runtime.cs:220 at ObjCRuntime.Runtime.CollectReferencedAssemblies(System.Collections.Generic.List 1 assemblies,System.Reflection).Assembly组件)[0x0002c]在.../maccore/SRC/ObjCRuntime/Runtime.cs:220在ObjCRuntime.Runtime.RegisterEntryAssembly(System.Reflection.Assembly entry_assembly)[0x0001b]在.../maccore/SRC/ObjCRuntime /Runtime.cs:200在ObjCRuntime.Runtime.RegisterEntryAssembly(IntPtr的一个)[0x00000]在.../maccore/SRC/ObjCRuntime/Runtime.cs:158在ObjCRuntime.Runtime.register_entry_assembly(IntPtr的组件)[0x00000]英寸../maccore/runtime/Delegates.generated.cs:118 at(wrapper native-to-managed)ObjCRuntime.Runtime:register_entry_assembly(intptr)2015-05-04
MobileClientiOS [77830:1943120] critical:执行本机代码时获得SIGABRT.这通常表示单声道运行时或应用程序使用的本机库之一出现致命错误.
很抱歉长堆栈跟踪,但我没有想法.我们正在使用PCL,但在此Xamarin Studio升级之前没有出现过问题.
谢谢!
编辑:我降级了Xamarin.iOS并重新开始工作.它似乎失败的程序集(现在适用于旧版本):
/MobileClientiOS.app/System.Xml.Linq.dll [外部]
如何能够运行最新版本?我不知道.
我有一个带按钮的自定义ViewCell.当我单击此按钮时,我想在ContentPage中处理此单击,该页面显示带有ViewCells的ListView.在iOS中,我会使用Cell的委托来完成此操作.我将如何在C#/ Xamarin.Forms中执行此操作?
这是我的自定义ViewCell:
public CustomCell ()
{
button = new Button ();
button.Text = "Add";
button.VerticalOptions = LayoutOptions.Center;
button.Clicked += [WHAT DO DO HERE???];
var nameLabel = new Label ();
nameLabel.SetBinding (Label.TextProperty, "name");
nameLabel.HorizontalOptions = LayoutOptions.FillAndExpand;
nameLabel.VerticalOptions = LayoutOptions.Center;
var viewLayout = new StackLayout () {
Padding = new Thickness (10, 0, 10, 0),
Orientation = StackOrientation.Horizontal,
Children = { nameLabel, button }
};
View = viewLayout;
}
Run Code Online (Sandbox Code Playgroud)
我将其用作ViewCell的ContentPage如下所示:
ListView.ItemTemplate = new DataTemplate (typeof(CustomCell));
Run Code Online (Sandbox Code Playgroud)
那么,我如何抓住按钮按下?
请询问您是否需要澄清.
好的,所以我至少得到了这个:
这是我的ContentPage:
...
ListView.ItemTemplate …Run Code Online (Sandbox Code Playgroud) 我正在使用coredata所以我需要为我的实体排序描述符
例如,Coordinate-entity具有此类func:
class func sortDescriptors() -> Array<NSSortDescriptor>
{
return [NSSortDescriptor(key: "sequence", ascending: true)]
}
Run Code Online (Sandbox Code Playgroud)
我在对CoreData执行获取请求时使用此方法,如下所示:
var request = NSFetchRequest(entityName: entityName)
request.sortDescriptors = T.sortDescriptors()
Run Code Online (Sandbox Code Playgroud)
但是,当我有一个坐标数组作为另一个coredata对象的属性时,这是一个NSSet(即未分类)
为了解决这个问题,我将返回如下坐标:
return NSArray(array: coordinates!).sortedArrayUsingDescriptors(Coordinate.sortDescriptors()) as? Array<Coordinate>
Run Code Online (Sandbox Code Playgroud)
感觉很丑,使用NSArray只是为了获得sortedArrayUsingDescriptors方法.是否有类似的方法直接在Swift数组上执行此操作,即Array<Coordinate>使用排序描述符?
谢谢!
我是xaml中绑定的新手,我有时候真的不明白.
我在我的xaml中有这个:
<ActivityIndicator IsRunning="{Binding IsLoading}" IsVisible="{Binding IsLoading}" />
Run Code Online (Sandbox Code Playgroud)
绑定"IsLoading".我在哪里声明/设置这个属性?!
我的.cs看起来像这样:
....
public bool IsLoading;
public CardsListXaml ()
{
InitializeComponent ();
IsLoading = true;
....
Run Code Online (Sandbox Code Playgroud) 尝试从应用商店中的应用程序下载dSYM文件时出错.我正在点击Xcode的"Organizer"中的"Download dSYM".(见下图)
我得到的错误如下:
您的用户帐户已连接到多个iTunes提供商.登录前为每个提供商创建单独的帐户.
我最近被添加到我的客户iTunes连接帐户与我的苹果ID.这与我用于私人开发的苹果ID相同,我尝试下载dSYM的应用程序是通过我的私人帐户上传的.
如何解决这个问题?
我正在尝试将我的Android项目迁移到OkHttp.
我想知道的是,如果OkHttp将POST使用gzip 压缩我的请求的主体?
我正在使用它(从主页上的示例):
RequestBody body = RequestBody.create(JSON, json);
Request request = new Request.Builder()
.url(url)
.post(body)
.build();
Run Code Online (Sandbox Code Playgroud)
RequestBody如果json"足够大",它是否真的会对json进行gzip,或者我是否需要手动执行此操作?像我之前做过的AndroidHttpClient那样:
AndroidHttpClient.getCompressedEntity(json, context.getContentResolver())
Run Code Online (Sandbox Code Playgroud)
如果我需要手动完成,最好的方法是什么?
谢谢!
我想将一个segue从我的viewcontroller拖到自己身上.所以我可以推动那个特定视图控制器的"无限"实例.
我知道如何在代码中执行此操作(即以编程方式实现视图控制器).但是,我想尽可能使用segues.
我在故事板中找到了一些"黑客"来制作自我,但我不喜欢黑客,所以我的问题是;
是否有一种干净的方式让故事板中的自我回归?我不想从按钮等拖动它,我只想要一个我可以使用的通用segue:
[self performSegueWithIdentifier:@"segueIdentifier"]
Run Code Online (Sandbox Code Playgroud)
谢谢.
我是Xamarin.Forms和绑定概念的新手.有人可以告诉我为什么这不起作用?当我按下按钮时,对象本身的名称正在改变.为什么Text-property不会更新?
var red = new Label
{
Text = todoItem.Name,
BackgroundColor = Color.Red,
Font = Font.SystemFontOfSize (20)
};
red.SetBinding (Label.TextProperty, "Name");
Button button = new Button
{
Text = String.Format("Tap for name change!")
};
button.Clicked += (sender, args) =>
{
_todoItem.Name = "Namie " + new Random().NextDouble();
};
Run Code Online (Sandbox Code Playgroud)
todoItem是下面类的对象.通知本身有效,我几乎是积极的.我想我的绑定有问题,或者我错过了这个概念.
public class TodoItem : INotifyPropertyChanged
{
public event PropertyChangedEventHandler PropertyChanged;
string _name;
public string Name
{
get { return _name; }
set
{
if (value.Equals(_name, StringComparison.Ordinal))
{
// Nothing to do …Run Code Online (Sandbox Code Playgroud) 应用程序商店中的当前应用程序如何在iPhone X上扩展?即不使用SDK 11/Xcode9重建它们.
我能为iPhone X考虑的唯一现实选择是不会使用全屏?即与iPhone 6和7相同的宽高比.当iPhone 6问世时,应用程序商店中的未更新应用程序被拉伸/放大,与iPhone 5具有相同的宽高比.
是什么让我觉得iPhone X + SDK10的某种"缩小区域"是,几乎所有appstore中的应用程序都会或多或少地破坏iPhone X.应用程序的应用程序不会在之前使用SDK11更新iPhone X发布日期.
为了澄清,我不会询问使用xcode9/SDK11重建时应用程序的外观.我想知道应用程序的行为如何不重建它们!