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

[Bug]: Not able to add OneSignalSDK.Xamarin from Nuget/Command Line in Xamarin Android native project #388

Open
2 of 3 tasks
seopower opened this issue Oct 3, 2024 · 0 comments

Comments

@seopower
Copy link

seopower commented Oct 3, 2024

What happened?

I have a xamarin android project tarheting Android 14 and when try to add following are the errors I am getting (attached log)

Steps to reproduce?

Try adding https://github.com/OneSignal/OneSignal-Xamarin-SDK in Xamarin Android (AndroidX) project targeting Android 14

What did you expect to happen?

It should install

OneSignal Xamarin SDK version

Release 4.3.5

Which platform(s) are affected?

  • iOS
  • Android

Relevant log output

Package Manager Output

Attempting to gather dependency information for package 'OneSignalSDK.Xamarin.4.3.5' with respect to project 'My Android Project', targeting 'MonoAndroid,Version=v13.0'
Gathering dependency information took 27.36 sec
Attempting to resolve dependencies for package 'OneSignalSDK.Xamarin.4.3.5' with DependencyBehavior 'Lowest'
One or more unresolved package dependency constraints detected in the existing packages.config file. All dependency constraints must be resolved to add or update packages. If these packages are being updated this message may be ignored, if not the following error(s) may be blocking the current package operation: 'Square.Picasso 2.71828.0 constraint: Xamarin.Android.Support.Annotations (>= 28.0.0.3)', 'Square.Picasso 2.71828.0 constraint: Xamarin.Android.Support.Exif (>= 28.0.0.3)'
Resolving dependency information took 0 ms
Resolving actions to install package 'OneSignalSDK.Xamarin.4.3.5'
Resolved actions to install package 'OneSignalSDK.Xamarin.4.3.5'
Adding package 'Xamarin.Google.Dagger.2.39.1' to folder 'D:\Android Development\My Android Project\My Android Project AndroidX\packages'
Added package 'Xamarin.Google.Dagger.2.39.1' to folder 'D:\Android Development\My Android Project\My Android Project AndroidX\packages'
Added package 'Xamarin.Google.Dagger.2.39.1' to 'packages.config'
Successfully installed 'Xamarin.Google.Dagger 2.39.1' to My Android Project
Adding package 'Xamarin.AndroidX.Room.Common.2.3.0.4' to folder 'D:\Android Development\My Android Project\My Android Project AndroidX\packages'
Added package 'Xamarin.AndroidX.Room.Common.2.3.0.4' to folder 'D:\Android Development\My Android Project\My Android Project AndroidX\packages'
Added package 'Xamarin.AndroidX.Room.Common.2.3.0.4' to 'packages.config'
Successfully installed 'Xamarin.AndroidX.Room.Common 2.3.0.4' to My Android Project
Adding package 'Xamarin.AndroidX.Sqlite.2.1.0.10' to folder 'D:\Android Development\My Android Project\My Android Project AndroidX\packages'
Added package 'Xamarin.AndroidX.Sqlite.2.1.0.10' to folder 'D:\Android Development\My Android Project\My Android Project AndroidX\packages'
Added package 'Xamarin.AndroidX.Sqlite.2.1.0.10' to 'packages.config'
Successfully installed 'Xamarin.AndroidX.Sqlite 2.1.0.10' to My Android Project
Adding package 'Xamarin.AndroidX.Sqlite.Framework.2.1.0.10' to folder 'D:\Android Development\My Android Project\My Android Project AndroidX\packages'
Added package 'Xamarin.AndroidX.Sqlite.Framework.2.1.0.10' to folder 'D:\Android Development\My Android Project\My Android Project AndroidX\packages'
Added package 'Xamarin.AndroidX.Sqlite.Framework.2.1.0.10' to 'packages.config'
Successfully installed 'Xamarin.AndroidX.Sqlite.Framework 2.1.0.10' to My Android Project
Adding package 'Xamarin.AndroidX.Room.Runtime.2.3.0.4' to folder 'D:\Android Development\My Android Project\My Android Project AndroidX\packages'
Added package 'Xamarin.AndroidX.Room.Runtime.2.3.0.4' to folder 'D:\Android Development\My Android Project\My Android Project AndroidX\packages'
Added package 'Xamarin.AndroidX.Room.Runtime.2.3.0.4' to 'packages.config'
Successfully installed 'Xamarin.AndroidX.Room.Runtime 2.3.0.4' to My Android Project
Adding package 'Xamarin.AndroidX.Lifecycle.LiveData.2.3.1.3' to folder 'D:\Android Development\My Android Project\My Android Project AndroidX\packages'
Added package 'Xamarin.AndroidX.Lifecycle.LiveData.2.3.1.3' to folder 'D:\Android Development\My Android Project\My Android Project AndroidX\packages'
Added package 'Xamarin.AndroidX.Lifecycle.LiveData.2.3.1.3' to 'packages.config'
Successfully installed 'Xamarin.AndroidX.Lifecycle.LiveData 2.3.1.3' to My Android Project
Adding package 'Xamarin.AndroidX.Browser.1.3.0.8' to folder 'D:\Android Development\My Android Project\My Android Project AndroidX\packages'
Added package 'Xamarin.AndroidX.Browser.1.3.0.8' to folder 'D:\Android Development\My Android Project\My Android Project AndroidX\packages'
Added package 'Xamarin.AndroidX.Browser.1.3.0.8' to 'packages.config'
Successfully installed 'Xamarin.AndroidX.Browser 1.3.0.8' to My Android Project
Adding package 'Xamarin.AndroidX.Lifecycle.Service.2.3.1.3' to folder 'D:\Android Development\My Android Project\My Android Project AndroidX\packages'
Added package 'Xamarin.AndroidX.Lifecycle.Service.2.3.1.3' to folder 'D:\Android Development\My Android Project\My Android Project AndroidX\packages'
Added package 'Xamarin.AndroidX.Lifecycle.Service.2.3.1.3' to 'packages.config'
Successfully installed 'Xamarin.AndroidX.Lifecycle.Service 2.3.1.3' to My Android Project
Adding package 'Xamarin.AndroidX.Work.Runtime.2.7.0' to folder 'D:\Android Development\My Android Project\My Android Project AndroidX\packages'
Added package 'Xamarin.AndroidX.Work.Runtime.2.7.0' to folder 'D:\Android Development\My Android Project\My Android Project AndroidX\packages'
Added package 'Xamarin.AndroidX.Work.Runtime.2.7.0' to 'packages.config'
Successfully installed 'Xamarin.AndroidX.Work.Runtime 2.7.0' to My Android Project
Adding package 'OneSignalSDK.Xamarin.4.3.5' to folder 'D:\Android Development\My Android Project\My Android Project AndroidX\packages'
Install failed. Rolling back...
Package 'OneSignalSDK.Xamarin.4.3.5 : Xamarin.AndroidX.AppCompat [1.3.1.3, ), Xamarin.AndroidX.Browser [1.3.0.8, ), Xamarin.AndroidX.CardView [1.0.0.11, ), Xamarin.AndroidX.Legacy.Support.V4 [1.0.0.10, ), Xamarin.AndroidX.Work.Runtime [2.7.0, ), Xamarin.Firebase.Messaging [122.0.0.2, ), Xamarin.Google.Dagger [2.39.1, ), Xamarin.Kotlin.StdLib.Jdk8 [1.5.31.2, )' does not exist in project 'My Android Project'
Removed package 'Xamarin.AndroidX.Work.Runtime.2.7.0 : Xamarin.AndroidX.Annotation.Experimental [1.1.0.3, ), Xamarin.AndroidX.Core [1.6.0.3, ), Xamarin.AndroidX.Lifecycle.LiveData [2.3.1.3, ), Xamarin.AndroidX.Lifecycle.Service [2.3.1.3, ), Xamarin.AndroidX.Room.Runtime [2.3.0.4, ), Xamarin.AndroidX.Sqlite [2.1.0.10, ), Xamarin.AndroidX.Sqlite.Framework [2.1.0.10, ), Xamarin.AndroidX.Startup.StartupRuntime [1.1.0.2, ), Xamarin.Google.Guava.ListenableFuture [1.0.0.4, )' from 'packages.config'
Removed package 'Xamarin.AndroidX.Lifecycle.Service.2.3.1.3 : Xamarin.AndroidX.Lifecycle.Runtime [2.3.1.4, )' from 'packages.config'
Removed package 'Xamarin.AndroidX.Browser.1.3.0.8 : Xamarin.AndroidX.Annotation [1.2.0.3, ), Xamarin.AndroidX.Collection [1.1.0.10, ), Xamarin.AndroidX.Concurrent.Futures [1.1.0.5, ), Xamarin.AndroidX.Core [1.6.0.3, ), Xamarin.AndroidX.Interpolator [1.0.0.10, ), Xamarin.Google.Guava.ListenableFuture [1.0.0.4, )' from 'packages.config'
Removed package 'Xamarin.AndroidX.Lifecycle.LiveData.2.3.1.3 : Xamarin.AndroidX.Arch.Core.Common [2.1.0.11, ), Xamarin.AndroidX.Arch.Core.Runtime [2.1.0.11, ), Xamarin.AndroidX.Lifecycle.LiveData.Core [2.3.1.3, )' from 'packages.config'
Removed package 'Xamarin.AndroidX.Room.Runtime.2.3.0.4 : Xamarin.AndroidX.Annotation.Experimental [1.1.0.3, ), Xamarin.AndroidX.Arch.Core.Runtime [2.1.0.11, ), Xamarin.AndroidX.Room.Common [2.3.0.4, ), Xamarin.AndroidX.Sqlite [2.1.0.10, ), Xamarin.AndroidX.Sqlite.Framework [2.1.0.10, )' from 'packages.config'
Removed package 'Xamarin.AndroidX.Sqlite.Framework.2.1.0.10 : Xamarin.AndroidX.Annotation [1.2.0.3, ), Xamarin.AndroidX.Sqlite [2.1.0.10, )' from 'packages.config'
Removed package 'Xamarin.AndroidX.Sqlite.2.1.0.10 : Xamarin.AndroidX.Annotation [1.2.0.3, )' from 'packages.config'
Removed package 'Xamarin.AndroidX.Room.Common.2.3.0.4 : Xamarin.AndroidX.Annotation [1.2.0.3, )' from 'packages.config'
Removed package 'Xamarin.Google.Dagger.2.39.1 : Xamarin.Javax.Inject [1.0.0, )' from 'packages.config'
Package 'OneSignalSDK.Xamarin.4.3.5 : Xamarin.AndroidX.AppCompat [1.3.1.3, ), Xamarin.AndroidX.Browser [1.3.0.8, ), Xamarin.AndroidX.CardView [1.0.0.11, ), Xamarin.AndroidX.Legacy.Support.V4 [1.0.0.10, ), Xamarin.AndroidX.Work.Runtime [2.7.0, ), Xamarin.Firebase.Messaging [122.0.0.2, ), Xamarin.Google.Dagger [2.39.1, ), Xamarin.Kotlin.StdLib.Jdk8 [1.5.31.2, )' does not exist in folder 'D:\Android Development\My Android Project\My Android Project AndroidX\packages'
Removing package 'Xamarin.AndroidX.Work.Runtime.2.7.0 : Xamarin.AndroidX.Annotation.Experimental [1.1.0.3, ), Xamarin.AndroidX.Core [1.6.0.3, ), Xamarin.AndroidX.Lifecycle.LiveData [2.3.1.3, ), Xamarin.AndroidX.Lifecycle.Service [2.3.1.3, ), Xamarin.AndroidX.Room.Runtime [2.3.0.4, ), Xamarin.AndroidX.Sqlite [2.1.0.10, ), Xamarin.AndroidX.Sqlite.Framework [2.1.0.10, ), Xamarin.AndroidX.Startup.StartupRuntime [1.1.0.2, ), Xamarin.Google.Guava.ListenableFuture [1.0.0.4, )' from folder 'D:\Android Development\My Android Project\My Android Project AndroidX\packages'
Removed package 'Xamarin.AndroidX.Work.Runtime.2.7.0 : Xamarin.AndroidX.Annotation.Experimental [1.1.0.3, ), Xamarin.AndroidX.Core [1.6.0.3, ), Xamarin.AndroidX.Lifecycle.LiveData [2.3.1.3, ), Xamarin.AndroidX.Lifecycle.Service [2.3.1.3, ), Xamarin.AndroidX.Room.Runtime [2.3.0.4, ), Xamarin.AndroidX.Sqlite [2.1.0.10, ), Xamarin.AndroidX.Sqlite.Framework [2.1.0.10, ), Xamarin.AndroidX.Startup.StartupRuntime [1.1.0.2, ), Xamarin.Google.Guava.ListenableFuture [1.0.0.4, )' from folder 'D:\Android Development\My Android Project\My Android Project AndroidX\packages'
Removing package 'Xamarin.AndroidX.Lifecycle.Service.2.3.1.3 : Xamarin.AndroidX.Lifecycle.Runtime [2.3.1.4, )' from folder 'D:\Android Development\My Android Project\My Android Project AndroidX\packages'
Removed package 'Xamarin.AndroidX.Lifecycle.Service.2.3.1.3 : Xamarin.AndroidX.Lifecycle.Runtime [2.3.1.4, )' from folder 'D:\Android Development\My Android Project\My Android Project AndroidX\packages'
Removing package 'Xamarin.AndroidX.Browser.1.3.0.8 : Xamarin.AndroidX.Annotation [1.2.0.3, ), Xamarin.AndroidX.Collection [1.1.0.10, ), Xamarin.AndroidX.Concurrent.Futures [1.1.0.5, ), Xamarin.AndroidX.Core [1.6.0.3, ), Xamarin.AndroidX.Interpolator [1.0.0.10, ), Xamarin.Google.Guava.ListenableFuture [1.0.0.4, )' from folder 'D:\Android Development\My Android Project\My Android Project AndroidX\packages'
Removed package 'Xamarin.AndroidX.Browser.1.3.0.8 : Xamarin.AndroidX.Annotation [1.2.0.3, ), Xamarin.AndroidX.Collection [1.1.0.10, ), Xamarin.AndroidX.Concurrent.Futures [1.1.0.5, ), Xamarin.AndroidX.Core [1.6.0.3, ), Xamarin.AndroidX.Interpolator [1.0.0.10, ), Xamarin.Google.Guava.ListenableFuture [1.0.0.4, )' from folder 'D:\Android Development\My Android Project\My Android Project AndroidX\packages'
Removing package 'Xamarin.AndroidX.Lifecycle.LiveData.2.3.1.3 : Xamarin.AndroidX.Arch.Core.Common [2.1.0.11, ), Xamarin.AndroidX.Arch.Core.Runtime [2.1.0.11, ), Xamarin.AndroidX.Lifecycle.LiveData.Core [2.3.1.3, )' from folder 'D:\Android Development\My Android Project\My Android Project AndroidX\packages'
Removed package 'Xamarin.AndroidX.Lifecycle.LiveData.2.3.1.3 : Xamarin.AndroidX.Arch.Core.Common [2.1.0.11, ), Xamarin.AndroidX.Arch.Core.Runtime [2.1.0.11, ), Xamarin.AndroidX.Lifecycle.LiveData.Core [2.3.1.3, )' from folder 'D:\Android Development\My Android Project\My Android Project AndroidX\packages'
Removing package 'Xamarin.AndroidX.Room.Runtime.2.3.0.4 : Xamarin.AndroidX.Annotation.Experimental [1.1.0.3, ), Xamarin.AndroidX.Arch.Core.Runtime [2.1.0.11, ), Xamarin.AndroidX.Room.Common [2.3.0.4, ), Xamarin.AndroidX.Sqlite [2.1.0.10, ), Xamarin.AndroidX.Sqlite.Framework [2.1.0.10, )' from folder 'D:\Android Development\My Android Project\My Android Project AndroidX\packages'
Removed package 'Xamarin.AndroidX.Room.Runtime.2.3.0.4 : Xamarin.AndroidX.Annotation.Experimental [1.1.0.3, ), Xamarin.AndroidX.Arch.Core.Runtime [2.1.0.11, ), Xamarin.AndroidX.Room.Common [2.3.0.4, ), Xamarin.AndroidX.Sqlite [2.1.0.10, ), Xamarin.AndroidX.Sqlite.Framework [2.1.0.10, )' from folder 'D:\Android Development\My Android Project\My Android Project AndroidX\packages'
Removing package 'Xamarin.AndroidX.Sqlite.Framework.2.1.0.10 : Xamarin.AndroidX.Annotation [1.2.0.3, ), Xamarin.AndroidX.Sqlite [2.1.0.10, )' from folder 'D:\Android Development\My Android Project\My Android Project AndroidX\packages'
Removed package 'Xamarin.AndroidX.Sqlite.Framework.2.1.0.10 : Xamarin.AndroidX.Annotation [1.2.0.3, ), Xamarin.AndroidX.Sqlite [2.1.0.10, )' from folder 'D:\Android Development\My Android Project\My Android Project AndroidX\packages'
Removing package 'Xamarin.AndroidX.Sqlite.2.1.0.10 : Xamarin.AndroidX.Annotation [1.2.0.3, )' from folder 'D:\Android Development\My Android Project\My Android Project AndroidX\packages'
Removed package 'Xamarin.AndroidX.Sqlite.2.1.0.10 : Xamarin.AndroidX.Annotation [1.2.0.3, )' from folder 'D:\Android Development\My Android Project\My Android Project AndroidX\packages'
Removing package 'Xamarin.AndroidX.Room.Common.2.3.0.4 : Xamarin.AndroidX.Annotation [1.2.0.3, )' from folder 'D:\Android Development\My Android Project\My Android Project AndroidX\packages'
Removed package 'Xamarin.AndroidX.Room.Common.2.3.0.4 : Xamarin.AndroidX.Annotation [1.2.0.3, )' from folder 'D:\Android Development\My Android Project\My Android Project AndroidX\packages'
Removing package 'Xamarin.Google.Dagger.2.39.1 : Xamarin.Javax.Inject [1.0.0, )' from folder 'D:\Android Development\My Android Project\My Android Project AndroidX\packages'
Removed package 'Xamarin.Google.Dagger.2.39.1 : Xamarin.Javax.Inject [1.0.0, )' from folder 'D:\Android Development\My Android Project\My Android Project AndroidX\packages'
Executing nuget actions took 37.15 sec
System.IO.DirectoryNotFoundException: Could not find a part of the path 'D:\Android Development\My Android Project\My Android Project AndroidX\packages\OneSignalSDK.Xamarin.4.3.5\res/iOS/OneSignalExtension.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalExtension.framework/Versions/A/Headers/OneSignalNotificationServiceExtensionHandler.h'.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.File.InternalCopy(String sourceFileName, String destFileName, Boolean overwrite, Boolean checkHost)
   at NuGet.Packaging.PackageFileExtractor.ExtractPackageFile(String source, String target, Stream stream)
   at NuGet.Packaging.PackageFolderReader.CopyFiles(String destination, IEnumerable`1 packageFiles, ExtractPackageFileDelegate extractFile, ILogger logger, CancellationToken token)
   at NuGet.Packaging.PackageReaderBase.CopyFilesAsync(String destination, IEnumerable`1 packageFiles, ExtractPackageFileDelegate extractFile, ILogger logger, CancellationToken cancellationToken)
   at NuGet.Packaging.PackageExtractor.<ExtractPackageAsync>d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at NuGet.ProjectManagement.FolderNuGetProject.<>c__DisplayClass13_0.<<InstallPackageAsync>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at NuGet.Common.ConcurrencyUtilities.<ExecuteWithFileLockedAsync>d__5`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at NuGet.Common.ConcurrencyUtilities.<ExecuteWithFileLockedAsync>d__5`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at NuGet.ProjectManagement.MSBuildNuGetProject.<InstallPackageAsync>d__36.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at NuGet.PackageManagement.NuGetPackageManager.<ExecuteInstallAsync>d__101.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at NuGet.PackageManagement.NuGetPackageManager.<ExecuteNuGetProjectActionsAsync>d__87.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at NuGet.PackageManagement.NuGetPackageManager.<ExecuteNuGetProjectActionsAsync>d__87.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at NuGet.PackageManagement.NuGetPackageManager.<ExecuteNuGetProjectActionsAsync>d__87.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at NuGet.PackageManagement.NuGetPackageManager.<ExecuteNuGetProjectActionsAsync>d__86.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at NuGet.PackageManagement.NuGetPackageManager.<ExecuteNuGetProjectActionsAsync>d__85.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at NuGet.PackageManagement.VisualStudio.NuGetProjectManagerService.<>c__DisplayClass20_0.<<ExecuteActionsAsync>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at NuGet.PackageManagement.VisualStudio.NuGetProjectManagerService.<CatchAndRethrowExceptionAsync>d__32.MoveNext()
Time Elapsed: 00:01:06.6610068
========== Finished ==========

Error Output

Severity	Code	Description	Project	File	Line	Suppression State
Error		Could not find a part of the path 'D:\Android Development\My Android Project\My Android Project AndroidX\packages\OneSignalSDK.Xamarin.4.3.5\res/iOS/OneSignalExtension.xcframework/ios-arm64_x86_64-maccatalyst/OneSignalExtension.framework/Versions/A/Headers/OneSignalNotificationServiceExtensionHandler.h'.

Code of Conduct

  • I agree to follow this project's Code of Conduct
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