Mvvmcross: MvxFormsAppCompatActivity is unavailable in Android project

Created on 5 Jul 2019  路  4Comments  路  Source: MvvmCross/MvvmCross

馃悰 Bug Report


MvxFormsAppCompatActivity and MvxFormsAndroidSetup classes are not visible after installing required MvvmCross and MvvmCross.Forms nuget packages

Compilation error:

MainActivity.cs(13, 33): [CS0246] The type or namespace name 'MvxFormsAppCompatActivity<,,>' could not be found (are you missing a using directive or an assembly reference?)

MainActivity.cs(13, 59): [CS0246] The type or namespace name 'MvxFormsAndroidSetup<,>' could not be found (are you missing a using directive or an assembly reference?)

image

In addition, I saw in your documentation that you have 2 _MvvmCross.Forms.Platforms.*_ namespaces, but in fact, these namespaces are not available for me, in particular, *._Platforms_

what's wrong there in my case?

Expected behavior

Successful build compilation

Reproduction steps

Configuration

Version: 6.3.1

Platform:

  • [ ] :iphone: iOS
  • [x ] :robot: Android
  • [ ] :checkered_flag: WPF
  • [ ] :earth_americas: UWP
  • [ ] :apple: MacOS
  • [ ] :tv: tvOS
  • [ x] :monkey: Xamarin.Forms (3.6.0-sr4)
invalid

All 4 comments

@beylkhanovdamir we've already been notified when you create an issue. No need to start mentioning people you want to review your issues. Please stop this behavior.

As for your issue. Please make sure all your MvvmCross packages are the same versions, you seem to be mixing these in your project, looking at the screenshot.

The two types that seem to be missing are actually in the MvvmCross.Forms package. So something is most likely messed up with your NuGet package references.

@Cheesebaron please, just tell me, what do I need to do, left only MvvmCross package, right or what? because I tried many times, but always there are some compatibility problems

Please make sure all your MvvmCross packages are the same versions,

yes, I deleted then the *.AppCompat Android package which is at the top of Packages list,
but the problem was not resolved

oh, I got it, the problem in Target Android API which should be 9.0 for Android v28.0.0.1, and thus, *.Platforms namespace would be available for me

yeah, problem resolved after upgrading to the 9.0 SDK

image

Was this page helpful?
0 / 5 - 0 ratings