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

When adding amplify_push_notifications_pinpoint dependency, the Android build fails #5739

Closed
2 of 14 tasks
ramon-san opened this issue Dec 1, 2024 · 5 comments
Closed
2 of 14 tasks
Assignees
Labels
pending-maintainer-response Pending response from a maintainer of this repository push notifications

Comments

@ramon-san
Copy link

Description

I am adding notifications to an app I'm building, but have trouble when implementing this for Android. I already did all the setup for iOS and it works just fine, but Android is causing trouble. By simply adding this line to my pubspec.yaml I get an error:

dependencies:
  flutter:
    sdk: flutter

  # The following adds the Amplify libraries used in the app.
  amplify_flutter: ^2.0.0
  amplify_analytics_pinpoint: ^2.0.0
  amplify_push_notifications_pinpoint: ^2.0.0

When I run the flutter run command I get the following error:

Launching lib/main.dart on sdk gphone64 arm64 in debug mode...

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':amplify_push_notifications:compileDebugKotlin'.
> Could not resolve all files for configuration ':amplify_push_notifications:kotlinCompilerPluginClasspathDebug'.
 > Could not find org.jetbrains.kotlin:kotlin-serialization-compiler-plugin-embeddable:1.8.22.
   Searched in the following locations:
     - https://dl.google.com/dl/android/maven2/org/jetbrains/kotlin/kotlin-serialization-compiler-plugin-embeddable/1.8.22/kotlin-serialization-compiler-plugin-embeddable-1.8.22.pom
     - https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-serialization-compiler-plugin-embeddable/1.8.22/kotlin-serialization-compiler-plugin-embeddable-1.8.22.pom
     - https://storage.googleapis.com/download.flutter.io/org/jetbrains/kotlin/kotlin-serialization-compiler-plugin-embeddable/1.8.22/kotlin-serialization-compiler-plugin-embeddable-1.8.22.pom
   Required by:
       project :amplify_push_notifications

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.

BUILD FAILED in 20s

When I run this same command on verbose (flutter run --verbose) I get the following output regarding this problem:

[        ] Resource missing. [HTTP GET:
https://dl.google.com/dl/android/maven2/org/jetbrains/kotlin/kotlin-serialization-compiler-plugin-embeddable/1.8.22/kotlin-serialization-compile
r-plugin-embeddable-1.8.22.pom]
[        ] Resource missing. [HTTP GET:
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-serialization-compiler-plugin-embeddable/1.8.22/kotlin-serialization-compiler-p
lugin-embeddable-1.8.22.pom]
[        ] Resource missing. [HTTP GET:
https://storage.googleapis.com/download.flutter.io/org/jetbrains/kotlin/kotlin-serialization-compiler-plugin-embeddable/1.8.22/kotlin-serializat
ion-compiler-plugin-embeddable-1.8.22.pom]
[        ] Resource missing. [HTTP GET:
https://dl.google.com/dl/android/maven2/org/jetbrains/kotlin/kotlin-serialization-compiler-plugin-embeddable/1.8.22/kotlin-serialization-compile
r-plugin-embeddable-1.8.22.pom]
[        ] Resource missing. [HTTP GET:
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-serialization-compiler-plugin-embeddable/1.8.22/kotlin-serialization-compiler-p
lugin-embeddable-1.8.22.pom]
[        ] Resource missing. [HTTP GET:
https://dl.google.com/dl/android/maven2/org/jetbrains/kotlin/kotlin-serialization-compiler-plugin-embeddable/1.8.22/kotlin-serialization-compile
r-plugin-embeddable-1.8.22.pom]
[        ] Resource missing. [HTTP GET:
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-serialization-compiler-plugin-embeddable/1.8.22/kotlin-serialization-compiler-p
lugin-embeddable-1.8.22.pom]
[        ] Resource missing. [HTTP GET:
https://dl.google.com/dl/android/maven2/org/jetbrains/kotlin/kotlin-serialization-compiler-plugin-embeddable/1.8.22/kotlin-serialization-compile
r-plugin-embeddable-1.8.22.pom]
[        ] Resource missing. [HTTP GET:
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-serialization-compiler-plugin-embeddable/1.8.22/kotlin-serialization-compiler-p
lugin-embeddable-1.8.22.pom]
[  +89 ms] Resource missing. [HTTP GET:
https://dl.google.com/dl/android/maven2/org/jetbrains/kotlin/kotlin-serialization-compiler-plugin-embeddable/1.8.22/kotlin-serialization-compile
r-plugin-embeddable-1.8.22.pom]
[ +197 ms] Resource missing. [HTTP GET:
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-serialization-compiler-plugin-embeddable/1.8.22/kotlin-serialization-compiler-p
lugin-embeddable-1.8.22.pom]
[ +199 ms] Resource missing. [HTTP GET:
https://dl.google.com/dl/android/maven2/org/jetbrains/kotlin/kotlin-serialization-compiler-plugin-embeddable/1.8.22/kotlin-serialization-compile
r-plugin-embeddable-1.8.22.pom]
[ +199 ms] Resource missing. [HTTP GET:
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-serialization-compiler-plugin-embeddable/1.8.22/kotlin-serialization-compiler-p
lugin-embeddable-1.8.22.pom]
[ +203 ms] Resource missing. [HTTP GET:
https://dl.google.com/dl/android/maven2/org/jetbrains/kotlin/kotlin-serialization-compiler-plugin-embeddable/1.8.22/kotlin-serialization-compile
r-plugin-embeddable-1.8.22.pom]
[ +197 ms] Resource missing. [HTTP GET:
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-serialization-compiler-plugin-embeddable/1.8.22/kotlin-serialization-compiler-p
lugin-embeddable-1.8.22.pom]
[ +200 ms] Resource missing. [HTTP GET:
https://dl.google.com/dl/android/maven2/org/jetbrains/kotlin/kotlin-serialization-compiler-plugin-embeddable/1.8.22/kotlin-serialization-compile
r-plugin-embeddable-1.8.22.pom]
[ +100 ms] Resource missing. [HTTP GET:
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-serialization-compiler-plugin-embeddable/1.8.22/kotlin-serialization-compiler-p
lugin-embeddable-1.8.22.pom]
[ +201 ms] Resource missing. [HTTP GET:
https://dl.google.com/dl/android/maven2/org/jetbrains/kotlin/kotlin-serialization-compiler-plugin-embeddable/1.8.22/kotlin-serialization-compile
r-plugin-embeddable-1.8.22.pom]
[ +199 ms] Resource missing. [HTTP GET:
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-serialization-compiler-plugin-embeddable/1.8.22/kotlin-serialization-compiler-p
lugin-embeddable-1.8.22.pom]
[ +200 ms] Resource missing. [HTTP GET:
https://dl.google.com/dl/android/maven2/org/jetbrains/kotlin/kotlin-serialization-compiler-plugin-embeddable/1.8.22/kotlin-serialization-compile
r-plugin-embeddable-1.8.22.pom]
[ +200 ms] Resource missing. [HTTP GET:
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-serialization-compiler-plugin-embeddable/1.8.22/kotlin-serialization-compiler-p
lugin-embeddable-1.8.22.pom]
[ +196 ms] Resource missing. [HTTP GET:
https://dl.google.com/dl/android/maven2/org/jetbrains/kotlin/kotlin-serialization-compiler-plugin-embeddable/1.8.22/kotlin-serialization-compile
r-plugin-embeddable-1.8.22.pom]
[ +202 ms] Resource missing. [HTTP GET:
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-serialization-compiler-plugin-embeddable/1.8.22/kotlin-serialization-compiler-p
lugin-embeddable-1.8.22.pom]
[ +200 ms] Resource missing. [HTTP GET:
https://dl.google.com/dl/android/maven2/org/jetbrains/kotlin/kotlin-serialization-compiler-plugin-embeddable/1.8.22/kotlin-serialization-compile
r-plugin-embeddable-1.8.22.pom]
[  +99 ms] Resource missing. [HTTP GET:
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-serialization-compiler-plugin-embeddable/1.8.22/kotlin-serialization-compiler-p
lugin-embeddable-1.8.22.pom]
[ +300 ms] Resource missing. [HTTP GET:
https://dl.google.com/dl/android/maven2/org/jetbrains/kotlin/kotlin-serialization-compiler-plugin-embeddable/1.8.22/kotlin-serialization-compile
r-plugin-embeddable-1.8.22.pom]
[ +200 ms] Resource missing. [HTTP GET:
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-serialization-compiler-plugin-embeddable/1.8.22/kotlin-serialization-compiler-p
lugin-embeddable-1.8.22.pom]
[        ] > Task :amplify_push_notifications:compileDebugKotlin FAILED
[   +1 ms] FAILURE: Build failed with an exception.
[   +4 ms] * What went wrong:
[        ] Execution failed for task ':amplify_push_notifications:compileDebugKotlin'.
[        ] > Could not resolve all files for configuration ':amplify_push_notifications:kotlinCompilerPluginClasspathDebug'.
[        ]    > Could not find org.jetbrains.kotlin:kotlin-serialization-compiler-plugin-embeddable:1.8.22.
[        ]      Searched in the following locations:
[        ]        -
https://dl.google.com/dl/android/maven2/org/jetbrains/kotlin/kotlin-serialization-compiler-plugin-embeddable/1.8.22/kotlin-serialization-compile
r-plugin-embeddable-1.8.22.pom
[        ]        -
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-serialization-compiler-plugin-embeddable/1.8.22/kotlin-serialization-compiler-p
lugin-embeddable-1.8.22.pom
[        ]        -
https://storage.googleapis.com/download.flutter.io/org/jetbrains/kotlin/kotlin-serialization-compiler-plugin-embeddable/1.8.22/kotlin-serializat
ion-compiler-plugin-embeddable-1.8.22.pom
[        ]      Required by:
[        ]          project :amplify_push_notifications
[        ] * Try:
[   +1 ms] > Run with --debug option to get more log output.
[        ] > Run with --scan to get full insights.
[        ] > Get more help at https://help.gradle.org.
[        ] * Exception is:
[        ] org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':amplify_push_notifications:compileDebugKotlin'.
[        ] 	at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:38)
[        ] 	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:77)
[        ] 	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:55)
[        ] 	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:52)
[        ] 	at
org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:204)
[        ] 	at
org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:199)
[        ] 	at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
[        ] 	at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
[        ] 	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
[        ] 	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
[        ] 	at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53)
[        ] 	at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:73)
[        ] 	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:52)
[        ] 	at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:42)
[        ] 	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:331)
[        ] 	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:318)
[        ] 	at
org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.lambda$execute$0(DefaultTaskExecutionGraph.java:314)
[        ] 	at org.gradle.internal.operations.CurrentBuildOperationRef.with(CurrentBuildOperationRef.java:80)
[        ] 	at
org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:314)
[        ] 	at
org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:303)
[        ] 	at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:463)
[        ] 	at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:380)
[        ] 	at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
[        ] 	at org.gradle.internal.concurrent.AbstractManagedExecutor$1.run(AbstractManagedExecutor.java:47)
[        ] 	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
[        ] 	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
[        ] 	at java.base/java.lang.Thread.run(Thread.java:1589)
[        ] Caused by: org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactResolveException: Could not resolve all
files for configuration ':amplify_push_notifications:kotlinCompilerPluginClasspathDebug'.
[        ] 	at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.mapFailure(DefaultConfiguration.java:1717)
[   +3 ms] 	at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.access$3500(DefaultConfiguration.java:173)
[   +1 ms] 	at
org.gradle.api.internal.artifacts.configurations.DefaultConfiguration$DefaultResolutionHost.mapFailure(DefaultConfiguration.java:2450)
[        ] 	at org.gradle.api.internal.artifacts.configurations.ResolutionHost.rethrowFailure(ResolutionHost.java:30)
[        ] 	at
org.gradle.api.internal.artifacts.configurations.ResolutionBackedFileCollection.visitContents(ResolutionBackedFileCollection.java:74)
[        ] 	at org.gradle.api.internal.file.AbstractFileCollection.visitStructure(AbstractFileCollection.java:366)
[        ] 	at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.visitContents(DefaultConfiguration.java:565)
[        ] 	at org.gradle.api.internal.file.AbstractFileCollection.visitStructure(AbstractFileCollection.java:366)
[        ] 	at
org.gradle.api.internal.file.collections.DefaultConfigurableFileCollection.lambda$calculateFinalizedValue$0(DefaultConfigurableFileCollection.ja
va:290)
[        ] 	at org.gradle.api.internal.file.collections.UnpackingVisitor.add(UnpackingVisitor.java:67)
[        ] 	at
org.gradle.api.internal.file.collections.DefaultConfigurableFileCollection$UnresolvedItemsCollector.visitContents(DefaultConfigurableFileCollect
ion.java:419)
[        ] 	at
org.gradle.api.internal.file.collections.DefaultConfigurableFileCollection.calculateFinalizedValue(DefaultConfigurableFileCollection.java:290)
[        ] 	at
org.gradle.api.internal.file.collections.DefaultConfigurableFileCollection.visitChildren(DefaultConfigurableFileCollection.java:321)
[        ] 	at org.gradle.api.internal.file.CompositeFileCollection.visitContents(CompositeFileCollection.java:133)
[        ] 	at org.gradle.api.internal.file.AbstractFileCollection.visitStructure(AbstractFileCollection.java:366)
[        ] 	at org.gradle.api.internal.file.CompositeFileCollection.lambda$visitContents$0(CompositeFileCollection.java:133)
[        ] 	at org.gradle.api.internal.file.collections.UnpackingVisitor.add(UnpackingVisitor.java:67)
[        ] 	at org.gradle.api.internal.file.collections.UnpackingVisitor.add(UnpackingVisitor.java:92)
[        ] 	at
org.gradle.api.internal.file.DefaultFileCollectionFactory$ResolvingFileCollection.visitChildren(DefaultFileCollectionFactory.java:285)
[        ] 	at org.gradle.api.internal.file.CompositeFileCollection.visitContents(CompositeFileCollection.java:133)
[        ] 	at org.gradle.api.internal.file.AbstractFileCollection.visitStructure(AbstractFileCollection.java:366)
[        ] 	at org.gradle.api.internal.file.CompositeFileCollection.lambda$visitContents$0(CompositeFileCollection.java:133)
[        ] 	at org.gradle.api.internal.tasks.PropertyFileCollection.visitChildren(PropertyFileCollection.java:48)
[        ] 	at org.gradle.api.internal.file.CompositeFileCollection.visitContents(CompositeFileCollection.java:133)
[        ] 	at org.gradle.api.internal.file.AbstractFileCollection.visitStructure(AbstractFileCollection.java:366)
[   +5 ms] 	at org.gradle.internal.fingerprint.impl.DefaultFileCollectionSnapshotter.snapshot(DefaultFileCollectionSnapshotter.java:47)
[        ] 	at
org.gradle.internal.execution.impl.DefaultInputFingerprinter$InputCollectingVisitor.visitInputFileProperty(DefaultInputFingerprinter.java:133)
[        ] 	at org.gradle.api.internal.tasks.execution.TaskExecution.visitRegularInputs(TaskExecution.java:328)
[        ] 	at org.gradle.internal.execution.impl.DefaultInputFingerprinter.fingerprintInputProperties(DefaultInputFingerprinter.java:63)
[        ] 	at
org.gradle.internal.execution.steps.CaptureStateBeforeExecutionStep.captureExecutionStateWithOutputs(CaptureStateBeforeExecutionStep.java:123)
[   +1 ms] 	at
org.gradle.internal.execution.steps.CaptureStateBeforeExecutionStep.lambda$captureExecutionState$1(CaptureStateBeforeExecutionStep.java:82)
[        ] 	at org.gradle.internal.execution.steps.BuildOperationStep$1.call(BuildOperationStep.java:37)
[        ] 	at
org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:204)
[        ] 	at
org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:199)
[        ] 	at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
[        ] 	at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
[        ] 	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
[        ] 	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
[        ] 	at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53)
[        ] 	at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:73)
[        ] 	at org.gradle.internal.execution.steps.BuildOperationStep.operation(BuildOperationStep.java:34)
[        ] 	at
org.gradle.internal.execution.steps.CaptureStateBeforeExecutionStep.captureExecutionState(CaptureStateBeforeExecutionStep.java:76)
[        ] 	at org.gradle.internal.execution.steps.CaptureStateBeforeExecutionStep.lambda$execute$0(CaptureStateBeforeExecutionStep.java:70)
[        ] 	at java.base/java.util.Optional.map(Optional.java:260)
[        ] 	at org.gradle.internal.execution.steps.CaptureStateBeforeExecutionStep.execute(CaptureStateBeforeExecutionStep.java:70)
[        ] 	at org.gradle.internal.execution.steps.CaptureStateBeforeExecutionStep.execute(CaptureStateBeforeExecutionStep.java:45)
[        ] 	at org.gradle.internal.execution.steps.SkipEmptyWorkStep.executeWithNonEmptySources(SkipEmptyWorkStep.java:177)
[        ] 	at org.gradle.internal.execution.steps.SkipEmptyWorkStep.execute(SkipEmptyWorkStep.java:86)
[        ] 	at org.gradle.internal.execution.steps.SkipEmptyWorkStep.execute(SkipEmptyWorkStep.java:53)
[        ] 	at org.gradle.internal.execution.steps.RemoveUntrackedExecutionStateStep.execute(RemoveUntrackedExecutionStateStep.java:32)
[        ] 	at org.gradle.internal.execution.steps.RemoveUntrackedExecutionStateStep.execute(RemoveUntrackedExecutionStateStep.java:21)
[        ] 	at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsStartedStep.execute(MarkSnapshottingInputsStartedStep.java:38)
[        ] 	at org.gradle.internal.execution.steps.LoadPreviousExecutionStateStep.execute(LoadPreviousExecutionStateStep.java:36)
[        ] 	at org.gradle.internal.execution.steps.LoadPreviousExecutionStateStep.execute(LoadPreviousExecutionStateStep.java:23)
[   +2 ms] 	at org.gradle.internal.execution.steps.CleanupStaleOutputsStep.execute(CleanupStaleOutputsStep.java:75)
[        ] 	at org.gradle.internal.execution.steps.CleanupStaleOutputsStep.execute(CleanupStaleOutputsStep.java:41)
[        ] 	at
org.gradle.internal.execution.steps.ExecuteWorkBuildOperationFiringStep.lambda$execute$2(ExecuteWorkBuildOperationFiringStep.java:66)
[        ] 	at java.base/java.util.Optional.orElseGet(Optional.java:364)
[        ] 	at org.gradle.internal.execution.steps.ExecuteWorkBuildOperationFiringStep.execute(ExecuteWorkBuildOperationFiringStep.java:66)
[   +2 ms] 	at org.gradle.internal.execution.steps.ExecuteWorkBuildOperationFiringStep.execute(ExecuteWorkBuildOperationFiringStep.java:38)
[   +1 ms] 	at org.gradle.internal.execution.steps.AssignWorkspaceStep.lambda$execute$0(AssignWorkspaceStep.java:32)
[        ] 	at org.gradle.api.internal.tasks.execution.TaskExecution$4.withWorkspace(TaskExecution.java:293)
[        ] 	at org.gradle.internal.execution.steps.AssignWorkspaceStep.execute(AssignWorkspaceStep.java:30)
[        ] 	at org.gradle.internal.execution.steps.AssignWorkspaceStep.execute(AssignWorkspaceStep.java:21)
[        ] 	at org.gradle.internal.execution.steps.IdentityCacheStep.execute(IdentityCacheStep.java:37)
[        ] 	at org.gradle.internal.execution.steps.IdentityCacheStep.execute(IdentityCacheStep.java:27)
[        ] 	at org.gradle.internal.execution.steps.IdentifyStep.execute(IdentifyStep.java:47)
[        ] 	at org.gradle.internal.execution.steps.IdentifyStep.execute(IdentifyStep.java:34)
[        ] 	at org.gradle.internal.execution.impl.DefaultExecutionEngine$1.execute(DefaultExecutionEngine.java:64)
[        ] 	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeIfValid(ExecuteActionsTaskExecuter.java:146)
[        ] 	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:135)
[        ] 	at org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute(FinalizePropertiesTaskExecuter.java:46)
[        ] 	at org.gradle.api.internal.tasks.execution.ResolveTaskExecutionModeExecuter.execute(ResolveTaskExecutionModeExecuter.java:51)
[        ] 	at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:57)
[        ] 	at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:74)
[        ] 	at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:36)
[        ] 	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:77)
[        ] 	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:55)
[        ] 	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:52)
[        ] 	at
org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:204)
[        ] 	at
org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:199)
[        ] 	at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
[        ] 	at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
[        ] 	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
[        ] 	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
[        ] 	at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53)
[        ] 	at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:73)
[        ] 	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:52)
[        ] 	at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:42)
[        ] 	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:331)
[        ] 	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:318)
[        ] 	at
org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.lambda$execute$0(DefaultTaskExecutionGraph.java:314)
[        ] 	at org.gradle.internal.operations.CurrentBuildOperationRef.with(CurrentBuildOperationRef.java:80)
[        ] 	at
org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:314)
[        ] 	at
org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:303)
[        ] 	at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:463)
[        ] 	at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:380)
[        ] 	at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
[        ] 	at org.gradle.internal.concurrent.AbstractManagedExecutor$1.run(AbstractManagedExecutor.java:47)
[        ] 	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
[        ] 	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
[        ] 	at java.base/java.lang.Thread.run(Thread.java:1589)
[        ] Caused by: org.gradle.internal.resolve.ModuleVersionNotFoundException: Could not find
org.jetbrains.kotlin:kotlin-serialization-compiler-plugin-embeddable:1.8.22.
[        ] Searched in the following locations:
[        ]   -
https://dl.google.com/dl/android/maven2/org/jetbrains/kotlin/kotlin-serialization-compiler-plugin-embeddable/1.8.22/kotlin-serialization-compile
r-plugin-embeddable-1.8.22.pom
[        ]   -
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-serialization-compiler-plugin-embeddable/1.8.22/kotlin-serialization-compiler-p
lugin-embeddable-1.8.22.pom
[        ]   -
https://storage.googleapis.com/download.flutter.io/org/jetbrains/kotlin/kotlin-serialization-compiler-plugin-embeddable/1.8.22/kotlin-serializat
ion-compiler-plugin-embeddable-1.8.22.pom
[        ] Required by:
[        ]     project :amplify_push_notifications
[        ] BUILD FAILED in 7s
[        ] 113 actionable tasks: 33 executed, 80 up-to-date
[        ] Watched directory hierarchies: [/opt/homebrew/Caskroom/flutter/3.24.3/flutter/packages/flutter_tools/gradle,
/Users/myuser/pey/mobile_test/android, /Users/myuser/pey/mobile_app/android]
[ +377 ms] Running Gradle task 'assembleDebug'... (completed in 8.2s)
[ +206 ms] Error: Gradle task assembleDebug failed with exit code 1
[   +1 ms] "flutter run" took 13,327ms.
[  +20 ms] 
         #0      throwToolExit (package:flutter_tools/src/base/common.dart:10:3)
         #1      RunCommand.runCommand (package:flutter_tools/src/commands/run.dart:874:9)
         <asynchronous suspension>
         #2      FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1408:27)
         <asynchronous suspension>
         #3      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:153:19)
         <asynchronous suspension>
         #4      CommandRunner.runCommand (package:args/command_runner.dart:212:13)
         <asynchronous suspension>
         #5      FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:420:9)
         <asynchronous suspension>
         #6      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:153:19)
         <asynchronous suspension>
         #7      FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:364:5)
         <asynchronous suspension>
         #8      run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:130:9)
         <asynchronous suspension>
         #9      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:153:19)
         <asynchronous suspension>
         #10     main (package:flutter_tools/executable.dart:93:3)
         <asynchronous suspension>
         
         
[  +69 ms] ensureAnalyticsSent: 68ms
[        ] Running 2 shutdown hooks
[   +1 ms] Shutdown hooks complete
[   +4 ms] exiting with code 1

I already tried rebuilding the project after using flutter clean and ./gradlew clean, but the error persists. Also tried building from a clean copy of the repository and the error continues. I also ran the flutter doctor -v command and everything is okay with Flutter:

[✓] Flutter (Channel stable, 3.24.3, on macOS 14.6.1 23G93 darwin-arm64, locale en-MX)
  • Flutter version 3.24.3 on channel stable at /opt/homebrew/Caskroom/flutter/3.24.3/flutter
  • Upstream repository https://github.com/flutter/flutter.git
  • Framework revision 2663184aa7 (3 months ago), 2024-09-11 16:27:48 -0500
  • Engine revision 36335019a8
  • Dart version 3.5.3
  • DevTools version 2.37.3

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
  • Android SDK at /Users/myuser/Library/Android/sdk
  • Platform android-34, build-tools 33.0.1
  • ANDROID_HOME = /Users/myuser/Library/Android/sdk
  • Java binary at: /Library/Java/JavaVirtualMachines/jdk-19.jdk/Contents/Home/bin/java
  • Java version Java(TM) SE Runtime Environment (build 19+36-2238)
  • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 16.1)
  • Xcode at /Applications/Xcode.app/Contents/Developer
  • Build 16B40
  • CocoaPods version 1.15.2

[✓] Chrome - develop for the web
  • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2024.2)
  • Android Studio at /Applications/Android Studio.app/Contents
  • Flutter plugin can be installed from:
    🔨 https://plugins.jetbrains.com/plugin/9212-flutter
  • Dart plugin can be installed from:
    🔨 https://plugins.jetbrains.com/plugin/6351-dart
  • Java version OpenJDK Runtime Environment (build 21.0.3+-79915917-b509.11)

[✓] IntelliJ IDEA Community Edition (version 2021.3)
  • IntelliJ at /Applications/IntelliJ IDEA CE.app
  • Flutter plugin can be installed from:
    🔨 https://plugins.jetbrains.com/plugin/9212-flutter
  • Dart plugin can be installed from:
    🔨 https://plugins.jetbrains.com/plugin/6351-dart

[✓] VS Code (version 1.95.3)
  • VS Code at /Applications/Visual Studio Code.app/Contents
  • Flutter extension version 3.100.0

[✓] Connected device (6 available)
  • sdk gphone64 arm64 (mobile)     • emulator-5554                        • android-arm64  • Android 14 (API 34) (emulator)
  • My iPhone (mobile)         • 00008120-001C4C142EE0C01E            • ios            • iOS 18.2 22C5142a
  • iPhone 16 Pro (mobile)          • E698D86B-98B3-43C6-90DC-DFDFD61F0C0E • ios            • com.apple.CoreSimulator.SimRuntime.iOS-18-1
    (simulator)
  • macOS (desktop)                 • macos                                • darwin-arm64   • macOS 14.6.1 23G93 darwin-arm64
  • Mac Designed for iPad (desktop) • mac-designed-for-ipad                • darwin         • macOS 14.6.1 23G93 darwin-arm64
  • Chrome (web)                    • chrome                               • web-javascript • Google Chrome 131.0.6778.86

[✓] Network resources
  • All expected network resources are available.

• No issues found!

Not sure what would be the most appropriate fix or if this is a known issue, my current gradle config files are the following:

// settings.gradle 

pluginManagement {
    def flutterSdkPath = {
        def properties = new Properties()
        file("local.properties").withInputStream { properties.load(it) }
        def flutterSdkPath = properties.getProperty("flutter.sdk")
        assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
        return flutterSdkPath
    }()

    includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")

    repositories {
        google()
        mavenCentral()
        gradlePluginPortal()
    }
}

plugins {
    id "dev.flutter.flutter-plugin-loader" version "1.0.0"
    id "com.android.application" version "8.1.0" apply false
    id "org.jetbrains.kotlin.android" version "1.8.22" apply false
}

include ":app"
// android/build.gradle

allprojects {
    repositories {
        google()
        mavenCentral()
    }
}

rootProject.buildDir = "../build"
subprojects {
    project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
    project.evaluationDependsOn(":app")
}

tasks.register("clean", Delete) {
    delete rootProject.buildDir
}
// android/app/build.gradle

plugins {
    id "com.android.application"
    id "kotlin-android"
    // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
    id "dev.flutter.flutter-gradle-plugin"
}

def getKeystoreProperties(flavor) {
    def properties = new Properties()
    def propertiesFile = rootProject.file("key.${flavor}.properties")
    if (propertiesFile.exists()) {
        properties.load(new FileInputStream(propertiesFile))
    }
    return properties
}

android {
    namespace = "com.pey.android.app"
    compileSdk = flutter.compileSdkVersion
    ndkVersion = flutter.ndkVersion

    compileOptions {
        sourceCompatibility = JavaVersion.VERSION_1_8
        targetCompatibility = JavaVersion.VERSION_1_8
    }

    kotlinOptions {
        jvmTarget = JavaVersion.VERSION_1_8
    }

    defaultConfig {
        applicationId = "com.pey.android.app"
        // For more information, see: https://flutter.dev/to/review-gradle-config.
        minSdkVersion = 24
        targetSdk = flutter.targetSdkVersion
        versionCode = flutter.versionCode
        versionName = flutter.versionName
    }

    signingConfigs {
        dev {
            def devProperties = getKeystoreProperties('dev')
            keyAlias = devProperties['keyAlias']
            keyPassword = devProperties['keyPassword']
            storeFile = devProperties['storeFile'] ? file(devProperties['storeFile']) : null
            storePassword = devProperties['storePassword']
        }
        
        prod {
            def prodProperties = getKeystoreProperties('prod')
            keyAlias = prodProperties['keyAlias']
            keyPassword = prodProperties['keyPassword']
            storeFile = prodProperties['storeFile'] ? file(prodProperties['storeFile']) : null
            storePassword = prodProperties['storePassword']
        }
    }

    buildTypes {
        release {
            // The signing config will be assigned based on the flavor
            signingConfig = null
        }
    }

    flavorDimensions "environment"

    productFlavors {
        dev {
            dimension = "environment"
            resValue "string", "app_name", "pey-dev"
            resValue "string", "website_domain_name", "app.dev.mipey.mx"
            applicationIdSuffix = ".dev"
            signingConfig = signingConfigs.dev
        }

        prod {
            dimension = "environment"
            resValue "string", "app_name", "pey"
            resValue "string", "website_domain_name", "app.mipey.mx"
            signingConfig = signingConfigs.prod
        }
    }
}

dependencies {
    implementation 'com.stripe:stripe-android:17.1.1'
}

flutter {
    source = "../.."
}

This all worked just fine with all the other Amplify imports that I use, but caused problems with amplify_push_notifications_pinpoint. My complete pubspec.yaml is this:

name: pey
description: "Mobile app used for pey consumers."
publish_to: 'none'

version: 1.0.17+17

environment:
  sdk: ^3.5.3

dependencies:
  flutter:
    sdk: flutter
  cupertino_icons: ^1.0.8

  # The following helps handle routing for app screens.
  go_router: ^14.2.8

  # The following adds the Amplify libraries used in the app.
  amplify_flutter: ^2.0.0
  amplify_auth_cognito: ^2.0.0
  amplify_authenticator: ^2.0.0
  amplify_api: ^2.0.0
  amplify_analytics_pinpoint: ^2.0.0
  amplify_push_notifications_pinpoint: ^2.0.0

dev_dependencies:
  flutter_test:
    sdk: flutter
  flutter_lints: ^4.0.0

# The following section is specific to Flutter packages.
flutter:
  uses-material-design: true
  assets:
    - assets/

Categories

  • Analytics
  • API (REST)
  • API (GraphQL)
  • Auth
  • Authenticator
  • DataStore
  • Notifications (Push)
  • Storage

Steps to Reproduce

Create an amplify project using the configs mentioned in the description, then try adding the amplify_push_notifications_pinpoint library and executing flutter run for Android.

Screenshots

No response

Platforms

  • iOS
  • Android
  • Web
  • macOS
  • Windows
  • Linux

Flutter Version

3.24.3

Amplify Flutter Version

^2.0.0

Deployment Method

AWS CDK

Schema

No response

@github-actions github-actions bot added pending-triage This issue is in the backlog of issues to triage pending-maintainer-response Pending response from a maintainer of this repository labels Dec 1, 2024
@ekjotmultani
Copy link
Member

ekjotmultani commented Dec 2, 2024

Hello @ramon-san, thank you for taking the time to raise this issue. Are you using Gen 1, or setting up push notifications on a Gen 2 app? I don't seem to be able to reproduce this particular error on my end with a Gen 1 app, and using the push notifications library isn't directly supported for Gen 2 (generally you may look at using AWS SNS to set up a pubsub model for push notifications).

@github-actions github-actions bot removed the pending-maintainer-response Pending response from a maintainer of this repository label Dec 2, 2024
@ekjotmultani ekjotmultani self-assigned this Dec 2, 2024
@NikaHsn NikaHsn added the pending-community-response Pending response from the issue opener or other community members label Dec 3, 2024
@ramon-san
Copy link
Author

Answering your questions

Thanks for the response @ekjotmultani!

I am a bit confused as in the question regarding if my app is Gen 1 or Gen 2. I try to follow the Gen 2 docs as much as possible, but there are features from Gen 1 that are not documented in Gen 2. The libraries are also the same between Gen 1 and Gen 2, so if you let me know how to differentiate between these two generations I can inform you. As of my current understanding I would say I use both Gen 1 and Gen 2.

I am sure I followed the Gen 2 documentation for:

  • REST API configuration
  • GraphQL API configuration
  • Authentication and the Authenticator component

Where I followed the Gen 1 documentation is in:

Here is a copy of my amplifyconfig.dart file, not sure if we can asume I use Gen 2 based on this?

// Configs
import 'package:pey/configs/constants.dart';

const amplifyConfig = {
  "UserAgent": "aws-amplify-cli/2.0",
  "Version": "1.0",
  "analytics": {
    "plugins": {
      "awsPinpointAnalyticsPlugin": {
        "pinpointAnalytics": {
          "appId": EnvironmentVars.pinpointAppId,
          "region": EnvironmentVars.awsRegion
        },
        "pinpointTargeting": {"region": EnvironmentVars.awsRegion}
      }
    }
  },
  "notifications": {
    "plugins": {
      "awsPinpointPushNotificationsPlugin": {
        "appId": EnvironmentVars.pinpointAppId,
        "region": EnvironmentVars.awsRegion
      }
    }
  },
  "auth": {
    "plugins": {
      "awsCognitoAuthPlugin": {
        "IdentityManager": {"Default": {}},
        "CredentialsProvider": {
          "CognitoIdentity": {
            "Default": {
              "PoolId": EnvironmentVars.cognitoIdentityPoolId,
              "Region": EnvironmentVars.awsRegion
            }
          }
        },
        "CognitoUserPool": {
          "Default": {
            "PoolId": EnvironmentVars.cognitoUserPoolId,
            "AppClientId": EnvironmentVars.cognitoUserPoolAppClientId,
            "Region": EnvironmentVars.awsRegion
          }
        },
        "Auth": {
          "Default": {
            "authenticationFlowType": "USER_SRP_AUTH",
            "socialProviders": ["GOOGLE", "APPLE"],
            "usernameAttributes": ["EMAIL"],
            "signupAttributes": [],
            "passwordProtectionSettings": {
              "passwordPolicyMinLength": 8,
              "passwordPolicyCharacters": []
            },
            "OAuth": {
              "WebDomain": EnvironmentVars.cognitoDomain,
              "AppClientId": EnvironmentVars.cognitoUserPoolAppClientId,
              "SignInRedirectURI": "pey://",
              "SignOutRedirectURI": "pey://",
              "Scopes": [
                "email",
                "openid",
                "phone",
                "aws.cognito.signin.user.admin"
              ],
            }
          }
        },
        "PinpointAnalytics": {
          "Default": {
            "AppId": EnvironmentVars.pinpointAppId,
            "Region": EnvironmentVars.awsRegion
          }
        },
        "PinpointTargeting": {
          "Default": {"Region": EnvironmentVars.awsRegion}
        }
      }
    }
  },
  "api": {
    "plugins": {
      "awsAPIPlugin": {
        "ApiGraphQL": {
          "endpointType": "GraphQL",
          "endpoint": EnvironmentVars.appSyncEndpoint,
          "region": EnvironmentVars.awsRegion,
          "authorizationType": "AMAZON_COGNITO_USER_POOLS"
        },
        "ApiREST": {
          "endpointType": "REST",
          "endpoint": EnvironmentVars.apiGatewayEndpoint,
          "region": EnvironmentVars.awsRegion,
          "authorizationType": "NONE"
        }
      }
    }
  }
};

As you can see I don't use the CLI to configure Amplify in my project, I build my backend independently using CDK and then import existing resources into my project based on the environment I am using. I also copy the function I use to configure my Amplify resources in the main.dart file.

Future<void> configureAmplify() async {
  try {
    if (Amplify.isConfigured) {
      safePrint("Amplify is already configured 🎉");
      return;
    }

    await Amplify.addPlugins([
      AmplifyAnalyticsPinpoint(),
      AmplifyAuthCognito(),
      AmplifyPushNotificationsPinpoint(),
      AmplifyAPI(),
    ]);

    await Amplify.configure(jsonEncode(amplifyConfig));
    safePrint("Successfully configured Amplify 🎉");
  } on Exception catch (e) {
    safePrint('An error occurred configuring Amplify: $e');
    rethrow;
  }
}

Solving the issue

Right now I just plugged the GitHub issue into Claude and it helped me solve the issue with simple changes to my Gradle configuration files. I copy the changes that solved my issue:

  1. In the android/build.gradle file I added this to the top of the file:
buildscript {
    ext.kotlin_version = '1.8.22'
    repositories {
        google()
        mavenCentral()
    }
    dependencies {
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlin_version"
    }
}
  1. In the android/app/build.gradle file I added the kotlinx-serialization plugin.
plugins {
    id "com.android.application"
    id "kotlin-android"
    id "kotlinx-serialization"
    // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
    id "dev.flutter.flutter-gradle-plugin"
}

I am not a big fan of this solution because it seems like the Amplify library should simply work with the default Flutter configurations set on Gradle, but for now this solved the issue and the app is able to run.

Feedback

The documentation that exists for integrating notification on Android (this and this) is very confusing and not high quality. I want to integrate this without having to connect with the Firebase CLI (no need for the whole Firebase integration if I only want notifications to work), but the docs are not a good guide for doing so.

The aforementioned docs do a great job explaining how to integrate notifications on iOS, but not so for Android. As I previously mentioned, push notifications work well on iOS which means the configuration is working, but causes some problems with Android. I still need to connect my Firebase resources in order to set up Android notifications, but the docs are so painful to follow that I decided to ship some other features before I got back to this. Will work on it tonight and let you know when I have Android notifications working as well.

@github-actions github-actions bot added pending-maintainer-response Pending response from a maintainer of this repository and removed pending-community-response Pending response from the issue opener or other community members labels Dec 3, 2024
@ekjotmultani
Copy link
Member

Hi @ramon-san, thank you very much for providing these details, given the config file I can see that you are using the package from Gen 1 in a Gen 2 app. I suspect this is why this issue with the kotlin-serialization arose, since this isn't a directly supported way to integrate push notifications into an app (the Gen 1 Amplify CLI has some configuration it does that sets up its dependencies for you). The solution given from Claude with appending the dependency to the gradle file should be fine, glad to see it allows the app to run.

Thank you for the feedback on our documentation as well, it is good to know that it is confusing going back and forth on two pages to set up the push notifications. This feedback will allow us to improve our documentation going forward, so thanks again! As for using Amplify push notifications without Firebase integration, it is unfortunately a requirement of the implementation that a Firebase Cloud Messaging key is needed for notifications to work on Android. You should not have to use the Firebase CLI however, having the json file from the Firebase console should be enough.

Please let me know if you have any questions or other issues when you get to working on Android notifications in your application, otherwise since the initial issue has a resolution I will be closing out this issue. Thank you again for the thought and care you provide in your responses and issue descriptions.

@github-actions github-actions bot removed pending-triage This issue is in the backlog of issues to triage pending-maintainer-response Pending response from a maintainer of this repository labels Dec 4, 2024
Copy link

github-actions bot commented Dec 4, 2024

This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.

@ramon-san
Copy link
Author

Thanks for the help and clarifications @ekjotmultani! Just finished integrating notifications for Android and it works just fine. As you point out, I didn't have to use any Firebase CLI. Just added google-services to my Gradle plugins plus the JSON file from Firebase and notifications started working.

@github-actions github-actions bot added the pending-maintainer-response Pending response from a maintainer of this repository label Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pending-maintainer-response Pending response from a maintainer of this repository push notifications
Projects
None yet
Development

No branches or pull requests

3 participants