I added some images to my Flutter app using XCode, then I closed it and opened VS Code to build the app (since I always use VS Code).
I'm always getting this error:
Error (Xcode): unable to attach DB: error: accessing build database "/Users/username/Library/Developer/Xcode/DerivedData/Runner-biyumwxiyqxyjkacscuqcbwbjroj/Build/Intermediates.noindex/XCBuildData/build.db": database is locked Possibly there are two concurrent builds running in the same filesystem location.
Could not build the application for the simulator.
Error launching application on iPhone 13.
I tried to do some changes like "flutter clean" and reinstalling Pod files.
I also tried to use an old "ios" folder but it doesn't solve the issue.
Finally I tried to use Android Studio but nothing changes.
This happens with XCode closed.
Some advices?
I am trying to enable Firebase Analytics in my Xamarin Forms project. The iOS version goes very well, however, when adding nuget packages in Android project I am getting error while building my project. I am following Using Firebase Analytics in your Xamarin.Forms app to enable firebase in my app. I have added
Xamarin.FireBase.Analytics and Xamarin.FireBase.Analytics.Impl
Nugets. while running my app I am getting weired error attached in the screenshot. Clicking any of those errors takes me to a file "values.xml". In fact there are two identical values.xml files (these files are not located in my android project, but opens when clicking on the errors)
After switch on aapt2 for build the issue was solved for me
i had the same issue with the new 116+ versions.. downgrade to version 71.xx and it solves the problem
Error while loading assemblies: /Users/admin/Library/Caches/Xamarin/mtbs/builds/project.iOS/6b01e66516e8420be8424059207235df/bin/iPhoneSimulator/Debug/libHarfBuzzSharp.dll.
I had recently upgraded my packages in xamarin iOS project and also visual studio to 16.7.4 version .Now I'm unable to build the iOS Project . Earlier it was building fine and able to deploy to a simulator.
I had delected bin, obj and rebuild the solution but the error still persists.
Please help me to figure out the root cause of this error.
I am building a Xamarin Forms solution (containing an iOS library, an Android library and a .NET Standard library) in TeamCity.
I have just upgraded to Xamarin Forms 3.1.0.583944. The project builds without any problem locally, but on my TeamCity build server (Windows Server 2016), I'm consistently getting the following error:
C:\BuildAgent\work\f12265fda07473c1\src\packages\Xamarin.Forms.3.1.0.583944\build\netstandard2.0\Xamarin.Forms.targets(44,
3): error XF002: Xamarin.Forms tasks do not match targets. Please
ensure that all projects reference the same version of Xamarin.Forms,
and if the error persists, please restart the IDE.
I have tried downgrading Xamarin Forms, and rebooting the build agent. Neither of these has succeeded.
UPDATE: There is a new error:
C:\BuildAgent\temp\buildTmp.nuget\packages\xamarin.forms\3.0.0.561731\build\netstandard2.0\Xamarin.Forms.targets(44, 3): error XF002: Xamarin.Forms tasks do not match targets. Please ensure that all projects reference the same version of Xamarin.Forms, and if the error persists, please restart the IDE.
For some reason, the agent is looking for Version 3.0.0.561731. But that is no longer anywhere in the project. I had deleted the entire C:\BuildAgent\temp\buildTmp\.nuget\packages\xamarin.forms\3.0.0.561731 folder, but it has come back.
ADDENDUM: I notice that every time I upgrade Xamarin.Forms to this version via NuGet, it fails to uninstall the old package, and I have to restart Visual Studio to complete the process. This happens without fail. I am fairly sure this is connected to the breaking build, but that is more due to speculation and experience than concrete analysis.
I found out how to fix the problem, but it's not clear to me why it would manifest in the way it has -- locally and even when I RDP onto the build agent, it builds without trouble, but when I run the build agent from the TeamCity console I hit these compilation errors.
One of my dependencies is a NuGet package, which itself has a dependency on Xamarin Forms. Fortunately, I own that NuGet package, and was able to upgrade its Xamarin Forms version to the latest available package. If I didn't own that package I would be completely stuck though -- so this is only a partial solution.
The above answer was quite helpful for me . I would like to add a couple of additional notes though. I was facing this issue when I was using Xamarin Forms 3+ and my local build was being really inconsistent with the same error "Xamarin.Forms tasks do not match targets. Please ensure that all projects reference the same version of Xamarin.Forms, and if the error persists, please restart the IDE.". Then I cleared my local NuGet cache and rebuilt the project and saw that there were other NuGet package versions being pulled for Xamarin Forms when I did a NuGet restore. I then reversed the ordering of the NuGet packages starting with Xamarin Forms and it all worked fine.
While trying to build a Xamarin.ios project, it gives me Unknown Build Error, for iPhone Device.
While Building for Simulator it builds fine.
The Error i get is somrthing like below.
Error: /Users/admin/Documents/projectdirectory/AppName.app: unknown error -1=ffffffffffffffff
I am using latest Xamarin and Xcode, and MVVM crosslight.
Please help in resolving.
The issue was with certificate. The app was not able to build properly as it wasn't able to find the certificate.
the issue got resolved by just restarting the machine.