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

Datastore without Cloud sync - Android build failing #4712

Closed
3 of 14 tasks
mjaydeep01 opened this issue Apr 15, 2024 · 6 comments
Closed
3 of 14 tasks

Datastore without Cloud sync - Android build failing #4712

mjaydeep01 opened this issue Apr 15, 2024 · 6 comments
Labels
datastore Issues related to the DataStore Category pending-close-response-required The issue will be closed if details necessary to reproduce the issue are not provided within 7 days. pending-community-response Pending response from the issue opener or other community members pending-triage This issue is in the backlog of issues to triage

Comments

@mjaydeep01
Copy link

mjaydeep01 commented Apr 15, 2024

Description

Tryin to setup datastore without syncing to cloud (without cognito). Working fine for IOS, but build failing for Android with following error.

  • What went wrong:
    Execution failed for task ':amplify_datastore:generateDebugRFile'.

A failure occurred while executing com.android.build.gradle.internal.res.GenerateLibraryRFileTask$GenerateLibRFileRunnable
/Users/../.gradle/caches/transforms-3/4ca4167c123fdb664319b0d36b43d617/transformed/com.amplifyframework.auth.cognito-r.txt

Categories

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

Steps to Reproduce

Flutter 3.19.4 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 68bfaea224 (4 weeks ago) • 2024-03-20 15:36:31 -0700
Engine • revision a5c24f538d
Tools • Dart 3.3.2 • DevTools 2.31.1

dependencies:
amplify_api: ^1.7.0
amplify_datastore: ^1.7.0
amplify_flutter: ^1.7.0

Followed Android platform setup introduction from "https://docs.amplify.aws/flutter/start/project-setup/platform-setup/#android"

android/build.gradle

buildscript {
ext.kotlin_version = '1.9.0'
repositories {
google()
mavenCentral()
}

dependencies {
    classpath 'com.android.tools.build:gradle:7.4.2'
    classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}

}

Error

  • What went wrong:
    Execution failed for task ':amplify_datastore:generateDebugRFile'.

A failure occurred while executing com.android.build.gradle.internal.res.GenerateLibraryRFileTask$GenerateLibRFileRunnable
/Users/mjaydeep/.gradle/caches/transforms-3/4ca4167c123fdb664319b0d36b43d617/transformed/com.amplifyframework.auth.cognito-r.txt

Screenshots

No response

Platforms

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

Flutter Version

3.19.4

Amplify Flutter Version

1.7.0

Deployment Method

Amplify CLI

Schema

No response

@Equartey Equartey added datastore Issues related to the DataStore Category pending-triage This issue is in the backlog of issues to triage labels Apr 15, 2024
@NikaHsn
Copy link
Member

NikaHsn commented Apr 15, 2024

@mjaydeep01 sorry that you are facing this issue and thanks for reporting it. would you share the the Gradle distributionUrl from the android/gradle/wrapper/gradle-wrapper.properties please.

@NikaHsn NikaHsn added the pending-community-response Pending response from the issue opener or other community members label Apr 15, 2024
@mjaydeep01
Copy link
Author

@NikaHsn, its, distributionUrl=https://services.gradle.org/distributions/gradle-7.6.3-all.zip

@NikaHsn NikaHsn removed the pending-community-response Pending response from the issue opener or other community members label Apr 18, 2024
@NikaHsn
Copy link
Member

NikaHsn commented Apr 18, 2024

@mjaydeep01 The issue you're encountering appears to be related to version incompatibilities in your Android build setup.
With Ampliy Flutter 1.8.0 android dependecies are updated, would it be possible for you to update your project to use below versions?

  • amplify flutter 1.8.0
  • kotlin version 1.9.10
  • java version 17
  • gradle version 8.1.0
  • gradle distribution url 8.1 (distributionUrl=https://services.gradle.org/distributions/gradle-8.1-all.zip)

@NikaHsn NikaHsn added the pending-community-response Pending response from the issue opener or other community members label Apr 18, 2024
@Jordan-Nelson
Copy link
Member

@mjaydeep01 were you able to @NikaHsn's suggestion above?

@Jordan-Nelson Jordan-Nelson added pending-close-response-required The issue will be closed if details necessary to reproduce the issue are not provided within 7 days. pending-community-response Pending response from the issue opener or other community members and removed pending-community-response Pending response from the issue opener or other community members labels Apr 30, 2024
@mjaydeep01
Copy link
Author

@NikaHsn @Jordan-Nelson, Yes, its working fine after using above configuration. Thanks.

@Jordan-Nelson
Copy link
Member

@mjaydeep01 I'm glad to hear that. I will close this issue then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
datastore Issues related to the DataStore Category pending-close-response-required The issue will be closed if details necessary to reproduce the issue are not provided within 7 days. pending-community-response Pending response from the issue opener or other community members pending-triage This issue is in the backlog of issues to triage
Projects
None yet
Development

No branches or pull requests

4 participants