BarcodeScanner.Mobile icon indicating copy to clipboard operation
BarcodeScanner.Mobile copied to clipboard

package does not exist error in Maui App

Open HobDev opened this issue 3 years ago • 1 comments

Describe the bug package does not exist error in Maui App. The number of bugs is 38. All the missing packages start from com.google.android.gms

To Reproduce Steps to reproduce the behavior: Create new Maui App and install barcodescanner.mobile.maui. Now debug the solution.

Expected behavior The app should build and run on the emulator.

Smartphone (please complete the following information):

  • Device: Android Emulator (Pixel 5- API-31)
  • OS: Android 12
  • Version : Visual Studio 17.3 stable version on Windows

HobDev avatar Aug 13 '22 16:08 HobDev

Hi @HobDev

Did you install Google play services in your Android SDK tool?

JimmyPun610 avatar Aug 14 '22 03:08 JimmyPun610

Hi @JimmyPun610 Yes, I installed Google play services from Android SDK tool but the errors are still there.

HobDev avatar Aug 15 '22 23:08 HobDev

Hi @JimmyPun610 Yes, I installed Google play services from Android SDK tool but the errors are still there.

Check that you have this in your csproj file:

<ItemGroup Condition="'$(TargetFramework)' == 'net6.0-android'"> <PackageReference Include="Xamarin.Google.MLKit.BarcodeScanning" Version="116.1.2.5" /> </ItemGroup>

gkenaston avatar Aug 15 '22 23:08 gkenaston

Check that you have this in your csproj file:

<ItemGroup Condition="'$(TargetFramework)' == 'net6.0-android'"> <PackageReference Include="Xamarin.Google.MLKit.BarcodeScanning" Version="116.1.2.5" /> </ItemGroup>

The app build successfully after adding the above package in the csproj. Thank you @gkenaston

HobDev avatar Aug 16 '22 00:08 HobDev

Does the the package Xamarin.Google.MLKit.BarcodeScanning also required for iOS project.

HobDev avatar Aug 16 '22 00:08 HobDev

Does the the package Xamarin.Google.MLKit.BarcodeScanning also required for iOS project.

No, it is an Android binding library

JimmyPun610 avatar Aug 16 '22 00:08 JimmyPun610