Are the androidx libraries available in Visual Studio's NuGet package manager?
My app is targeting Android P so I can use the androidx libraries in Android Studio but I can't find them in NuGet.
With Android Studio I can use:
<androidx.constraintlayout.widget.ConstraintLayout
but throws exception in Visual Studio:
02-09 21:31:59.970 I/MonoDroid( 8843): UNHANDLED EXCEPTION:
02-09 21:32:00.137 I/MonoDroid( 8843): Android.Views.InflateException: Binary XML file line #1: Binary XML file line #1: Error inflating class androidx.constraintlayout.widget.ConstraintLayout ---> Android.Views.InflateException: Binary XML file line #1: Error inflating class androidx.constraintlayout.widget.ConstraintLayout ---> Java.Lang.ClassNotFoundException: Didn't find class "androidx.constraintlayout.widget.ConstraintLayout" on path: DexPathList[[zip file "/data/app/Keystore.Keystore-aaHeQkjsNRoUnkfPmnf7Tw==/base.apk"],nativeLibraryDirectories=[/data/app/Keystore.Keystore-aaHeQkjsNRoUnkfPmnf7Tw==/lib/x86, /data/app/Keystore.Keystore-aaHeQkjsNRoUnkfPmnf7Tw==/base.apk!/lib/x86, /system/lib]]
02-09 21:32:00.137 I/MonoDroid( 8843): --- End of inner exception stack trace ---
02-09 21:32:00.137 I/MonoDroid( 8843): --- End of inner exception stack trace ---
02-09 21:32:00.137 I/MonoDroid( 8843): at Java.Interop.JniEnvironment+InstanceMethods.CallNonvirtualVoidMethod (Java.Interop.JniObjectReference instance, Java.Interop.JniObjectReference type, Java.Interop.JniMethodInfo method, Java.Interop.JniArgumentValue* args) [0x00089] in <8acc8089c2ed40d08469fbaa6710a44c>:0
02-09 21:32:00.137 I/MonoDroid( 8843): at Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeVirtualVoidMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) [0x0005d] in <8acc8089c2ed40d08469fbaa6710a44c>:0
02-09 21:32:00.137 I/MonoDroid( 8843): at Android.App.Activity.SetContentView (System.Int32 layoutResID) [0x00022] in <957bbfdfda4341e2939c881206c1140a>:0
02-09 21:32:00.137 I/MonoDroid( 8843): at Keystore.MainActivity.OnCreate (Android.OS.Bundle savedInstanceState) [0x00009] in H:\My Projects\Android\Samples\Keystore\MainActivity.cs:19
02-09 21:32:00.137 I/MonoDroid( 8843): at Android.App.Activity.n_OnCreate_Landroid_os_Bundle_ (System.IntPtr jnienv, System.IntPtr native__this, System.IntPtr native_savedInstanceState) [0x00011] in <957bbfdfda4341e2939c881206c1140a>:0
02-09 21:32:00.138 I/MonoDroid( 8843): at (wrapper dynamic-method) System.Object.3(intptr,intptr,intptr)
02-09 21:32:00.138 I/MonoDroid( 8843): --- End of managed Android.Views.InflateException stack trace ---
02-09 21:32:00.138 I/MonoDroid( 8843): android.view.InflateException: Binary XML file line #1: Binary XML file line #1: Error inflating class androidx.constraintlayout.widget.ConstraintLayout
02-09 21:32:00.138 I/MonoDroid( 8843): Caused by: android.view.InflateException: Binary XML file line #1: Error inflating class androidx.constraintlayout.widget.ConstraintLayout
02-09 21:32:00.138 I/MonoDroid( 8843): Caused by: java.lang.ClassNotFoundException: Didn't find class "androidx.constraintlayout.widget.ConstraintLayout" on path: DexPathList[[zip file "/data/app/Keystore.Keystore-aaHeQkjsNRoUnkfPmnf7Tw==/base.apk"],nativeLibraryDirectories=[/data/app/Keystore.Keystore-aaHeQkjsNRoUnkfPmnf7Tw==/lib/x86, /data/app/Keystore.Keystore-aaHeQkjsNRoUnkfPmnf7Tw==/base.apk!/lib/x86, /system/lib]]
02-09 21:32:00.138 I/MonoDroid( 8843): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134)
02-09 21:32:00.138 I/MonoDroid( 8843): at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
02-09 21:32:00.138 I/MonoDroid( 8843): at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
02-09 21:32:00.138 I/MonoDroid( 8843): at android.view.LayoutInflater.createView(LayoutInflater.java:606)
02-09 21:32:00.138 I/MonoDroid( 8843): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:790)
02-09 21:32:00.138 I/MonoDroid( 8843): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:730)
02-09 21:32:00.138 I/MonoDroid( 8843): at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
02-09 21:32:00.138 I/MonoDroid( 8843): at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
02-09 21:32:00.138 I/MonoDroid( 8843): at android.view.LayoutInflater.inflate(LayoutInflater.java:374)
02-09 21:32:00.138 I/MonoDroid( 8843): at android.support.v7.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:469)
02-09 21:32:00.138 I/MonoDroid( 8843): at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140)
02-09 21:32:00.138 I/MonoDroid( 8843): at md561c0eefc2ba1e38323457d81b00d3caf.MainActivity.n_onCreate(Native Method)
02-09 21:32:00.138 I/MonoDroid( 8843): at md561c0eefc2ba1e38323457d81b00d3caf.MainActivity.onCreate(MainActivity.java:31)
02-09 21:32:00.138 I/MonoDroid( 8843): at android.app.Activity.performCreate(Activity.java:7136)
02-09 21:32:00.138 I/MonoDroid( 8843): at android.app.Activity.performCreate(Activity.java:7127)
02-09 21:32:00.138 I/MonoDroid( 8843): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1271)
02-09 21:32:00.138 I/MonoDroid( 8843): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2893)
02-09 21:32:00.138 I/MonoDroid( 8843): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3048)
02-09 21:32:00.138 I/MonoDroid( 8843): at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
02-09 21:32:00.139 I/MonoDroid( 8843): at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
02-09 21:32:00.139 I/MonoDroid( 8843): at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
02-09 21:32:00.139 I/MonoDroid( 8843): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1808)
02-09 21:32:00.139 I/MonoDroid( 8843): at android.os.Handler.dispatchMessage(Handler.java:106)
02-09 21:32:00.139 I/MonoDroid( 8843): at android.os.Looper.loop(Looper.java:193)
02-09 21:32:00.139 I/MonoDroid( 8843): at android.app.ActivityThread.main(ActivityThread.java:6669)
02-09 21:32:00.139 I/MonoDroid( 8843): at java.lang.reflect.Method.invoke(Native Method)
02-09 21:32:00.139 I/MonoDroid( 8843): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
02-09 21:32:00.139 I/MonoDroid( 8843): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
So is there a way to use the androidx libraries with Xamarin.Android?
The reason you cannot find it is because you must not have its NuGet
We need to add Xamarin.Android.Support.Constraint.Layout package to support ConstraintLayout in our Xamarin.Android project. So to add this package right click on
Packages > Add Packages. //MAC
References -> Manage NuGet Packages //Windows
Search for ConstraintLayout and add a package by accepting a licence.
And use the following namespace <android.support.constraint.ConstraintLayout> in XML
Update
In my knowledge <androidx.constraintlayout.widget.ConstraintLayout is unavailable in Mono.Droid and hence you might have to bind it to an AAR and then use that AAR to make a Xamarin Binding fix the issues that happen while making that binding and then use it into your Droid project as a .dll
So, it is finally available https://devblogs.microsoft.com/xamarin/androidx-for-xamarin/
The NuGet list is here.
Related
I renamed my Project in eclipse I tried to run my app on my device. but ever since I am getting Unfortunately, App has stopped. I manually edited the AndroidManifest.xml to check if the file paths are correct as AndroidManifest doesn't seem to reflect the changes after renaming project, I would be grateful if you help. Here is the logcat
02-09 11:38:43.872: D/AndroidRuntime(26838): Shutting down VM
02-09 11:38:43.880: E/AndroidRuntime(26838): FATAL EXCEPTION: main
02-09 11:38:43.880: E/AndroidRuntime(26838): Process: com.ummahtalk.community, PID: 26838
02-09 11:38:43.880: E/AndroidRuntime(26838): java.lang.RuntimeException: Unable to instantiate application com.ummahtalk.community.SpikaApp: java.lang.ClassNotFoundException: Didn't find class "com.ummahtalk.community.SpikaApp" on path: DexPathList[[zip file "/data/app/com.ummahtalk.community-1/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
02-09 11:38:43.880: E/AndroidRuntime(26838): at android.app.LoadedApk.makeApplication(LoadedApk.java:563)
02-09 11:38:43.880: E/AndroidRuntime(26838): at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4491)
02-09 11:38:43.880: E/AndroidRuntime(26838): at android.app.ActivityThread.access$1500(ActivityThread.java:144)
02-09 11:38:43.880: E/AndroidRuntime(26838): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1339)
02-09 11:38:43.880: E/AndroidRuntime(26838): at android.os.Handler.dispatchMessage(Handler.java:102)
02-09 11:38:43.880: E/AndroidRuntime(26838): at android.os.Looper.loop(Looper.java:135)
02-09 11:38:43.880: E/AndroidRuntime(26838): at android.app.ActivityThread.main(ActivityThread.java:5221)
02-09 11:38:43.880: E/AndroidRuntime(26838): at java.lang.reflect.Method.invoke(Native Method)
02-09 11:38:43.880: E/AndroidRuntime(26838): at java.lang.reflect.Method.invoke(Method.java:372)
02-09 11:38:43.880: E/AndroidRuntime(26838): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
02-09 11:38:43.880: E/AndroidRuntime(26838): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
02-09 11:38:43.880: E/AndroidRuntime(26838): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.ummahtalk.community.SpikaApp" on path: DexPathList[[zip file "/data/app/com.ummahtalk.community-1/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
02-09 11:38:43.880: E/AndroidRuntime(26838): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
02-09 11:38:43.880: E/AndroidRuntime(26838): at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
02-09 11:38:43.880: E/AndroidRuntime(26838): at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
02-09 11:38:43.880: E/AndroidRuntime(26838): at android.app.Instrumentation.newApplication(Instrumentation.java:979)
02-09 11:38:43.880: E/AndroidRuntime(26838): at android.app.LoadedApk.makeApplication(LoadedApk.java:558)
02-09 11:38:43.880: E/AndroidRuntime(26838): ... 10 more
02-09 11:38:43.880: E/AndroidRuntime(26838): Suppressed: java.lang.ClassNotFoundException: com.ummahtalk.community.SpikaApp
02-09 11:38:43.880: E/AndroidRuntime(26838): at java.lang.Class.classForName(Native Method)
02-09 11:38:43.880: E/AndroidRuntime(26838): at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
02-09 11:38:43.880: E/AndroidRuntime(26838): at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
02-09 11:38:43.880: E/AndroidRuntime(26838): at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
02-09 11:38:43.880: E/AndroidRuntime(26838): ... 13 more
02-09 11:38:43.880: E/AndroidRuntime(26838): Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available
02-09 11:38:53.991: D/AndroidRuntime(27142): Shutting down VM
02-09 11:38:53.993: E/AndroidRuntime(27142): FATAL EXCEPTION: main
02-09 11:38:53.993: E/AndroidRuntime(27142): Process: com.ummahtalk.community, PID: 27142
02-09 11:38:53.993: E/AndroidRuntime(27142): java.lang.RuntimeException: Unable to instantiate application com.ummahtalk.community.SpikaApp: java.lang.ClassNotFoundException: Didn't find class "com.ummahtalk.community.SpikaApp" on path: DexPathList[[zip file "/data/app/com.ummahtalk.community-1/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
02-09 11:38:53.993: E/AndroidRuntime(27142): at android.app.LoadedApk.makeApplication(LoadedApk.java:563)
02-09 11:38:53.993: E/AndroidRuntime(27142): at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4491)
02-09 11:38:53.993: E/AndroidRuntime(27142): at android.app.ActivityThread.access$1500(ActivityThread.java:144)
02-09 11:38:53.993: E/AndroidRuntime(27142): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1339)
02-09 11:38:53.993: E/AndroidRuntime(27142): at android.os.Handler.dispatchMessage(Handler.java:102)
02-09 11:38:53.993: E/AndroidRuntime(27142): at android.os.Looper.loop(Looper.java:135)
02-09 11:38:53.993: E/AndroidRuntime(27142): at android.app.ActivityThread.main(ActivityThread.java:5221)
02-09 11:38:53.993: E/AndroidRuntime(27142): at java.lang.reflect.Method.invoke(Native Method)
02-09 11:38:53.993: E/AndroidRuntime(27142): at java.lang.reflect.Method.invoke(Method.java:372)
02-09 11:38:53.993: E/AndroidRuntime(27142): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
02-09 11:38:53.993: E/AndroidRuntime(27142): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
02-09 11:38:53.993: E/AndroidRuntime(27142): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.ummahtalk.community.SpikaApp" on path: DexPathList[[zip file "/data/app/com.ummahtalk.community-1/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
02-09 11:38:53.993: E/AndroidRuntime(27142): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
02-09 11:38:53.993: E/AndroidRuntime(27142): at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
02-09 11:38:53.993: E/AndroidRuntime(27142): at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
02-09 11:38:53.993: E/AndroidRuntime(27142): at android.app.Instrumentation.newApplication(Instrumentation.java:979)
02-09 11:38:53.993: E/AndroidRuntime(27142): at android.app.LoadedApk.makeApplication(LoadedApk.java:558)
02-09 11:38:53.993: E/AndroidRuntime(27142): ... 10 more
02-09 11:38:53.993: E/AndroidRuntime(27142): Suppressed: java.lang.ClassNotFoundException: com.ummahtalk.community.SpikaApp
02-09 11:38:53.993: E/AndroidRuntime(27142): at java.lang.Class.classForName(Native Method)
02-09 11:38:53.993: E/AndroidRuntime(27142): at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
02-09 11:38:53.993: E/AndroidRuntime(27142): at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
02-09 11:38:53.993: E/AndroidRuntime(27142): at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
02-09 11:38:53.993: E/AndroidRuntime(27142): ... 13 more
02-09 11:38:53.993: E/AndroidRuntime(27142): Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available
02-09 11:39:54.371: I/Process(27142): Sending signal. PID: 27142 SIG: 9
I had renamed the project using Android Tools>>Rename Application package but Then I figured out everything was not renamed correctly then I tried doing Refactor>Rename and It solved it
Just faced the exact problem. I tried all the solutions above non worked.
I got it fixed by exiting android studio, copying the entire project folder to a new location, launching android studio and opening the project from the new location.
I got a Error inflating class Mvx.MvxListView error when i try to inflate a layout that have only the mvxlistview. I have a parent view that contains two child view he master and detail. The master view must have only the listview as object. When I try to inflate the xml that have only the mvxlistview the application crashes with the error below. Here are the class the xml and the error.
The MasterView:
public class SpaceMasterView : LinearLayout
{
public SpaceMasterView(Context context, IAttributeSet attr ): base(context, attr)
{
var inflator = LayoutInflater.FromContext (context);
if(inflator != null){
inflator.Inflate(Resource.Layout.Dox_Space_SpaceView_Master, this);
}
}
}
The Xml File:
<Mvx.MvxListView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:local="http://schemas.android.com/apk/res-auto"
local:MvxBind="ItemsSource SubFolders;ItemClick SelectFolderCommand"
local:MvxItemTemplate="#layout/dox_space_spaceview_master_listitem"
android:id="#+id/listview_spaceview_master_folders"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:textSize="24dp"/>
And this is the error. Can anyone help me to understand what is going wrong here.
[MonoDroid] UNHANDLED EXCEPTION: Android.Views.InflateException: Exception of type 'Android.Views.InflateException' was thrown.
[MonoDroid] at Android.Runtime.JNIEnv.CallObjectMethod (intptr,intptr,Android.Runtime.JValue[]) [0x00064] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.12-series/0deb0164/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:194
[MonoDroid] at Android.Views.LayoutInflater.Inflate (int,Android.Views.ViewGroup) [0x00043] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.12-series/0deb0164/source/monodroid/src/Mono.Android/platforms/android-15/src/generated/Android.Views.LayoutInflater.cs:575
[MonoDroid] at MobileDox.Android.SpaceMasterView..ctor (Android.Content.Context,Android.Util.IAttributeSet) [0x0001e] in /Users/iibrahimi/Source/DOXMobile/MobileDox.frontend/MobileDox.Android/Views/Dox/Space/SpaceMasterView.cs:30
[MonoDroid] at (wrapper dynamic-method) object.bd9a81cb-ba0e-461d-9c35-fa6fab92a43d (intptr,object[]) <IL 0x00030, 0x00093>
[MonoDroid] at Java.Interop.TypeManager.n_Activate (intptr,intptr,intptr,intptr,intptr,intptr) [0x000c2] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.12-series/0deb0164/source/monodroid/src/Mono.Android/src/Java.Interop/TypeManager.cs:156
[MonoDroid] at (wrapper dynamic-method) object.5e425f1a-486c-4e5b-a4ef-dd0938379cd0 (intptr,intptr,intptr,intptr,intptr,intptr) <IL 0x00029, 0x0007b>
[MonoDroid]
[MonoDroid] --- End of managed exception stack trace ---
[MonoDroid] android.view.InflateException: Binary XML file line #1: Error inflating class Mvx.MvxListView
[MonoDroid] at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:691)
[MonoDroid] at android.view.LayoutInflater.inflate(LayoutInflater.java:466)
[MonoDroid] at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
[MonoDroid] at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
[MonoDroid] at mono.android.TypeManager.n_activate(Native Method)
[MonoDroid] at mono.android.TypeManager.Activate(TypeManager.java:7)
[MonoDroid] at mobiledox.android.SpaceMasterView.<init>(SpaceMasterView.java:29)
[MonoDroid] at java.lang.reflect.Constructor.constructNative(Native Method)
[MonoDroid] at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
[MonoDroid] at android.view.LayoutInflater.createView(LayoutInflater.java:586)
[MonoDroid] at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:680)
[MonoDroid] at android.view.LayoutInflater.rInflate(LayoutInflater.java:739)
[MonoDroid] at android.view.LayoutInflater.rInflate(LayoutInflater.java:742)
[MonoDroid] at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
[MonoDroid] at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
[MonoDroid] at mobiledox.android.views.SpaceView.n_onCreate(Native Method)
[MonoDroid] at mobiledox.android.views.SpaceView.onCreate(SpaceView.java:29)
[MonoDroid] at android.app.Activity.performCreate(Activity.java:4469)
[MonoDroid] at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1052)
[MonoDroid] at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1932)
[MonoDroid] at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1993)
[MonoDroid] at android.app.ActivityThread.access$600(ActivityThread.java:127)
[MonoDroid] at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1159)
[MonoDroid] at android.os.Handler.dispatchMessage(Handler.java:99)
[MonoDroid] at android.os.Looper.loop(Looper.java:137)
[MonoDroid] at android.app.ActivityThread.main(ActivityThread.java:4507)
[MonoDroid] at java.lang.reflect.Method.invokeNative(Native Method)
[MonoDroid] at java.lang.reflect.Method.invoke(Method.java:511)
[MonoDroid] at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:978)
[MonoDroid] at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:745)
[MonoDroid] at dalvik.system.NativeStart.main(Native Method)
[MonoDroid] Caused by: java.lang.ClassNotFoundException: Mvx.MvxListView
[MonoDroid] at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
[MonoDroid] at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
[MonoDroid] at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
[MonoDroid] at android.view.LayoutInflater.createView(LayoutInflater.java:552)
[MonoDroid] at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:680)
[MonoDroid] ... 30 more
[mono-rt] Stacktrace:
[mono-rt]
[mono-rt] at <unknown> <0xffffffff>
[mono-rt] at (wrapper managed-to-native) object.wrapper_native_0x40953d0d (intptr,intptr,intptr,intptr) <IL 0x00028, 0xffffffff>
[mono-rt] at (wrapper delegate-invoke) <Module>.invoke_intptr__this___intptr_intptr_intptr_intptr (intptr,intptr,intptr,intptr) <IL 0x00063, 0xffffffff>
[mono-rt] at Android.Runtime.JNIEnv.CallNonvirtualObjectMethod (intptr,intptr,intptr) [0x00060] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.12-series/0deb0164/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:521
[mono-rt] at Java.Lang.Object.ToString () [0x0005a] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.12-series/0deb0164/source/monodroid/src/Mono.Android/platforms/android-15/src/generated/Java.Lang.Object.cs:200
[mono-rt] at (wrapper runtime-invoke) <Module>.runtime_invoke_object__this__ (object,intptr,intptr,intptr) <IL 0x00050, 0xffffffff>
[mono-rt] at <unknown> <0xffffffff>
[mono-rt] at <unknown> <0xffffffff>
[mono-rt] at (wrapper managed-to-native) System.Diagnostics.Debugger.Mono_UnhandledException_internal (System.Exception) <IL 0x00021, 0xffffffff>
[mono-rt] at System.Diagnostics.Debugger.Mono_UnhandledException (System.Exception) <IL 0x00001, 0x00043>
[mono-rt] at (wrapper dynamic-method) object.968f7a14-2e1a-4096-a88d-780b84872f1d (intptr,intptr,intptr) <IL 0x00026, 0x0005f>
[mono-rt] at (wrapper native-to-managed) object.968f7a14-2e1a-4096-a88d-780b84872f1d (intptr,intptr,intptr) <IL 0x00023, 0xffffffff>
[mono-rt]
[mono-rt] =================================================================
[mono-rt] Got a SIGSEGV while executing native code. This usually indicates
[mono-rt] a fatal error in the mono runtime or one of the native libraries
[mono-rt] used by your application.
[mono-rt] =================================================================
[mono-rt]
I think you must use MvxListView without namespace abbreviation:
<MvxListView xmlns:android="http://schemas.android.com/apk/res/android"..
I'm trying to add textview and progressbar's to a scrollview but it gives me a Java.Lang.IllegalStateException:
I'm using xamarin so this is not java but c# but it's the same principe
here's the code (summarized) :
SetContentView(Resource.Layout.Usage);
ScrollView scrollView = FindViewById<ScrollView>(Resource.Id.scrollView1);
LinearLayout linearLayout = FindViewById<LinearLayout>(Resource.Id.linearLayout2);
while (...){
TextView textView = new TextView(this);
textView.Text = "Some text";
textView.SetTextSize(Android.Util.ComplexUnitType.Sp, 18.0f);
linearLayout.AddView(textView);
ProgressBar progressBar = new ProgressBar(this, null, Android.Resource.Attribute.ProgressBarStyleHorizontal);
progressBar.Progress = 25;
linearLayout.AddView(progressBar);
}
scrollView.AddView(linearLayout);
Stack :
04-15 08:49:00.603 I/MonoDroid( 1389): UNHANDLED EXCEPTION: Java.Lang.IllegalStateException: Exception of type 'Java.Lang.IllegalStateException' was thrown.
04-15 08:49:00.603 I/MonoDroid( 1389): at Android.Runtime.JNIEnv.CallVoidMethod (intptr,intptr,Android.Runtime.JValue[]) [0x00023] in /Users/builder/data/lanes/monodroid-lion-bigsplash/0e0e51f9/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:368
04-15 08:49:00.603 I/MonoDroid( 1389): at Android.Views.ViewGroup.AddView (Android.Views.View) [0x0003e] in /Users/builder/data/lanes/monodroid-lion-bigsplash/0e0e51f9/source/monodroid/src/Mono.Android/platforms/android-8/src/generated/Android.Views.ViewGroup.cs:1186
04-15 08:49:00.603 I/MonoDroid( 1389): at MyOrangeDroid.Usage.OnCreate (Android.OS.Bundle) [0x001be] in c:\Users\clement\Documents\Visual Studio 2012\Projects\MyOrangeAndroid\MyOrangeDroid\Usage.cs:70
04-15 08:49:00.603 I/MonoDroid( 1389): at Android.App.Activity.n_OnCreate_Landroid_os_Bundle_ (intptr,intptr,intptr) [0x00010] in /Users/builder/data/lanes/monodroid-lion-bigsplash/0e0e51f9/source/monodroid/src/Mono.Android/platforms/android-8/src/generated/Android.App.Activity.cs:1490
04-15 08:49:00.603 I/MonoDroid( 1389): at (wrapper dynamic-method) object.6c050c56-6d80-48bc-9425-e832938cdfa7 (intptr,intptr,intptr) <IL 0x00017, 0x00043>
04-15 08:49:00.603 I/MonoDroid( 1389):
04-15 08:49:00.603 I/MonoDroid( 1389): --- End of managed exception stack trace ---
04-15 08:49:00.603 I/MonoDroid( 1389): java.lang.IllegalStateException: ScrollView can host only one direct child
04-15 08:49:00.603 I/MonoDroid( 1389): at android.widget.ScrollView.addView(ScrollView.java:211)
04-15 08:49:00.603 I/MonoDroid( 1389): at myorangedroid.Usage.n_onCreate(Native Method)
04-15 08:49:00.603 I/MonoDroid( 1389): at myorangedroid.Usage.onCreate(Usage.java:28)
04-15 08:49:00.603 I/MonoDroid( 1389): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
04-15 08:49:00.603 I/MonoDroid( 1389): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
04-15 08:49:00.603 I/MonoDroid( 1389): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
04-15 08:49:00.603 I/MonoDroid( 1389): at android.app.ActivityThread.access$1500(ActivityThread.java:117)
04-15 08:49:00.603 I/MonoDroid( 1389): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
04-15 08:49:00.603 I/MonoDroid( 1389): at android.os.Handler.dispatchMessage(Handler.java:99)
04-15 08:49:00.603 I/MonoDroid( 1389): at android.os.Looper.loop(Looper.java:123)
04-15 08:49:00.603 I/MonoDroid( 1389): at android.app.ActivityThread.main(ActivityThread.java:3683)
04-15 08:49:00.603 I/MonoDroid( 1389): at java.lang.reflect.Method.invokeNative(Native Method)
04-15 08:49:00.603 I/MonoDroid( 1389): at java.lang.reflect.Method.invoke(Method.java:507)
04-15 08:49:00.603 I/MonoDroid( 1389): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
04-15 08:49:00.603 I/MonoDroid( 1389): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
04-15 08:49:00.603 I/MonoDroid( 1389): at dalvik.system.NativeStart.main(Native Method)
In mgmain JNI_OnLoad
04-15 08:49:01.503 W/dalvikvm( 1389): JNI WARNING: JNI method called with exception raised
04-15 08:49:01.503 W/dalvikvm( 1389): in Lmyorangedroid/Usage;.n_onCreate (Landroid/os/Bundle;)V (CallObjectMethod)
04-15 08:49:01.503 W/dalvikvm( 1389): Pending exception is:
04-15 08:49:01.503 I/dalvikvm( 1389): Ljava/lang/IllegalStateException;: ScrollView can host only one direct child
04-15 08:49:01.513 I/dalvikvm( 1389): (no stack trace data found)
04-15 08:49:01.513 I/dalvikvm( 1389): "main" prio=5 tid=1 NATIVE
04-15 08:49:01.513 I/dalvikvm( 1389): | group="main" sCount=0 dsCount=0 obj=0x4001f1a8 self=0xce48
04-15 08:49:01.513 I/dalvikvm( 1389): | sysTid=1389 nice=0 sched=0/0 cgrp=default handle=-1345006528
04-15 08:49:01.513 I/dalvikvm( 1389): | schedstat=( 7098128094 1495743800 310 )
04-15 08:49:01.513 I/dalvikvm( 1389): at myorangedroid.Usage.n_onCreate(Native Method)
04-15 08:49:01.523 I/dalvikvm( 1389): at myorangedroid.Usage.onCreate(Usage.java:28)
04-15 08:49:01.523 I/dalvikvm( 1389): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
04-15 08:49:01.523 I/dalvikvm( 1389): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
04-15 08:49:01.523 I/dalvikvm( 1389): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
04-15 08:49:01.523 I/dalvikvm( 1389): at android.app.ActivityThread.access$1500(ActivityThread.java:117)
04-15 08:49:01.523 I/dalvikvm( 1389): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
04-15 08:49:01.523 I/dalvikvm( 1389): at android.os.Handler.dispatchMessage(Handler.java:99)
04-15 08:49:01.523 I/dalvikvm( 1389): at android.os.Looper.loop(Looper.java:123)
04-15 08:49:01.523 I/dalvikvm( 1389): at android.app.ActivityThread.main(ActivityThread.java:3683)
04-15 08:49:01.523 I/dalvikvm( 1389): at java.lang.reflect.Method.invokeNative(Native Method)
04-15 08:49:01.523 I/dalvikvm( 1389): at java.lang.reflect.Method.invoke(Method.java:507)
04-15 08:49:01.523 I/dalvikvm( 1389): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
04-15 08:49:01.523 I/dalvikvm( 1389): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
04-15 08:49:01.523 I/dalvikvm( 1389): at dalvik.system.NativeStart.main(Native Method)
04-15 08:49:01.523 I/dalvikvm( 1389):
04-15 08:49:01.523 E/dalvikvm( 1389): VM aborting
04-15 08:49:01.533 I/mono ( 1389): Stacktrace:
04-15 08:49:01.533 I/mono ( 1389):
04-15 08:49:01.533 I/mono ( 1389): at Android.Runtime.JNIEnv.CallObjectMethod (intptr,intptr) [0x00000] in /Users/builder/data/lanes/monodroid-lion-bigsplash/0e0e51f9/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:129
04-15 08:49:01.533 I/mono ( 1389): at Java.Lang.Throwable.get_Message () [0x0003e] in /Users/builder/data/lanes/monodroid-lion-bigsplash/0e0e51f9/source/monodroid/src/Mono.Android/platforms/android-8/src/generated/Java.Lang.Throwable.cs:195
04-15 08:49:01.533 I/mono ( 1389): at (wrapper runtime-invoke) <Module>.runtime_invoke_object__this__ (object,intptr,intptr,intptr) <IL 0x00050, 0xffffffff>
Unhandled Exception:
Java.Lang.IllegalStateException:
Thanks for the help/read :-)
ScrollView must have only one Direct child
if you are trying to add like below
layout.AddView(textView);
layout.AddView(progressBar);
it will throw the Exception saying ScrollView must have only one direct child
Solution:
Take LinearLayout and add textView and progressbar to it and then add LinearLayout to the ScrollView
And also in your code, method names are given in Capital Letters, Remember java is Case Sensitive. I think you are just giving the above code for the overview.
Any chance you have anything inside your scrollview on your xml? If there is nothing there, try to remove all views before adding a new one. This is java but you must have an equivalent in c#.
scrollView.removeAllViews();
If you have nothing like that, remove the very first view, there will be only one anyway.
scrollView.removeView(0);
Remove all views
I am getting an error in my OnViewModelSet() function when trying to inflate an xml file.
When calling
LayoutInflater inflater = LayoutInflater.From(this);
View mainView = inflater.Inflate(Resource.Layout.Main, null);
I am getting a "java.lang.ClassNotFoundException: Mvx.MvxBindableListView"
Here is the whole exception:
Android.Views.InflateException: Binary XML file line #1: Error inflating class Mvx.MvxBindableListView
at Android.Runtime.JNIEnv.CallObjectMethod (intptr,intptr,Android.Runtime.JValue[]) [0x00024] in /Users/builder/data/lanes/monodroid-lion-bigsplash/0e0e51f9/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:145
at Android.Views.LayoutInflater.Inflate (int,Android.Views.ViewGroup) [0x0003e] in /Users/builder/data/lanes/monodroid-lion-bigsplash/0e0e51f9/source/monodroid/src/Mono.Android/platforms/android-12/src/generated/Android.Views.LayoutInflater.cs:543
at AndroidCornerstoneMobile.MainView.OnViewModelSet () [0x00010] in c:\Users\David\Documents\Work\AndroidXamarin\AndroidCornerstoneMobile\Views\MainView.cs:30
at at Cirrious.MvvmCross.Droid.Views.MvxActivityView`1<Core.ViewModels.MainViewModel>.set_ViewModel (Core.ViewModels.MainViewModel) <0x000bb>
at at Cirrious.MvvmCross.ExtensionMethods.MvxViewExtensionMethods.OnViewCreate<Core.ViewModels.MainViewModel> (Cirrious.MvvmCross.Interfaces.Views.IMvxView`1<Core.ViewModels.MainViewModel>,System.Func`1<Core.ViewModels.MainViewModel>) <0x00203>
at at Cirrious.MvvmCross.Droid.ExtensionMethods.MvxAndroidActivityExtensionMethods.OnViewCreate<Core.ViewModels.MainViewModel> (Cirrious.MvvmCross.Droid.Interfaces.IMvxAndroidView`1<Core.ViewModels.MainViewModel>) <0x00297>
at at Cirrious.MvvmCross.Droid.Views.MvxActivityView`1<Core.ViewModels.MainViewModel>.OnCreate (Android.OS.Bundle) <0x000d3>
at at Cirrious.MvvmCross.Binding.Droid.Views.MvxBindingActivityView`1<Core.ViewModels.MainViewModel>.OnCreate (Android.OS.Bundle) <0x000b7>
at Android.App.Activity.n_OnCreate_Landroid_os_Bundle_ (intptr,intptr,intptr) [0x00010] in /Users/builder/data/lanes/monodroid-lion-bigsplash/0e0e51f9/source/monodroid/src/Mono.Android/platforms/android-12/src/generated/Android.App.Activity.cs:1837
at at (wrapper dynamic-method) object.8c1f4311-41e4-4a0f-98f2-454a6152589a (intptr,intptr,intptr) <IL 0x00017, 0x00043>
at
at --- End of managed exception stack trace ---
at android.view.InflateException: Binary XML file line #1: Error inflating class Mvx.MvxBindableListView
at at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:691)
at at android.view.LayoutInflater.rInflate(LayoutInflater.java:739)
at at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
at at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
at at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
at at cirrious.mvvmcross.binding.droid.views.MvxBindingActivityView_1.n_onCreate(Native Method)
at at cirrious.mvvmcross.binding.droid.views.MvxBindingActivityView_1.onCreate(MvxBindingActivityView_1.java:31)
at at android.app.Activity.performCreate(Activity.java:4539)
at at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
at at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2013)
at at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2083)
at at android.app.ActivityThread.access$600(ActivityThread.java:134)
at at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1233)
at at android.os.Handler.dispatchMessage(Handler.java:99)
at at android.os.Looper.loop(Looper.java:137)
at at android.app.ActivityThread.main(ActivityThread.java:4697)
at at java.lang.reflect.Method.invokeNative(Native Method)
at at java.lang.reflect.Method.invoke(Method.java:511)
at at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:787)
at at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:554)
at at dalvik.system.NativeStart.main(Native Method)
at Caused by: java.lang.ClassNotFoundException: Mvx.MvxBindableListView
at at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
at at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
at at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
at at android.view.LayoutInflater.createView(LayoutInflater.java:552)
at at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:680)
at ... 20 more
To inflate the MvvmCross classes, you must use the BindingInflate methods provided by the MvxActivity classes. The easiest way to do this is to call SetContentView() within OnCreate() or OnViewModelSet().
These methods route the inflation via the MvvmCross Binding code which knows how to interpret the Mvx. abbreviated namespaces and which knows how to unpack the MvxBind binding statements.
The default Android inflater doesn't know about either of these things - so we can't just use it.
Trying to run this (example code from developer.android.com)
MediaExtractor extractor = new MediaExtractor();
extractor.setDataSource("/sdcard/myvideo.mp4");
Getting "Failed to instantiate extractor" exception on the second line.
Tried to place the file in internal storage, tried to access via FileDescriptor, nothing helped.
Anyone??
I/MonoDroid( 6802): UNHANDLED EXCEPTION: Java.IO.IOException: Exception of type 'Java.IO.IOException' was thrown.
I/MonoDroid( 6802): at Android.Runtime.JNIEnv.CallVoidMethod (intptr,intptr,Android.Runtime.JValue[]) [0x00023] in /Users/builder/data/lanes/monodroid-mac-monodroid-4.4-series/c6e52015/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:368
I/MonoDroid( 6802): at Android.Media.MediaExtractor.SetDataSource (Java.IO.FileDescriptor) [0x0002d] in /Users/builder/data/lanes/monodroid-mac-monodroid-4.4-series/c6e52015/source/monodroid/src/Mono.Android/platforms/android-16/src/generated/Android.Media.MediaExtractor.cs:206
I/MonoDroid( 6802): at AndroidApplication1.Activity1.ExtractVideo () [0x0001e] in c:\Users\pka\Documents\Visual Studio 2012\Projects\AndroidApplication1\AndroidApplication1\Activity1.cs:64
I/MonoDroid( 6802): at AndroidApplication1.Activity1.<OnCreate>b__2 (object,System.EventArgs) [0x00001] in c:\Users\pka\Documents\Visual Studio 2012\Projects\AndroidApplication1\AndroidApplication1\Activity1.cs:53
I/MonoDroid( 6802): at Android.Views.View/IOnClickListenerImplementor.OnClick (Android.Views.View) [0x0000b] in /Users/builder/data/lanes/monodroid-mac-monodroid-4.4-series/c6e52015/source/monodroid/src/Mono.Android/platforms/android-16/src/generated/Android.Views.View.cs:1382
I/MonoDroid( 6802): at Android.Views.View/IOnClickListenerInvoker.n_OnClick_Landroid_view_View_ (intptr,intptr,intptr) [0x00010] in /Users/builder/data/lanes/monodroid-mac-monodroid-4.4-series/c6e52015/source/monodroid/src/Mono.Android/platforms/android-16/src/generated/Android.Views.View.cs:1353
I/MonoDroid( 6802): at (wrapper dynamic-method) object.0b69082c-1c66-4fd6-89c4-1d14273d4245 (intptr,intptr,intptr) <IL 0x00017, 0x00043>
I/MonoDroid( 6802):
I/MonoDroid( 6802): --- End of managed exception stack trace ---
I/MonoDroid( 6802): java.io.IOException: Failed to instantiate extractor.
I/MonoDroid( 6802): at android.media.MediaExtractor.setDataSource(Native Method)
I/MonoDroid( 6802): at android.media.MediaExtractor.setDataSource(MediaExtractor.java:158)
I/MonoDroid( 6802): at mono.android.view.View_OnClickListenerImplementor.n_onClick(Native Method)
I/MonoDroid( 6802): at mono.android.view.View_OnClickListenerImplementor.onClick(View_OnClickListenerImplementor.java:29)
I/MonoDroid( 6802): at android.view.View.performClick(View.java:4211)
I/MonoDroid( 6802): at android.view.View$PerformClick.run(View.java:17267)
I/MonoDroid( 6802): at android.os.Handler.handleCallback(Handler.java:615)
I/MonoDroid( 6802): at android.os.Handler.dispatchMessage(Handler.java:92)
I/MonoDroid( 6802): at android.os.Looper.loop(Looper.java:137)
I/MonoDroid( 6802): at android.app.ActivityThread.main(ActivityThread.java:4898)
I/MonoDroid( 6802): at java.lang.reflect.Method.invokeNative(Native Method)
I/MonoDroid( 6802): at java.lang.reflect.Method.invoke(Method.java:511)
I/MonoDroid( 6802): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1006)
I/MonoDroid( 6802): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:773)
I/MonoDroid( 6802): at dalvik.system.NativeStart.main(Native Method)
W/dalvikvm( 6802): JNI WARNING: JNI method called with exception pending
W/dalvikvm( 6802): in Lmono/android/view/View_OnClickListenerImplementor;.n_onClick:(Landroid/view/View;)V (CallObjectMethod)
W/dalvikvm( 6802): Pending exception is:
I/dalvikvm( 6802): java.io.IOException: Failed to instantiate extractor.
I/dalvikvm( 6802): (raw stack trace not found)
I/dalvikvm( 6802): "main" prio=5 tid=1 NATIVE
I/dalvikvm( 6802): | group="main" sCount=0 dsCount=0 obj=0x41094508 self=0x40e6f9a0
I/dalvikvm( 6802): | sysTid=6802 nice=0 sched=0/0 cgrp=apps handle=1074282288
I/dalvikvm( 6802): | schedstat=( 1587575495 261759711 782 ) utm=108 stm=50 core=3
I/dalvikvm( 6802): #00 pc 00001260 /system/lib/libcorkscrew.so (unwind_backtrace_thread+27)
I/dalvikvm( 6802): #01 pc 0005f904 /system/lib/libdvm.so (dvmDumpNativeStack(DebugOutputTarget const*, int)+35)
I/dalvikvm( 6802): #02 pc 000537ac /system/lib/libdvm.so (dvmDumpThreadEx(DebugOutputTarget const*, Thread*, bool)+303)
I/dalvikvm( 6802): #03 pc 00053846 /system/lib/libdvm.so (dvmDumpThread(Thread*, bool)+25)
I/dalvikvm( 6802): #04 pc 00038e02 /system/lib/libdvm.so
I/dalvikvm( 6802): #05 pc 00040f60 /system/lib/libdvm.so
I/dalvikvm( 6802): at mono.android.view.View_OnClickListenerImplementor.n_onClick(Native Method)
I/dalvikvm( 6802): at mono.android.view.View_OnClickListenerImplementor.onClick(View_OnClickListenerImplementor.java:29)
I/dalvikvm( 6802): at android.view.View.performClick(View.java:4211)
I/dalvikvm( 6802): at android.view.View$PerformClick.run(View.java:17267)
I/dalvikvm( 6802): at android.os.Handler.handleCallback(Handler.java:615)
I/dalvikvm( 6802): at android.os.Handler.dispatchMessage(Handler.java:92)
I/dalvikvm( 6802): at android.os.Looper.loop(Looper.java:137)
I/dalvikvm( 6802): at android.app.ActivityThread.main(ActivityThread.java:4898)
I/dalvikvm( 6802): at java.lang.reflect.Method.invokeNative(Native Method)
I/dalvikvm( 6802): at java.lang.reflect.Method.invoke(Method.java:511)
I/dalvikvm( 6802): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1006)
I/dalvikvm( 6802): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:773)
I/dalvikvm( 6802): at dalvik.system.NativeStart.main(Native Method)
I/dalvikvm( 6802):
E/dalvikvm( 6802): VM aborting
I/mono ( 6802): Stacktrace:
I/mono ( 6802):
I/mono ( 6802): at Android.Runtime.JNIEnv.CallObjectMethod (intptr,intptr) [0x00000] in /Users/builder/data/lanes/monodroid-mac-monodroid-4.4-series/c6e52015/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:129
I/mono ( 6802): at Java.Lang.Throwable.get_Message () [0x0003e] in /Users/builder/data/lanes/monodroid-mac-monodroid-4.4-series/c6e52015/source/monodroid/src/Mono.Android/platforms/android-16/src/generated/Java.Lang.Throwable.cs:195
I/mono ( 6802): at (wrapper runtime-invoke) <Module>.runtime_invoke_object__this__ (object,intptr,intptr,intptr) <IL 0x00050, 0xffffffff>
E/mono ( 6802):
E/mono ( 6802): Unhandled Exception:
E/mono ( 6802): Java.IO.IOException: Exception of type 'Java.IO.IOException' was thrown.
E/mono ( 6802): at Android.Runtime.JNIEnv.CallVoidMethod (intptr,intptr,Android.Runtime.JValue[]) [0x00023] in /Users/builder/data/lanes/monodroid-mac-monodroid-4.4-series/c6e52015/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:368
E/mono ( 6802): at Android.Media.MediaExtractor.SetDataSource (Java.IO.FileDescriptor) [0x0002d] in /Users/builder/data/lanes/monodroid-mac-monodroid-4.4-series/c6e52015/source/monodroid/src/Mono.Android/platforms/android-16/src/generated/Android.Media.MediaExtractor.cs:206
E/mono ( 6802): at AndroidApplication1.Activity1.ExtractVideo () [0x0001e] in c:\Users\pka\Documents\Visual Studio 2012\Projects\AndroidApplication1\AndroidApplication1\Activity1.cs:64
E/mono ( 6802): at AndroidApplication1.Activity1.<OnCreate>b__2 (object,System.EventArgs) [0x00001] in c:\Users\pka\Documents\Visual Studio 2012\Projects\AndroidApplication1\AndroidApplication1\Activity1.cs:53
E/mono ( 6802): at Android.Views.View/IOnClickListenerImplementor.OnClick (Android.Views.View)
I/mono ( 6802): [ERROR] FATAL UNHANDLED EXCEPTION: Java.IO.IOException: Exception of type 'Java.IO.IOException' was thrown.
I/mono ( 6802): at Android.Runtime.JNIEnv.CallVoidMethod (intptr,intptr,Android.Runtime.JValue[]) [0x00023] in /Users/builder/data/lanes/monodroid-mac-monodroid-4.4-series/c6e52015/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:368
I/mono ( 6802): at Android.Media.MediaExtractor.SetDataSource (Java.IO.FileDescriptor) [0x0002d] in /Users/builder/data/lanes/monodroid-mac-monodroid-4.4-series/c6e52015/source/monodroid/src/Mono.Android/platforms/android-16/src/generated/Android.Media.MediaExtractor.cs:206
I/mono ( 6802): at AndroidApplication1.Activity1.ExtractVideo () [0x0001e] in c:\Users\pka\Documents\Visual Studio 2012\Projects\AndroidApplication1\AndroidApplication1\Activity1.cs:64
I/mono ( 6802): at AndroidApplication1.Activity1.<OnCreate>b__2 (object,System.EventArgs) [0x00001] in c:\Users\pka\Documents\Visual Studio 2012\Projects\AndroidApplication1\AndroidApplication1\Activity1.cs:53
I/mono ( 6802): at Android.Views.View/IOnClickListenerImplementor.OnClick (Android
V/MediaPlayerService( 1901): Delete media recorder client
D/ISecCameraHardware( 1901): stopPreview E
W/ISecCameraHardware( 1901): stopPreview: warning, preview has been stopped
I/SurfaceFlinger( 1898): id=23 Removed TurfaceView idx=2 MapSz=3
D/ISecCameraHardware( 1901): cancelPicture EX
D/SecCameraHardware( 1901): release E
D/ISecCameraHardware( 1901): Camera.... release
W/InputDispatcher( 2253): channel ~ Consumer closed input channel or an error occurred. events=0x9
I am an idiot...I had another part of my program holding open the same file that the extractor was supposed to read off...
Quite bad error message from Android though.