android,xamarin,mvvmcrossRelated issues-Collection of common programming errors
YS Bhai
java android ubuntu jvm heap
I want to increase my Heap size. How can I use JAVA_OPTS for doing so.I am getting the following error may be this is because of low heap sizeUNEXPECTED TOP-LEVEL ERROR: java.lang.OutOfMemoryError: Java heap spaceat java.util.Arrays.copyOfRange(Arrays.java:3209)at java.lang.String.<init>(String.java:215)at java.lang.StringBuilder.toString(StringBuilder.java:430)at com.android.dx.rop.type.Prototype.withFirstParameter(Prototype.java:370)at com.android.dx.rop.code.Rops.ropFor(Rops.java:1210)a
Gaurav Agarwal
android intellij-idea dependencies actionbarsherlock
I am using IntelliJ Idea CE (which is incredible) and have included ActionBar Sherlock as Library and added it as dependency in my Module (term used in IntelliJ). ActionBar Sherlock uses android-support-v4.jar and therefore it is not supposed to added as a dependency in my module(app).In case I add android-support-v4.jar as a dependency in my module I get an errorUNEXPECTED TOP-LEVEL EXCEPTION:and when I remove it IDE don’t recognize the classes in compatibility package and at times it compile t
Karanveer Singh Sodhi
android ios camera titanium titanium-mobile
I am using titanium sdk for mobile app development.I was just searching for any way that i can prevent the camera from saving the image. I dont want to save the image till a few steps down the line so that all the information has been verified. What i mean to say is that suppose after after clicking the image through the app if user selects the cancel button the image should not be present in the gallery.Functionality is needed both on IOS and android.Thanks a lot …
secureboot
android android-animation
I have a custom view group that I’m animating around on a screen based on touch events (drag and drop, for instance). I want it to be able to draw slightly outside its bounds, and still animate smoothly.I tried setting setLayerType(LAYER_TYPE_HARDWARE, null) on the dragging view, and performance was great, but anything outside the bounds was clipped.I tried setting LAYER_TYPE_NONE, performance was still fine, but there was animation ghosting/streaking where the view had been dragged (as if it we
user1324936
android gradle
I am using Android Studio 0.3.4 with Gradle build. I get this error message when I build my project:Gradle: Execution failed for task > Could not call IncrementalTask.taskAction() This is because google play services and GoogleAdMobAdsSdk-6.4.1 are conflictiing. My build.gradle has this entry:dependencies {compile ‘com.android.support:appcompat-v7:+’compile ‘com.android.support:support-v13:13.0.0’compile ‘com.google.android.gms:play-services:4.0.30’compile files(‘libs/GoogleAdMobAdsSdk-6.4.1.ja
Joey
android osx phonegap
I installed the all the recommended programs from PhoneGap’s Getting Started Guide and followed the various steps. I created the .bash_profile file and it looks like this:export PATH=${PATH}:/Development/android-sdk-mac/sdk/platform-tools:/Development/android-sdk-mac/sdk/toolsThe Development folder is located on my desktop. Upon navigating in terminal to my bin directory and creating a new PhoneGap project, i did like so:./create /Users/joey/PhoneGapExample nl.symvoli.phonegapExample PhoneGapDem
tiptopjat
java android xml rss xml-parsing
I have spent the day researching Android RSS Readers. I would like to parse a very simple XML file in my app. http://www.sportinglife.com/rss/transfer_wire.xmlThere are several threads on this site answering RSS questions, such as Simple RSS parser for Android. I have tried all the solutions in this but I keep getting errors in Eclipse when running the code.I have found a recent IBM Tutorial from April 2012, which explains the code very well and offers a solution in just one class file. http://w
A.Vila
android highcharts titanium
I’m trying to use Highcharts with Titanium. For this, I’ve created a webview and I load a local html. It works ok on ios but when I’ve tried it on Android, I have an unexpected behavior.This is my html file:<html><head><title>highChart</title><meta name=”viewport” content=”width=device-width, initial-scale=1.0″/><script src=”libs_highchart/jquery-1.10.1.js”></script><script src=”libs_highchart/highcharts.js.lib”></script></head><body
BeeTee2
java android xml performance
I have an Android app, and would like to get a specific value from an xml result set, that I am getting from a request to an api. I will be making multiple requests, and this is the only request that returns xml.Here is the xml result: https://mcxnow.com/orders?cur=WDCHow would I get the value of ‘Doc > History > O[0] > p’ as a string as efficiently as possible in Java for Android?I’ve looked at Sax XML parser but that seems like overkill. Is there anything really lightweight I should use? What
Simon Zettervall
android screen-orientation android-4.2
android:screenOrientation=”portrait” is ignored in Jellybean. If I turn the phone into landscape it will change orientation regardless. I have tried on several phones. Is there any new flag I have to use?
Aniket Sharma
azure monodroid xamarin azure-mobile-services
I was trying to use “InvokeApiAsync” methohd of Xamarin Azure Mobile Services Component 1.1.0 as mentioned below : var result = await _nativeClient.InvokeApiAsync (“insertsample”, HttpMethod.Post, null);I get an exception saying :{Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: O. Path ”, line 0, position 0. at Newtonsoft.Json.JsonTextReader.ParseValue () [0x00000] in <filename unknown>:0 at Newtonsoft.Json.JsonTextReader.ReadInte
William Jockusch
ios size xamarin uitabbar
I have the following code in the parent view:public override SizeF SizeThatFits(SizeF size) {UIView bar = this.tabBar;SizeF zero = new SizeF();SizeF r = bar.SizeThatFits(zero);Debug.WriteLine(“returning size ” + r.Width.ToString() + ” ” + r.Height.ToString());return r; }Here is the output:2013-12-07 10:45:27.719 GraCalcIOS[8138:a0b] returning size 0 49 [0:] returning size 0 49Just to make sure, I wrote the equivalent code directly into objective C, and the returned width is indeed 320. The heig
ScouseChris
android jni monodroid xamarin sigsegv
I’ve been trying to import a simple hello world NDK project into a monodroid project using Xamarin Studio.The NDK part of the project compiles and builds fine, I can invoke the native methods but when I try to access the JNIEnv the app crashes with a SIGSEGV, see below for console output and relevant code snips.Very basic console logging Starting method Accessing env Stacktrace:at <unknown> <0xffffffff>at (wrapper managed-to-native) BasicNDK.Activity1.LogNdk (string) <IL 0x00032,
Suchith
c# ios monotouch cross-platform xamarin
Can anybody tell me why am i getting this error during compile time.Error MT0000: Unexpected error – Please file a bug report athttp://bugzilla.xamarin.com (MT0000)I’m using Xamarin studio Version 4.2.3 (build 59) and Mono runtime,Mono 3.2.6 ((no/9b58377) GTK+ 2.24.23 theme: Raleigh GTK# (2.12.0.0) Package version: 302060000Apple Developer Tools Xcode 5.0 (3332.25) Build 5A1413I have made a hard Google but i could not resolve my problem. I have also seen this thread. Cleaning the project did n
user1051086
c# android xml xamarin
I have this Button inside a RelativeLayout which is included as part of a custom ListView row Layout.<Buttonp1:text=”Edit”p1:layout_width=”75dp”p1:layout_height=”wrap_content”p1:id=”@+id/editButton”p1:layout_centerHorizontal=”true”p1:background=”@drawable/btn_blue”p1:textColor=”@color/white”p1:focusable=”false”p1:layout_below=”@id/sparyTableLayout”p1:textAppearance=”?android:attr/textAppearanceMedium”p1:onClick=”myClickHandler” />When the user clicks the Button, I want the Button to call t
sprinter252
.net monotouch xamarin
After months of development I’ve stucked with a ridiculus problem. I want to know, what exact framework version of mt is installed on my machine or referenced in a project. If I typecat /Developer/MonoTouch/Versionon a MAC terminal, it will see7.0.4.209If I look into the result of var version = Assembly.GetExecutingAssembly().ImageRuntimeVersion;in my project I’ll get v2.0.50727This is the same version as some of my libs (for example System.Core).But isn’t a newer mt-Framework available? I even
Michael
android .net vb.net xamarin
Though it is far from my choice, I’m forced to work with some libraries that were written in VB.Net. One of these libraries has some DTOs I’m looking to reuse in a Xamarin.Android project I’m working on. I’ve included the references just fine, but when I attempt to build, I get the following error:Error 1 Exception while loading assemblies: System.IO.FileNotFoundException: Could not load assembly ‘Microsoft.VisualBasic, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’. Pe
It’sNotALie.
c# xamarin
Is there a more elegant way to change a single element in a View.Frame struct in Xamarin/C# without using one of the following patterns?var frame = View.Frame; frame.Y = 123; View.Frame = frame;orView.Frame = new RectangleF(View.Frame.X, 123, View.Frame.Width, View.Frame.Height);Simply changing the element like this: View.Frame.Y = 123; doesn’t have any effect. Only once the entire Frame struct is reassigned does it take effect.
jonathanpeppers
android .net monodroid xamarin java-binding
We are binding a Java library that has a method like this:void onDataReceived(java.lang.String fromNode, java.lang.String fromChannel, java.lang.String payloadType, byte[][] payload)Notice the byte[][] payload parameter.Everything compiles fine, except at runtime when the listener is fired from Java, we get the error:System.NotSupportedException: Rectangular arrays are not currently supported.Is this currently supported in Mono for Android binding projects?Is there a different type we could use
Stuart
mvvm monotouch xamarin mvvmcross
I have a view in iOS that needs to be displayed in two modes, one with a close button in the navigation header and one without a close button. I added a bool in my viewmodel to handle this. However, a UIBarButtonItem does not have a Hidden property to bind to this bool in my viewmodel. Any suggestions on how to address this problem? NOTE: I do NOT need to change the visibility of this close button at runtime. This is just an initial read-only setting I need before the view is displayed.
Luigi Saggese
ios uitableview monotouch core-animation mvvmcross
I have my ViewModel with an ObservableCollectionprivate ObservableCollection<ObjectView> _elementList; public ObservableCollection<ObjectView> ElementList {get { return _elementList; }set { _elementList = value; RaisePropertyChanged(“ElementList”); } }that is bind via an async thread when from TableView it’s called a ReloadData (that is to have an endlessscroll on my TableView). I have noticed this error (that some time, not always, make it crash my app):Feb 28 10:14:25 iPhone-di-Lui
Uros
android binding mvvmcross
This post is based on a previous question I posted on stackoverflow. I found the solution to my problem, but I am posting this question becouse I suspect this is a bug in the MvvmCross platform. The question can be found on: Custom ToggleButton in Xamarin.Android. To replicate the behavior follow this steps:Extend the ToggleButton(I found this issue with toggle button but I guess it is the same with other UI elements) and create the listener for the click event:public sealed class MyToggleButton
Stuart
sqlite monotouch mvvmcross sqlite-net
I am implementing the excellent mvvmcross library in a multiplatform enterprise application. The monodroid sqlite plugin is working – I now need to implement monotouch functionality though. I was interested if anyone had developed an accompanying sqlite plugin for the ios/monotouch platform and describing the complexity involved and path taken, stumbling blocks etc. Cheers
Roman Kagan
mvvmcross
In order to find walk-around for absence RelativeSource in MvvmCross, I used Stuart’s suggestion and implemented WrappingList MVVMCross changing ViewModel within a MvxBindableListViewHowever, I see this trace every bind it happens and I wonder, how worse it is:Binding to IEnumerable rather than IList – this can be inefficient,especially for large listsMaybe there are any other suggestions?public class WrappingCommandsList<T> : IList<WrappingCommandsList<T>.Wrapped> {private rea
Stuart
mvvm monotouch xamarin mvvmcross
I have a view in iOS that needs to be displayed in two modes, one with a close button in the navigation header and one without a close button. I added a bool in my viewmodel to handle this. However, a UIBarButtonItem does not have a Hidden property to bind to this bool in my viewmodel. Any suggestions on how to address this problem? NOTE: I do NOT need to change the visibility of this close button at runtime. This is just an initial read-only setting I need before the view is displayed.
Mech0z
windows-phone-7 mvvmcross
I have a command on a ViewModel which I use to navigate to a details page public class InstalledMetersListViewModel : MvxViewModel, IMvxServiceConsumer<IInstallMeterRepository> {public List<InstalledMeterListItemViewModel> List { get; set; } public InstalledMetersListViewModel(){List = new List<InstalledMeterListItemViewModel>();foreach (var meter in this.GetService<IInstallMeterRepository>().GetInstalledMeters()){List.Add(new InstalledMeterListItemViewModel { Serial = me
Jacco
sqlite monotouch mvvmcross mvvmcross-community
In my application I was using the old SQLite-plugin. Since MVVMCross 3.0.14 this version is deprecated and the Community.Sqlite plugin is advised.The Community plugin was added via Nuget.When trying to use the plugin without a bootstrapper, at runtime I get the error:Failed to resolve parameter for parameter connectionFactory of type ISQLiteConnectionFactory when creating…When trying to use the plugin with a bootstrapper, also at runtime, I get the error:plugin not registered for type Cirrious
Indrek Kõue
c# android monodroid mvvmcross
Binding a boolean (HasLiked) to Pressed from viewmodel results in error:Failed to create target binding for from HasLiked to PressedDoes it mean that android View.Pressed (and other states) bindings by MvxBind aren’t supported by default? Do i need to write custom bindings?EDIT- binding:<RelativeLayoutstyle=”@style/ButtonExtraSocial”android:background=”@drawable/SelectorButtonExtra”app:MvxBind=”Click LikeCommand; Pressed HasLiked”> …. </RelativeLayout>HasLiked boolean exist in view
Paulo Dias
monotouch mvvmcross
When i try to deploy my solution from Visual Studio 2012 to a ipad Device or simulator, all PCL projects are giving error like:MT0011:Cirrious.CrossCore.dll was built against a more recent runtime (NET_4_0) than MonoTouch supports.I tried to do Clean and Rebuild all solution with success. My Xamarin.iOS version is 1.1.200 (stable).My MonoTouch.xml file in C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETPortable\v4.0\Profile\Profile104\SupportedFrameworks: <?xml version=”1
Ryan Langton
android xamarin mvvmcross
This is a xamarin android application using MvvmCross. As soon as I uncheck “Use Shared Runtime” for my Release build, I get an error when trying to run the application. I think MvvmCross is missing something in it’s container, but not sure how to find out what. Here is the error:Loaded assembly: Mono.Android.Support.v4.dll [External] Loaded assembly: Mono.Android.dll [External] Loaded assembly: System.Core.dll [External] Loaded assembly: MonoDroidConstructors [External] 07-29 15:07:02.034 D/
Web site is in building