I have builded a simple "Hello World" app with Visual Studio 2012 and mono for Android. The problem is that the app works fine in Samsung Galaxy S3 and LG Optymus L2, but it crashes without any reason at opening in Galaxy S3 mini. All the phone uses the same Android version, 4.1.2. I do not know where can be the problem. This is the code, is the "Hello World" generated by Visual Studio:
using System;
using Android.App;
using Android.Content;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using Android.OS;
namespace HelloWorld
{
[Activity(Label = "HelloWorld", MainLauncher = true, Icon = "@drawable/icon")]
public class Activity1 : Activity
{
int count = 1;
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
SetContentView(Resource.Layout.Main);
Button button = FindViewById<Button>(Resource.Id.MyButton);
button.Click += delegate { button.Text = string.Format("{0} clicks!", count++); };
}
}
}
Android Log when compiling:
Loaded assembly: HelloWorld.dll
Loaded assembly: Mono.Android.dll [External]
Loaded assembly: System.Core.dll [External]
10-29 12:35:30.913 E/Trace ( 5848): error opening trace file: No such file or directory (2)
10-29 12:35:30.941 V/ActivityThread( 5848): Class path: /data/app /HelloWorld.HelloWorld-1.apk, JNI path: /data/data/HelloWorld.HelloWorld/lib
10-29 12:35:30.945 I/ActivityThread( 5848): Pub HelloWorld.HelloWorld.mono.MonoRuntimeProvider.__mono_init__: mono.MonoRuntimeProvider
10-29 12:35:30.946 D/dalvikvm( 5848): Trying to load lib /data/data/HelloWorld.HelloWorld/lib/libmonodroid.so 0x422857b0
10-29 12:35:30.951 D/dalvikvm( 5848): Added shared lib /data/data/HelloWorld.HelloWorld /lib/libmonodroid.so 0x422857b0
10-29 12:35:30.952 W/MonoDroid-Debugger( 5848): Trying to initialize the debugger with options: --debugger-
agent=transport=dt_socket,loglevel=0,address=127.0.0.1:8889,server=y,embedding=1
10-29 12:35:31.062 W/MonoDroid-Debugger( 5848): Accepted stdout connection: 42
10-29 12:35:32.136 W/monodroid-gc( 5848): GREF GC Threshold: 46800
Loaded assembly: MonoDroidConstructors [External]
10-29 12:35:33.296 I/SurfaceTextureClient( 5848): [void android::SurfaceTextureClient::init()] debug.stc.fps: 3000 ms
10-29 12:35:33.300 D/libEGL ( 5848): loaded /vendor/lib/egl/libEGL_mtk.so
10-29 12:35:33.304 D/libEGL ( 5848): loaded /vendor/lib/egl/libGLESv1_CM_mtk.so
10-29 12:35:33.310 D/libEGL ( 5848): loaded /vendor/lib/egl/libGLESv2_mtk.so
10-29 12:35:33.342 E/MMUMapper( 5848): fail to register MVA, unsupported format(0x5)
10-29 12:35:33.343 D/OpenGLRenderer( 5848): Enabling debug mode 0
10-29 12:35:33.396 E/MMUMapper( 5848): fail to register MVA, unsupported format(0x5)
10-29 12:35:37.452 D/VelocityTracker( 5848): Couldn't open '/dev/touch' (No such file or directory)
10-29 12:35:37.461 D/VelocityTracker( 5848): tpd read x fail: Bad file number
10-29 12:35:37.462 D/VelocityTracker( 5848): tpd read y fail: Bad file number
10-29 12:35:37.474 I/SurfaceTextureClient( 5848): [0x53cf7038] frames:2, duration:4.086000, fps:0.489472
10-29 12:35:37.482 E/MMUMapper( 5848): fail to register MVA, unsupported format(0x5)
10-29 12:35:37.490 V/Provider/Setting( 5848): invalidate [system]: current 58 != cached 0
10-29 12:35:37.492 V/Provider/Setting( 5848): from db cache, name = sound_effects_enabled value = 1
10-29 12:35:37.743 V/Provider/Setting( 5848): from settings cache , name = sound_effects_enabled value = 1
10-29 12:35:38.147 V/Provider/Setting( 5848): from settings cache , name = sound_effects_enabled value = 1
Anybody has any idea what could be?
Thanks