Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

PCL dll could not be loaded from Android project (Xamarin.Forms)

$
0
0

Hi all,

I am despairing....Since a while I am developing a Xamarin.Forms app. Mostly I check my newest code by starting the iOS app.
Sometimes I start the Android version but I know that I am not that far concerning the Dependency Services.

But after a while I tried to start the Android version again, BUT it did not start at all. It immediately crashes. No chance to set a break point. It does not even call the "OnCreate" method in the MainActivity.cs.

If I switch to iOS the app runs as exspected. So no general bug in the PCL code otherwise the XF app would not run using the iOS version.
I updated all packages, I changed and checked the Android settings (target framework etc.) but nothing helps.

Here is the call stack:

 --- End of managed exception stack trace ---
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
    at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.reflect.InvocationTargetException
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:515)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
    ... 2 more
Caused by: md52ce486a14f4bcd95899665e9d932190b.JavaProxyThrowable: System.TypeLoadException: Could not load type 'VagaBoo.App' from assembly 'VagaBoo, Version=1.0.5780.19389, Culture=neutral, PublicKeyToken=null'.
at Android.App.Activity.n_OnCreate_Landroid_os_Bundle_ (intptr,intptr,intptr) [0x00011] in /Users/builder/data/lanes/2307/f7b9e87d/source/monodroid/src/Mono.Android/platforms/android-23/src/generated/Android.App.Activity.cs:2857
at (wrapper dynamic-method) object.e0c988b4-d6e6-4002-bfc8-6c5adbae8cb5 (intptr,intptr,intptr) <IL 0x00017, 0x00027>

    at md559c85b81177e12bc21d9f78a77ba488e.MainActivity.n_onCreate(Native Method)
    at md559c85b81177e12bc21d9f78a77ba488e.MainActivity.onCreate(MainActivity.java:28)
    at android.app.Activity.performCreate(Activity.java:5231)
    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2148)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2233)
    at android.app.ActivityThread.access$800(ActivityThread.java:135)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
    at android.os.Handler.dispatchMessage(Handler.java:102)
    at android.os.Looper.loop(Looper.java:136)
    at android.app.ActivityThread.main(ActivityThread.java:5001)

What is totally unclear to me is this line:

 Caused by: md52ce486a14f4bcd95899665e9d932190b.JavaProxyThrowable: System.TypeLoadException: Could not load type 'VagaBoo.App' from assembly 'VagaBoo, Version=1.0.5780.19389, Culture=neutral, PublicKeyToken=null'.

It could not load the App class in the PCL dll ?? (VagaBoo is the name/namespace of my app/solution). I am using Xamarin.Forms version 1.5.1.6471.

Why is the Android app not able to create an PCL app class object or load it ?
The iOS app does this without any problems.

Any idea ? Help needed !

Thank you very much.

Marco


Viewing all articles
Browse latest Browse all 77050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>