Skip to content
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

Xamarin Forms Project does not compile when use Hianalytics #10

Open
rotsen24154 opened this issue Jun 16, 2022 · 0 comments
Open

Xamarin Forms Project does not compile when use Hianalytics #10

rotsen24154 opened this issue Jun 16, 2022 · 0 comments

Comments

@rotsen24154
Copy link

rotsen24154 commented Jun 16, 2022

I am trying to integrate Huawei Analytics on my Xamarin Forms App, I added the nugets, and if I compile the project everything works well, but when I add this line:

Huawei.Hms.Analytics.HiAnalyticsInstance instance;

I got this message

The process cannot access the file 'ProjectRoute\obj\Debug\120\androidx\cecil\Huawei.Hms.Hianalytics.dll' because it is being used by another process.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
   at Mono.Cecil.ModuleDefinition.ReadModule(String fileName, ReaderParameters parameters)
   at Xamarin.AndroidX.Migration.CecilMigrator.ReadAssembly(AssemblyResolver resolver, String path)
   at Xamarin.AndroidX.Migration.CecilMigrator.Migrate(String source, String destination)
   at Xamarin.AndroidX.Migration.CecilMigrator.Migrate(IEnumerable`1 assemblies)
   at Xamarin.AndroidX.Migration.BuildTasks.CecilfyFiles.Execute()	

I am using the last nuget version from HiAnalytics.
image

This is the code that cause all the problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant