﻿<?xml version="1.0" encoding="utf-8"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Intersoft Community - Crosslight - Crosslight Android SQLite Error</title><link>http://www.intersoftsolutions.com/Community/Crosslight/Crosslight-Android-SQLite-Error/</link><description /><generator>http://www.intersoftsolutions.com</generator><language>en</language><copyright>Copyright 2002 - 2015 Intersoft Solutions Corp. All rights reserved.</copyright><ttl>60</ttl><item><title>Crosslight Android SQLite Error</title><link>http://www.intersoftsolutions.com/Community/Crosslight/Crosslight-Android-SQLite-Error/</link><pubDate>Fri, 08 Apr 2016 03:56:31 GMT</pubDate><dc:creator>yudi</dc:creator><description>&lt;blockquote&gt;...&lt;p&gt;Would you recommend to do this (Ignore System.Core and mscorlib) in every project?&lt;/p&gt;&lt;p&gt;Almost every project uses LINQ ...&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;&lt;span style="color: #1f497d;"&gt;Yes, if that's the case, almost every project uses LINQ. You may ignore System.Core and mscorlib in every project.&lt;/span&gt;&lt;/p&gt;&lt;br&gt;&lt;blockquote&gt;&lt;p&gt;... and if I understand it right the only drawback of this, is the final size of the app package.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;span style="color: #1f497d;"&gt;I unarchived an apk (created using Crosslight with link skip to System.Core and mscorlib) to a directory and looked to the files in Windows Explorer. Here is the uncompressed size mscorlib and all System.xxx.dll:&lt;/span&gt;&lt;/p&gt;
&lt;ul style="color: #1f497d;"&gt;&lt;li&gt;mscorlib.dll (1.91 MB)&lt;/li&gt;&lt;li&gt;all System.xxx.dll (2.67 MB)&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;&lt;span style="color: #1f497d;"&gt;If you are concern to optimize the size of the compiled apk, you might want to try use linking: SDK Assemblies (or even All Assemblies), and go through the process of marking classes with the Android preserve attribute, [Android.Runtime.Preserve].&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #1f497d;"&gt;You can also create separate packages, one with armeabi only (for very old devices), one with armeabiv7a, and one with x86. Google play supports having 3 separate packages with different capabilities (don"t forget to change the capabilities in your manifest file for each package).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #1f497d;"&gt;Next, you can use ProGuard, an Android SDK tool used to create smaller applications by reducing the footprint of large included libraries (such as Google Play Services) in your APK. It removes unused Java bytecode, which makes the resulting app smaller.&lt;/span&gt;&lt;/p&gt;&lt;br&gt;
&lt;blockquote&gt;Are there other assemblies you would recommend to exclude from linker optimizations?&lt;/blockquote&gt;
&lt;p&gt;&lt;span style="color: #1f497d;"&gt;As far as I know, no other assemblies but System.Core and mscorlib.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #1f497d;"&gt;Hope this helps.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Crosslight Android SQLite Error</title><link>http://www.intersoftsolutions.com/Community/Crosslight/Crosslight-Android-SQLite-Error/</link><pubDate>Thu, 07 Apr 2016 13:33:49 GMT</pubDate><dc:creator>thomas.albert@tea-net.ch</dc:creator><description>&lt;p&gt;Hello Yudi,&lt;/p&gt;&lt;p&gt;just a final question about this topic.&lt;/p&gt;&lt;p&gt;Would you recommend to do this (Ignore System.Core and mscorlib) in every project?&lt;/p&gt;&lt;p&gt;Almost every project uses LINQ and if I understand it right the only drawback of this, is the final size of the app package.&lt;/p&gt;&lt;p&gt;Are there other assemblies you would recommend to exclude from linker optimizations?&lt;/p&gt;&lt;p&gt;Thanks,&lt;/p&gt;&lt;p&gt;Thomas&lt;br&gt;&lt;/p&gt;</description></item><item><title>Crosslight Android SQLite Error</title><link>http://www.intersoftsolutions.com/Community/Crosslight/Crosslight-Android-SQLite-Error/</link><pubDate>Thu, 07 Apr 2016 02:21:18 GMT</pubDate><dc:creator>yudi</dc:creator><description>&lt;blockquote&gt;I just did a quick test on one device, but it seems your solution solved the problem.&lt;/blockquote&gt;&lt;p&gt;&lt;span style="color: #1f497d;"&gt;Glad to know that my post helps.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #1f497d;"&gt;Should you need further assistance or run into any problems regarding our products, feel free to post it into our forum. We would be happy to assist you again.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Crosslight Android SQLite Error</title><link>http://www.intersoftsolutions.com/Community/Crosslight/Crosslight-Android-SQLite-Error/</link><pubDate>Wed, 06 Apr 2016 16:00:22 GMT</pubDate><dc:creator>thomas.albert@tea-net.ch</dc:creator><description>&lt;p&gt;Hello Yudi,&lt;/p&gt;&lt;p&gt;I just did a quick test on one device, but it seems your solution solved the problem.&lt;/p&gt;&lt;p&gt;Thank you for your quick support.&lt;/p&gt;&lt;p&gt;Thomas&lt;br&gt;&lt;/p&gt;</description></item><item><title>Crosslight Android SQLite Error</title><link>http://www.intersoftsolutions.com/Community/Crosslight/Crosslight-Android-SQLite-Error/</link><pubDate>Wed, 06 Apr 2016 07:49:40 GMT</pubDate><dc:creator>yudi</dc:creator><description>&lt;p&gt;&lt;span style="color: #1f497d;"&gt;Sorry for any inconvenience this problem may have caused you.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color: #1f497d;"&gt;When building production in both iOS and Android, Xamarin method of deployment for iOS and Android to reduce size of the apps is the recommended way to optimized your application. However, when the linker is enabled, it may cause unexpected errors when the app tries methods which may not be directly referenced by the application, such as LINQ expressions.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color: #1f497d;"&gt;The error, Unable to perform data operation due to an error: Sequence contains no matching element, happen because the LINQ is ignored. We need to tell the Android linker to include the System.Xml.Linq assembly (do not exclude that assembly).&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color: #1f497d;"&gt;Here's how to enable the LINQ expressions in the production build:&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color: #1f497d;"&gt;&lt;strong&gt;Visual Studio&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;ol style="color: #1f497d;"&gt;&lt;li&gt;Right-click your Android project and choose &lt;strong&gt;Properties&lt;/strong&gt;.&lt;br&gt;&lt;img src="http://intersoftsolutions.com/Community/Attachments/44684/vsstep1.png"&gt;&lt;br&gt;&lt;/li&gt;&lt;li&gt;Navigate to the &lt;strong&gt;Android Options&lt;/strong&gt; and select the &lt;strong&gt;Linker&lt;/strong&gt; tab.&lt;br&gt;&lt;img src="http://intersoftsolutions.com/Community/Attachments/44684/vsstep2.png" style="height: 440px; width: 513px;"&gt;&lt;br&gt;&lt;/li&gt;&lt;li&gt;Change the &lt;strong&gt;Linking&lt;/strong&gt; to &lt;strong&gt;Sdk Assemblies Only&lt;/strong&gt; then type this inside the &lt;strong&gt;Skip linking assemblies&lt;/strong&gt;: &lt;strong&gt;System.Core;mscorlib&lt;/strong&gt;.&lt;br&gt;&lt;img src="http://intersoftsolutions.com/Community/Attachments/44684/vsstep3.png"&gt;&lt;/li&gt;&lt;/ol&gt;&lt;br&gt;&lt;p&gt;&lt;span style="color: #1f497d;"&gt;&lt;strong&gt;Xamarin Studio&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;ol style="color: #1f497d;"&gt;&lt;li&gt;Double-click your Android project to open the &lt;strong&gt;Project Options&lt;/strong&gt; window.&lt;/li&gt;&lt;li&gt;Navigate to the &lt;strong&gt;Android Build&lt;/strong&gt; and select the &lt;strong&gt;Linker&lt;/strong&gt; tab.&lt;br&gt;&lt;img src="http://intersoftsolutions.com/Community/Attachments/44684/xsstep1.png" style="height: 431px; width: 586px"&gt;&lt;br&gt;&lt;/li&gt;&lt;li&gt;Change the &lt;strong&gt;Linker behavior&lt;/strong&gt; to &lt;strong&gt;Link SDK assemblies only&lt;/strong&gt; then type this inside the &lt;strong&gt;Ignore assemblies&lt;/strong&gt;: &lt;strong&gt;System.Core;mscorlib&lt;/strong&gt;.&lt;br&gt;&lt;img src="http://intersoftsolutions.com/Community/Attachments/44684/xsstep2.png" style="height: 431px; width: 586px"&gt;&lt;/li&gt;&lt;/ol&gt;&lt;br&gt;
&lt;p&gt;&lt;span style="color: #1f497d;"&gt;The changes have been applied to &lt;a href="http://git.intersoftpt.com/projects/CS/repos/app-simple-expense/browse" target="_blank"&gt;SimpleExpense sample&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #1f497d;"&gt;This should helps.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Crosslight Android SQLite Error</title><link>http://www.intersoftsolutions.com/Community/Crosslight/Crosslight-Android-SQLite-Error/</link><pubDate>Tue, 05 Apr 2016 15:55:42 GMT</pubDate><dc:creator>thomas.albert@tea-net.ch</dc:creator><description>&lt;p&gt;Hello Crosslight Support,&lt;/p&gt;&lt;p&gt;I created an app based on the Android expense tracker sample. When I debug the app it works fine. When I create an APK in Release config and install it manually on my devices (API 21, 19, 17) the app starts correctly. The initial page is the list of expenses. Here I receive the following error message:&lt;/p&gt;&lt;p&gt;Unable to perform data operation due to an error: Sequence contains no matching element&lt;/p&gt;&lt;p&gt;My expection was that it shows an empty list without error message. When I click OK on the message dialog, there is an empty list. Adding a new item shows no error message, but the list is still empty. The newly added item does not show up.&lt;/p&gt;&lt;p&gt;I will test this with the original expense tracker sample and update this blog post.&lt;/p&gt;&lt;p&gt;(Update: I tested the original expense tracker sample with Crosslight 5 (5.0.5000.603), switched to Release configuration and deployed the app to my device. When the initial view appears, I receive the same error message as mentoined above. Please, test and fix soon.)&lt;/p&gt;&lt;p&gt;I hope, I can reproduce the error with the original sample, because this is a real show stopper.&lt;/p&gt;&lt;p&gt;I used the latest update of Crosslight 5 (5.0.5000.603) and have the latest version of Xamarin for VS 2015.&lt;/p&gt;&lt;p&gt;Please, try to reproduce and fix soon.&lt;/p&gt;&lt;p&gt;Thanks,&lt;/p&gt;&lt;p&gt;Thomas&lt;br&gt;&lt;/p&gt;</description></item></channel></rss>