When starting debugging of my project on the Android emulator I receive this error:
Java.Lang.NoClassDefFoundError: android.support.graphics.drawable.VectorDrawableCompat
At this code:
public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
{
protected override void OnCreate(Bundle bundle)
{
//SQLitePCL.Batteries.Init();
TabLayoutResource = Resource.Layout.Tabbar;
ToolbarResource = Resource.Layout.Toolbar;
base.OnCreate(bundle);
string dbPath = FileAccessHelper.GetLocalFilePath("clocker.db3");
global::Xamarin.Forms.Forms.Init(this, bundle);
LoadApplication(new Clocker.App(dbPath));
}
}
The error occurs on this row:
base.OnCreate(bundle);
I have tried looking online at the other suggestions but the answers seem related to specific Xamarin studio files which are non-existant in my project (i.g. the gradle file).
I have checked the contents of 'bundle' and it seems to be null at the time of the error but I'm unsure if this is causing the error.
I'm using Xamarin forms PCL.
This error may occurs with several class if the project path is too long, because it go through the limit of Operational System character length.
Example of Long path:
C:\Users\Username\Documents\Visual Studio xxxx\Projects\Project Name
Example of Good path:
C:\Projects\ProjectName
EDIT - Added how the packages should look:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With