-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Plenty of warning and errors on build #90
Comments
Hi @energywave What version are you using? |
Well sorry, I didn't specify it as good as it should. I'm using a clone of the GitHub project so yes, I'm using the 6.1.0.2-pre directly as a project inside my solution. |
For your Android .csproj, what is your dependencies? <ItemGroup>
<PackageReference Include="Xam.Plugin.Media">
<Version>5.0.1</Version>
</PackageReference>
<PackageReference Include="Xamarin.Android.Support.Media.Compat">
<Version>28.0.0.3</Version>
</PackageReference>
<PackageReference Include="Xamarin.Android.Support.v7.AppCompat" Version="28.0.0.3" />
<PackageReference Include="Xamarin.Android.Support.v4" Version="28.0.0.3" />
<PackageReference Include="Xamarin.Android.Support.v7.CardView" Version="28.0.0.3" />
<PackageReference Include="Xamarin.Android.Support.v7.MediaRouter" Version="28.0.0.3" />
<PackageReference Include="Xamarin.Android.Support.Core.Utils" Version="28.0.0.3" />
<PackageReference Include="Xamarin.Android.Support.CustomTabs" Version="28.0.0.3" />
<PackageReference Include="Xamarin.AndroidX.Lifecycle.LiveData" Version="2.3.1.1" />
<PackageReference Include="Xamarin.Google.Android.Material" Version="1.3.0.1" />
<PackageReference Include="Xamarin.AndroidX.Core" Version="1.6.0.1" />
<PackageReference Include="Xamarin.AndroidX.RecyclerView" Version="1.2.1.1" />
<PackageReference Include="Xamarin.Essentials" Version="1.7.0" />
<PackageReference Include="Xamarin.Forms">
<Version>5.0.0.2083</Version>
</PackageReference>
</ItemGroup>
|
In order to use the latest packages, I just tried to edit the csproj dependencies instead of update in the nuget manager. Your Android app project
The GoogleVisionBarCodeScanner.csproj <ItemGroup Condition=" $(TargetFramework.StartsWith('MonoAndroid')) ">
<Compile Include="Android\*.cs" />
<Compile Include="Android\**\*.cs" />
<PackageReference Include="Xamarin.AndroidX.MediaRouter" Version="1.2.5.2">
</PackageReference>
<PackageReference Include="Xamarin.AndroidX.Lifecycle.LiveData" Version="2.3.1.3">
</PackageReference>
<PackageReference Include="Xamarin.AndroidX.Browser" Version="1.3.0.8">
</PackageReference>
<PackageReference Include="Xamarin.Google.Android.Material" Version="1.4.0.4">
</PackageReference>
<PackageReference Include="Xamarin.AndroidX.Palette" Version="1.0.0.10">
</PackageReference>
<PackageReference Include="Xamarin.AndroidX.Core" Version="1.6.0.3">
</PackageReference>
<PackageReference Include="Xamarin.AndroidX.RecyclerView" Version="1.2.1.3">
</PackageReference>
<PackageReference Include="Xamarin.AndroidX.Camera.Camera2" Version="1.0.2">
</PackageReference>
<PackageReference Include="Xamarin.AndroidX.Camera.Lifecycle">
<Version>1.0.2</Version>
</PackageReference>
<PackageReference Include="Xamarin.AndroidX.Camera.View">
<Version>1.0.0.5-alpha20</Version>
</PackageReference>
<PackageReference Include="Xamarin.Google.Dagger">
<Version>2.37.0</Version>
</PackageReference>
<PackageReference Include="Xamarin.Google.MLKit.BarcodeScanning">
<Version>116.1.2</Version>
</PackageReference>
</ItemGroup>
Rebuild all your project and that should work |
Thank you very much for your valuable help! I did update what you said and I could manage to compile using the last Xamarin.Forms version! Furthermore all of the dependencies version mismatch went away!
The second, third and fourth row are saying that those Android.cs files are specified more than once. I've seen that in the project file there is this:
I've tested to replace the ** with Renderer (to include the relative folder) but no change. That's not an error preventing to build but it's a pity to have all those warnings. The other thing that I'm not understanding are all those "cannot import again "C:\Program Files\dotnet\sdk\5.0.401\Sdks\Microsoft.NET.Sdk.WindowsDesktop\targets\Microsoft.NET.Sdk.WindowsDesktop.props". The import already take place in "C:\Program Files\dotnet\sdk\5.0.401\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.props (148,3)". It's probably a compilation creation error. This following import will be ignored.. [E:\Sorgenti\Github\BarcodeScanner.XF\GoogleVisionBarCodeScanner\GoogleVisionBarCodeScanner.csproj] EGP.Android C:\Users\hsozzi.POLIWAREDOM.nuget\packages\msbuild.sdk.extras\2.0.54\Sdk\Sdk.props 25 PS: I hope to better learn Xamarin.Forms so that I can help contribute to this project in the future. It's working very well for QR code reading. |
Hi, |
hi @tridle123 |
thanks for you reply. |
I tried to clone it and it is working. |
Which error log do you want?
I think perhaps my visual studio 2022 setup is not correct?? Are there any specific packages in the VS installation manager I should have for this project?? |
Did you try to
|
I managed to use your project by adding it to my solution but dependencies are not latest and it's not possible to update to latest Xamarin.Forms by using NuGet.
Furthermore I'm forced to use that same version in my app as I cannot update any dependency when I add this project to the solution.
I'll paste below all the error (the first) and warning that the solution is giving. That said it's working but it would be nice to resolve these issues.
Thank you for your work!
The text was updated successfully, but these errors were encountered: