Getting error on gradlew :app:assembleRelease on non-expo app

Getting weird error. What does it mean? I don’t need eas-build.gradle - can I get rid of it?

[RUN_GRADLEW] Running './gradlew :app:assembleRelease' in /var/folders/8w/f_666mh53h761mwwb9lmwq340000gq/T/eas-build-local-nodejs/d9325cd9-5f15-48a2-8476-bad43a4179c7/build/TheClub/android
[RUN_GRADLEW] > Configure project :app
[RUN_GRADLEW] Reading env from: .env
[RUN_GRADLEW] WARNING:DSL element 'dexOptions' is obsolete and should be removed.
[RUN_GRADLEW] It will be removed in version 8.0 of the Android Gradle plugin.
[RUN_GRADLEW] Using it has no effect, and the AndroidGradle plugin optimizes dexing automatically.
[RUN_GRADLEW] FAILURE: Build failed with an exception.
[RUN_GRADLEW] * Where:
[RUN_GRADLEW] Script '/private/var/folders/8w/f_666mh53h761mwwb9lmwq340000gq/T/eas-build-local-nodejs/d9325cd9-5f15-48a2-8476-bad43a4179c7/build/TheClub/android/app/eas-build.gradle' line: 24
[RUN_GRADLEW] * What went wrong:
[RUN_GRADLEW] A problem occurred configuring project ':app'.
[RUN_GRADLEW] > Could not create task ':app:lintAnalyzeDebug'.
[RUN_GRADLEW]    > No such property: signingConfigs for class: org.gradle.api.internal.provider.DefaultProperty
[RUN_GRADLEW] * Try:
[RUN_GRADLEW] 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.
[RUN_GRADLEW] * Get more help at https://help.gradle.org
[RUN_GRADLEW] Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
[RUN_GRADLEW] You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
[RUN_GRADLEW] See https://docs.gradle.org/7.2/userguide/command_line_interface.html#sec:command_line_warnings
[RUN_GRADLEW] BUILD FAILED in 10s
[RUN_GRADLEW] Error: Gradle build failed with unknown error. Please see logs for the "Run gradlew" phase.

If I put ./gradlew clean :app:assembleRelease as below in package.json, It BUILDs but then fails later with that error. Again, I don’t want eas-build.gradle even in the solution. And why is it trying to fix signingConfigs - I don’t need that either. And it is messing with my build.gradle.

"eas-build-post-install": "cd android && ./gradlew clean :app:assembleRelease",

Any advice?

We’re going to need a bit more context about the project. How are you trying to build it? How was the project initialized? Etc.

Sure.

  1. The project is a normal react-native init project. It has directories like ./android and ./ios.
  2. I build the project for android already using ./gradlew :app:assembleRelease and I get an APK and upload it to Google play store.
  3. Unfortunately this no longer works with your service. I get when the eas.json runs.

Running ‘./gradlew :app:assembleRelease’

  1. Here is my eas.json:
{
  "cli": {
    "version": ">= 0.48.2",
    "requireCommit": true
  },
  "build": {
    "production": {
      "yarn": "1.22.18",
      "node": "16.14.0",
      "distribution": "store",
      "android": {
        "image": "latest",
        "buildType": "app-bundle"
      },
      "ios": {
        "image": "latest",
        "cocoapods": "1.11.2",
        "buildConfiguration": "Release"
      }
    },
    "development": {
      "extends": "production",
      "distribution": "internal",
      "android": {
        "image": "latest",
        "gradleCommand": ":app:assembleRelease",
        "buildType": "apk"
      },
      "ios": {
        "image": "latest",
        "cocoapods": "1.11.2",
        "buildConfiguration": "Debug"
      }
    },
    "preview": {
      "extends": "production",
      "distribution": "internal"
    }
  },
  "submit": {
    "production": {}
  }
}
  1. Just wanting to do a eas build. But it fails. Here is my command:

eas build --profile production --platform android --non-interactive

I tried --local and that make it worse since the SECRETs are not there unless I run it without --local.

  1. I literally was able to get a build to work by doing the following:

“eas-build-post-install”: “cd android && ./gradlew :app:assembleRelease”,
Then uploading the APK to S3 manually to my personal S3, and then letting the rest of it fail.

  1. It appears your system is manipulating my build.gradle. Why? You are adding android/app/eas-build.gradle - and I literally don’t need it. I just need the command to run, and afterward you can copy the apk and store it. Then on eas submit take it and send it over to Google play store.

I think it has to do with the Gradle version. I am running 7.2. What is supported?

I also am running classpath ‘com.android.tools.build:gradle:7.0.4’

OK. The example “expo init” bare has Gradle 6.9 and classpath(“com.android.tools.build:gradle:4.1.0”). I want Gradle 7.2 and classpath ‘com.android.tools.build:gradle:7.0.4’. How do we fix this? Can EAS come out with support for that?

This is fixed!

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.