Skip to content

Xamarin Forms Project does not compile when use Hianalytics #10

@rotsen24154

Description

@rotsen24154

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions