Gradle sync failure
See original GitHub issueOS:
- MacOS
Platform:
- Android
SDK:
-
@sentry/react-native
SDK version: 4.9.0, 4.10.0
react-native
version: 0.68.5
Are you using Expo?
- No
Are you using sentry.io or on-premise?
- sentry.io (SaaS)
- on-premise
I have following issue:
Gradle sync failure, and could not build project
Steps to reproduce:
- Updated react-native sentry package from 4.8.0 to 4.9.0 and modified android/build.gradle:
implementation platform('io.sentry:sentry-bom:6.8.0')
implementation 'io.sentry:sentry-android'
- Sync gradle
Actual result:
groovy.lang.MissingMethodException: No signature of method: java.util.ArrayList.containsKey() is applicable for argument types: (String) values: [collectModulesScript]
Possible solutions: contains(java.lang.Object), containsAll(java.util.Collection), contains(java.lang.Object), containsAll([Ljava.lang.Object;)
at sentry_2za3pj5s286bijx5l10rp3qdc$_run_closure1$_closure6$_closure7$_closure11.doCall(redacted/node_modules/@sentry/react-native/sentry.gradle:166)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at org.gradle.util.internal.ClosureBackedAction.execute(ClosureBackedAction.java:72)
at org.gradle.util.internal.ConfigureUtil.configureTarget(ConfigureUtil.java:155)
at org.gradle.util.internal.ConfigureUtil.configureSelf(ConfigureUtil.java:131)
at org.gradle.api.internal.AbstractTask.configure(AbstractTask.java:619)
at org.gradle.api.DefaultTask.configure(DefaultTask.java:309)
at org.gradle.api.DefaultTask.configure(DefaultTask.java:45)
at org.gradle.util.internal.ConfigureUtil.configure(ConfigureUtil.java:104)
at org.gradle.util.internal.ConfigureUtil$WrappedConfigureAction.execute(ConfigureUtil.java:167)
at org.gradle.api.internal.tasks.DefaultTaskContainer.create(DefaultTaskContainer.java:362)
at org.gradle.api.internal.tasks.DefaultTaskContainer.create(DefaultTaskContainer.java:75)
at org.gradle.api.internal.tasks.DefaultTaskContainer_Decorated.create(Unknown Source)
at jdk.internal.reflect.GeneratedMethodAccessor802.invoke(Unknown Source)
Expected result:
- No problem with sync, build
fyi, After a quick look, In sentry.gradle
def config = project.hasProperty("sentryCli") ? project.sentryCli : [];
returning []
. and so config.containsKey(...)
throws above error.
I hot-patched config.containsKey(A)
to config.A
, but I don’t know this is the solution.
Please let me know if a sentryCli settings should to be updated to somewhere or fix the issue.
Issue Analytics
- State:
- Created 10 months ago
- Reactions:6
- Comments:10 (2 by maintainers)
Top Results From Across the Web
Error running android: Gradle project sync failed. Please fix ...
It could be that you are using gradle in offline mode. To uncheck it go to File > Settings > ...
Read more >Different Ways to fix "Error running android: Gradle project ...
Method 1: Restarting your project using Invalidate Caches and Restart option ; Method 2: Sync your project with Gradle files ; Method 3:...
Read more >Fix: Gradle Project Sync Failed - Appuals.com
What causes the error message “Gradle Project Sync Failed” in Android Studio? · Solution 1: Checking Internet Connection · Solution 2: Disabling ...
Read more >Troubleshoot Android Studio
Project sync issues · Open your gradle.properties file in Android Studio. · Add the following line to the file: org.gradle.jvmargs=-Djava.net.
Read more >Gradle sync fails with no error message when Gradle project ...
Gradle sync fails with no error message when Gradle project name equals IntelliJ source set module name ... It will fail to write...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Fixing the version to 4.8.0 works,
@sentry/react-native": "4.8.0",
The fix is in https://github.com/getsentry/sentry-react-native/releases/tag/4.10.1