Hi I'm newbie in MvvmCross framework and Xamarin.Android development,
I try to follow the TipCalc Android Project tutorial https://www.mvvmcross.com/documentation/tutorials/tipcalc/a-xamarinandroid-ui-project via this link
However, after I created the Core project, and added the "MainApplication.cs" to the Android Project in the solution (Installed both MvvmCross version 7.2). I cannot reference Platforms package inside MvvmCross.
It gives me the error,
Error CS0234 The type or namespace name 'Platforms' does not exist in the namespace 'MvvmCross' (are you missing an assembly reference?)
This should be a simple app tutorial but it has been making me stuck for 2 days. Does anyone have an idea?
MainApplication.cs
using System;
using Android.App;
using Android.Runtime;
// These next 2 aren't found
using MvvmCross.Platforms.Android.Core;
using MvvmCross.Platforms.Android.Views;
using TipCalc.Core;
namespace TipCalc.Droid
{
[Application]
// So this MvxAndroid... is also not found
public class MainApplication : MvxAndroidApplication<MvxAndroidSetup<App>, App>
{
public MainApplication(IntPtr javaReference, JniHandleOwnership transfer)
: base(javaReference, transfer)
{
}
}
}
I added MvvmCross
as an assembly reference, but these namespaces aren't showing up. What's going wrong here?
If you are updating an old solution, make sure you change your Android Application project to target Android 10. Otherwise the NuGet package won't install properly for the Android Application. If you are still using packages.config, you may have to uninstall the packages and install them again after changing target.
You can reference the TipCalc sample here: https://github.com/MvvmCross/MvvmCross-Samples/tree/master/TipCalc