iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
Hello Crosslight Support,
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:
Unable to perform data operation due to an error: Sequence contains no matching element
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.
I will test this with the original expense tracker sample and update this blog post.
(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.)
I hope, I can reproduce the error with the original sample, because this is a real show stopper.
I used the latest update of Crosslight 5 (5.0.5000.603) and have the latest version of Xamarin for VS 2015.
Please, try to reproduce and fix soon.
Thanks,
Thomas
I just did a quick test on one device, but it seems your solution solved the problem.
Glad to know that my post helps.
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.
Sorry for any inconvenience this problem may have caused you.
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.
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).
Here's how to enable the LINQ expressions in the production build:
Visual Studio
Xamarin Studio
The changes have been applied to SimpleExpense sample.
This should helps.
Hello Yudi,
Thank you for your quick support.
just a final question about this topic.
Would you recommend to do this (Ignore System.Core and mscorlib) in every project?
Almost every project uses LINQ and if I understand it right the only drawback of this, is the final size of the app package.
Are there other assemblies you would recommend to exclude from linker optimizations?
...Would you recommend to do this (Ignore System.Core and mscorlib) in every project?Almost every project uses LINQ ...
Almost every project uses LINQ ...
Yes, if that's the case, almost every project uses LINQ. You may ignore System.Core and mscorlib in every project.
... and if I understand it right the only drawback of this, is the final size of the app package.
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:
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].
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).
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.
As far as I know, no other assemblies but System.Core and mscorlib.
Hope this helps.
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname