Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

234
Views
(React Native): Execution failed for task ':app:generatePackageList'

I am generating an apk of a project that I developed using React Native. But when I run the command ./gradlew assembleRelease The following error appears:

> Configure project :react-native-audio
WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed in version 5.0 of the Android Gradle plugin.
For more information, see http://d.android.com/r/tools/update-dependency-configurations.html.

> Task :app:generatePackageList FAILED

FAILURE: Build failed with an exception.

* Where:
Script 'C:\Users\romer\ProjetoAP\Gravador\teste\Gravador_de_audio\node_modules\@react-native-community\cli-platform-android\native_modules.gradle' line: 131

* What went wrong:
Execution failed for task ':app:generatePackageList'.
> argument type mismatch

* 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

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/7.0/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 24s
1 actionable task: 1 executed
PS C:\users\romer\ProjetoAP\Gravador\teste\Gravador_de_audio\android>

How to solve this problem?

over 4 years ago · Santiago Trujillo
6 answers
Answer question

0

I just ran across the same problem and was able to track down why it was happening on my system. Using the --stacktrace flag helped to figure out what was going on, which ended up pointing to the react-native-community/cli package.

After scanning the issues and PRs in the react-native-community/cli repo, I found this PR https://github.com/react-native-community/cli/pull/1396 which adds support for Gradle 7.

I had Gradle 7 on my system and downgrading to Gradle 6, running gradle wrapper, then ./gradlew clean allowed me to move on.

Hope that solves your issue, or at least gives you some insight on how to track it down on your system!

over 4 years ago · Santiago Trujillo Report

0

+1 for downgrade to 6. I wanted to do some upgrades today, but ended up opposite.

over 4 years ago · Santiago Trujillo Report

0

Use Gradle Version 6.9

Here are the highlights of this release:

  • This is a small backport release.
  • Java 16 can be used to compile when used with Java toolchains
  • Dynamic versions can be used within plugin declarations
  • Native support for Apple Silicon processors

Use Gradle Wrapper to change the Version.

./gradlew wrapper --gradle-version 6.9
over 4 years ago · Santiago Trujillo Report

0

Steps to solve it for React Native*

  1. Find apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project) in your app -> build.gradle.

  2. Check if this line of code is being repeated.

  3. Comment out one of them.

This should solve your issue.

over 4 years ago · Santiago Trujillo Report

0

Replacing distributionUrl with https\://services.gradle.org/distributions/gradle-6.9-all.zip in gradle/wrapper/gradle-wrapper.properties fixed everything for me. Thank GOD

over 4 years ago · Santiago Trujillo Report

0

Upgrade your react-native version to the latest one with npx react-native upgrade

I had to upgrade from JDK 1.8 to 11 and this error occurred.

Thanks to J Myers answer I found that I had to upgrade the react native version: https://github.com/react-native-community/cli/pull/1396

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!