Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
183
rated 0 times [  186] [ 3]  / answers: 1 / hits: 33501  / 3 Years ago, wed, april 14, 2021, 12:00:00

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:UsersromerProjetoAPGravadortesteGravador_de_audionode_modules@react-native-communitycli-platform-androidnative_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:usersromerProjetoAPGravadortesteGravador_de_audioandroid>

How to solve this problem?


More From » android

 Answers
21

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!


[#50316] Monday, March 22, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
luzv

Total Points: 178
Total Questions: 105
Total Answers: 114

Location: Palau
Member since Tue, May 30, 2023
1 Year ago
;