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

React Native 0.78 Android won't build #318

Open
TweetyBoop1990 opened this issue Feb 25, 2025 · 12 comments
Open

React Native 0.78 Android won't build #318

TweetyBoop1990 opened this issue Feb 25, 2025 · 12 comments

Comments

@TweetyBoop1990
Copy link

Environment

System:
OS: macOS 15.2
CPU: (8) arm64 Apple M2
Memory: 113.47 MB / 24.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 20.11.0
path: ~/.asdf/installs/nodejs/20.11.0/bin/node
Yarn:
version: 4.6.0
path: /opt/homebrew/bin/yarn
npm:
version: 10.2.4
path: ~/.asdf/plugins/nodejs/shims/npm
Watchman:
version: 2025.02.17.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods: Not Found
SDKs:
iOS SDK:
Platforms:
- DriverKit 24.2
- iOS 18.2
- macOS 15.2
- tvOS 18.2
- visionOS 2.2
- watchOS 11.2
Android SDK: Not Found
IDEs:
Android Studio: 2024.2 AI-242.23726.103.2422.12816248
Xcode:
version: 16.2/16C5032a
path: /usr/bin/xcodebuild
Languages:
Java:
version: 21.0.5
path: /usr/bin/javac
Ruby:
version: 2.7.5
path: /Users/xxx/.asdf/shims/ruby
npmPackages:
"@react-native-community/cli":
installed: 15.0.1
wanted: 15.0.1
react:
installed: 19.0.0
wanted: 19.0.0
react-native:
installed: 0.78.0
wanted: 0.78.0
react-native-macos: Not Found
npmGlobalPackages:
"react-native": Not Found
Android:
hermesEnabled: true
newArchEnabled: true
iOS:
hermesEnabled: true
newArchEnabled: true

Things I’ve done to figure out my issue

Upgrading version

0.78

Description

I can successfully get ios to build and run with 0.78 but with android, no matter what I do, I get this error:

FAILURE: Build failed with an exception.

  • What went wrong:
    java.lang.NullPointerException: group.displayName must not be null

  • Try:

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.

  • Exception is:
    java.util.concurrent.ExecutionException: java.lang.NullPointerException: group.displayName must not be null
    at java.base/java.util.concurrent.FutureTask.report(Unknown Source)
    at java.base/java.util.concurrent.FutureTask.get(Unknown Source)
    at org.gradle.internal.configuration.problems.CommonReport$State$Spooling.commitReportTo(CommonReport.kt:192)
    at org.gradle.internal.configuration.problems.CommonReport.writeReportFileTo(CommonReport.kt:370)
    at org.gradle.problems.internal.impl.DefaultProblemsReportCreator.createReportFile(DefaultProblemsReportCreator.kt:65)
    at org.gradle.problems.internal.services.DefaultProblemSummarizer.report(DefaultProblemSummarizer.java:77)
    at org.gradle.internal.buildtree.ProblemReportingBuildActionRunner.reportProblems(ProblemReportingBuildActionRunner.java:61)
    at org.gradle.internal.buildtree.ProblemReportingBuildActionRunner.run(ProblemReportingBuildActionRunner.java:52)
    at org.gradle.launcher.exec.BuildOutcomeReportingBuildActionRunner.run(BuildOutcomeReportingBuildActionRunner.java:71)
    at org.gradle.tooling.internal.provider.FileSystemWatchingBuildActionRunner.run(FileSystemWatchingBuildActionRunner.java:135)
    at org.gradle.launcher.exec.BuildCompletionNotifyingBuildActionRunner.run(BuildCompletionNotifyingBuildActionRunner.java:41)
    at org.gradle.launcher.exec.RootBuildLifecycleBuildActionExecutor.lambda$execute$0(RootBuildLifecycleBuildActionExecutor.java:54)
    at org.gradle.composite.internal.DefaultRootBuildState.run(DefaultRootBuildState.java:130)
    at org.gradle.launcher.exec.RootBuildLifecycleBuildActionExecutor.execute(RootBuildLifecycleBuildActionExecutor.java:54)
    at org.gradle.internal.buildtree.InitDeprecationLoggingActionExecutor.execute(InitDeprecationLoggingActionExecutor.java:62)
    at org.gradle.internal.buildtree.InitProblems.execute(InitProblems.java:36)
    at org.gradle.internal.buildtree.DefaultBuildTreeContext.execute(DefaultBuildTreeContext.java:40)
    at org.gradle.launcher.exec.BuildTreeLifecycleBuildActionExecutor.lambda$execute$0(BuildTreeLifecycleBuildActionExecutor.java:71)
    at org.gradle.internal.buildtree.BuildTreeState.run(BuildTreeState.java:60)
    at org.gradle.launcher.exec.BuildTreeLifecycleBuildActionExecutor.execute(BuildTreeLifecycleBuildActionExecutor.java:71)
    at org.gradle.launcher.exec.RunAsBuildOperationBuildActionExecutor$2.call(RunAsBuildOperationBuildActionExecutor.java:67)
    at org.gradle.launcher.exec.RunAsBuildOperationBuildActionExecutor$2.call(RunAsBuildOperationBuildActionExecutor.java:63)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:209)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:204)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:166)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53)
    at org.gradle.launcher.exec.RunAsBuildOperationBuildActionExecutor.execute(RunAsBuildOperationBuildActionExecutor.java:63)
    at org.gradle.launcher.exec.RunAsWorkerThreadBuildActionExecutor.lambda$execute$0(RunAsWorkerThreadBuildActionExecutor.java:36)
    at org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:263)
    at org.gradle.internal.work.DefaultWorkerLeaseService.runAsWorkerThread(DefaultWorkerLeaseService.java:127)
    at org.gradle.launcher.exec.RunAsWorkerThreadBuildActionExecutor.execute(RunAsWorkerThreadBuildActionExecutor.java:36)
    at org.gradle.tooling.internal.provider.continuous.ContinuousBuildActionExecutor.execute(ContinuousBuildActionExecutor.java:110)
    at org.gradle.tooling.internal.provider.SubscribableBuildActionExecutor.execute(SubscribableBuildActionExecutor.java:64)
    at org.gradle.internal.session.DefaultBuildSessionContext.execute(DefaultBuildSessionContext.java:46)
    at org.gradle.internal.buildprocess.execution.BuildSessionLifecycleBuildActionExecutor$ActionImpl.apply(BuildSessionLifecycleBuildActionExecutor.java:92)
    at org.gradle.internal.buildprocess.execution.BuildSessionLifecycleBuildActionExecutor$ActionImpl.apply(BuildSessionLifecycleBuildActionExecutor.java:80)
    at org.gradle.internal.session.BuildSessionState.run(BuildSessionState.java:71)
    at org.gradle.internal.buildprocess.execution.BuildSessionLifecycleBuildActionExecutor.execute(BuildSessionLifecycleBuildActionExecutor.java:62)
    at org.gradle.internal.buildprocess.execution.BuildSessionLifecycleBuildActionExecutor.execute(BuildSessionLifecycleBuildActionExecutor.java:41)
    at org.gradle.internal.buildprocess.execution.StartParamsValidatingActionExecutor.execute(StartParamsValidatingActionExecutor.java:64)
    at org.gradle.internal.buildprocess.execution.StartParamsValidatingActionExecutor.execute(StartParamsValidatingActionExecutor.java:32)
    at org.gradle.internal.buildprocess.execution.SessionFailureReportingActionExecutor.execute(SessionFailureReportingActionExecutor.java:51)
    at org.gradle.internal.buildprocess.execution.SessionFailureReportingActionExecutor.execute(SessionFailureReportingActionExecutor.java:39)
    at org.gradle.internal.buildprocess.execution.SetupLoggingActionExecutor.execute(SetupLoggingActionExecutor.java:47)
    at org.gradle.internal.buildprocess.execution.SetupLoggingActionExecutor.execute(SetupLoggingActionExecutor.java:31)
    at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:70)
    at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:37)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
    at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:39)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
    at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:29)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
    at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.java:35)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
    at org.gradle.launcher.daemon.server.exec.ForwardClientInput.lambda$execute$0(ForwardClientInput.java:40)
    at org.gradle.internal.daemon.clientinput.ClientInputForwarder.forwardInput(ClientInputForwarder.java:80)
    at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:37)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
    at org.gradle.launcher.daemon.server.exec.LogAndCheckHealth.execute(LogAndCheckHealth.java:64)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
    at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:63)
    at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:37)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
    at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:84)
    at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:37)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
    at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:52)
    at org.gradle.launcher.daemon.server.DaemonStateCoordinator.lambda$runCommand$0(DaemonStateCoordinator.java:321)
    at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
    at org.gradle.internal.concurrent.AbstractManagedExecutor$1.run(AbstractManagedExecutor.java:48)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.base/java.lang.Thread.run(Unknown Source)
    Caused by: java.lang.NullPointerException: group.displayName must not be null
    at org.gradle.problems.internal.impl.DefaultProblemsReportCreatorKt$problemId$1$1.invoke(DefaultProblemsReportCreator.kt:104)
    at org.gradle.problems.internal.impl.DefaultProblemsReportCreatorKt$problemId$1$1.invoke(DefaultProblemsReportCreator.kt:102)
    at org.gradle.internal.cc.impl.problems.JsonWriter$jsonObjectList$1$1.invoke(JsonWriter.kt:84)
    at org.gradle.internal.cc.impl.problems.JsonWriter$jsonObjectList$1$1.invoke(JsonWriter.kt:83)
    at org.gradle.internal.cc.impl.problems.JsonWriter.jsonObject(JsonWriter.kt:39)
    at org.gradle.internal.cc.impl.problems.JsonWriter$jsonObjectList$1.invoke(JsonWriter.kt:83)
    at org.gradle.internal.cc.impl.problems.JsonWriter$jsonObjectList$1.invoke(JsonWriter.kt:82)
    at org.gradle.internal.cc.impl.problems.JsonWriter$jsonList$1$1.invoke(JsonWriter.kt:98)
    at org.gradle.internal.cc.impl.problems.JsonWriter$jsonList$1$1.invoke(JsonWriter.kt:97)
    at org.gradle.internal.cc.impl.problems.JsonWriter.jsonListItem(JsonWriter.kt:105)
    at org.gradle.internal.cc.impl.problems.JsonWriter.jsonList(JsonWriter.kt:97)
    at org.gradle.internal.cc.impl.problems.JsonWriter.jsonObjectList(JsonWriter.kt:82)
    at org.gradle.internal.cc.impl.problems.JsonWriter.jsonObjectList(JsonWriter.kt:77)
    at org.gradle.problems.internal.impl.DefaultProblemsReportCreatorKt$problemId$1.invoke(DefaultProblemsReportCreator.kt:102)
    at org.gradle.problems.internal.impl.DefaultProblemsReportCreatorKt$problemId$1.invoke(DefaultProblemsReportCreator.kt:100)
    at org.gradle.internal.cc.impl.problems.JsonWriter.property(JsonWriter.kt:73)
    at org.gradle.problems.internal.impl.DefaultProblemsReportCreatorKt.problemId(DefaultProblemsReportCreator.kt:100)
    at org.gradle.problems.internal.impl.DefaultProblemsReportCreator$createReportFile$1$writeToJson$1$1$1$2$1$1.invoke(DefaultProblemsReportCreator.kt:78)
    at org.gradle.problems.internal.impl.DefaultProblemsReportCreator$createReportFile$1$writeToJson$1$1$1$2$1$1.invoke(DefaultProblemsReportCreator.kt:77)
    at org.gradle.internal.cc.impl.problems.JsonWriter.jsonObject(JsonWriter.kt:39)
    at org.gradle.problems.internal.impl.DefaultProblemsReportCreator$createReportFile$1$writeToJson$1$1$1$2$1.invoke(DefaultProblemsReportCreator.kt:77)
    at org.gradle.problems.internal.impl.DefaultProblemsReportCreator$createReportFile$1$writeToJson$1$1$1$2$1.invoke(DefaultProblemsReportCreator.kt:76)
    at org.gradle.internal.cc.impl.problems.JsonWriter$jsonList$1$1.invoke(JsonWriter.kt:98)
    at org.gradle.internal.cc.impl.problems.JsonWriter$jsonList$1$1.invoke(JsonWriter.kt:97)
    at org.gradle.internal.cc.impl.problems.JsonWriter.jsonListItem(JsonWriter.kt:105)
    at org.gradle.internal.cc.impl.problems.JsonWriter.jsonList(JsonWriter.kt:97)
    at org.gradle.internal.cc.impl.problems.JsonWriter.jsonList(JsonWriter.kt:90)
    at org.gradle.problems.internal.impl.DefaultProblemsReportCreator$createReportFile$1$writeToJson$1$1$1$2.invoke(DefaultProblemsReportCreator.kt:76)
    at org.gradle.problems.internal.impl.DefaultProblemsReportCreator$createReportFile$1$writeToJson$1$1$1$2.invoke(DefaultProblemsReportCreator.kt:75)
    at org.gradle.internal.cc.impl.problems.JsonWriter.property(JsonWriter.kt:73)
    at org.gradle.problems.internal.impl.DefaultProblemsReportCreator$createReportFile$1$writeToJson$1$1$1.invoke(DefaultProblemsReportCreator.kt:75)
    at org.gradle.problems.internal.impl.DefaultProblemsReportCreator$createReportFile$1$writeToJson$1$1$1.invoke(DefaultProblemsReportCreator.kt:69)
    at org.gradle.internal.cc.impl.problems.JsonWriter.jsonObject(JsonWriter.kt:39)
    at org.gradle.problems.internal.impl.DefaultProblemsReportCreator$createReportFile$1$writeToJson$1$1.invoke(DefaultProblemsReportCreator.kt:69)
    at org.gradle.problems.internal.impl.DefaultProblemsReportCreator$createReportFile$1$writeToJson$1$1.invoke(DefaultProblemsReportCreator.kt:68)
    at org.gradle.internal.cc.impl.problems.JsonWriter.property(JsonWriter.kt:73)
    at org.gradle.problems.internal.impl.DefaultProblemsReportCreator$createReportFile$1.writeToJson(DefaultProblemsReportCreator.kt:68)
    at org.gradle.internal.cc.impl.problems.JsonModelWriter.endModel(JsonModelWriter.kt:31)
    at org.gradle.internal.cc.impl.problems.HtmlReportWriter.endHtmlReport(HtmlReportWriter.kt:41)
    at org.gradle.internal.configuration.problems.CommonReport$State$Spooling.closeHtmlReport(CommonReport.kt:213)
    at org.gradle.internal.configuration.problems.CommonReport$State$Spooling.access$closeHtmlReport(CommonReport.kt:140)
    at org.gradle.internal.configuration.problems.CommonReport$State$Spooling$commitReportTo$reportFile$1.call(CommonReport.kt:189)
    at org.gradle.internal.configuration.problems.CommonReport$State$Spooling$commitReportTo$reportFile$1.call(CommonReport.kt:188)
    at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
    ... 5 more
    Suppressed: com.fasterxml.jackson.core.JsonGenerationException: Current context not Object but Array
    at com.fasterxml.jackson.core.JsonGenerator._reportError(JsonGenerator.java:2858)
    at com.fasterxml.jackson.core.json.WriterBasedJsonGenerator.writeEndObject(WriterBasedJsonGenerator.java:356)
    at org.gradle.internal.cc.impl.problems.JsonWriter.endObject(JsonWriter.kt:48)
    at org.gradle.internal.cc.impl.problems.JsonWriter$JsonObject.close(JsonWriter.kt:30)
    at kotlin.jdk7.AutoCloseableKt.closeFinally(AutoCloseableJVM.kt:51)
    at org.gradle.internal.cc.impl.problems.JsonWriter.jsonObject(JsonWriter.kt:38)
    ... 29 more
    Suppressed: com.fasterxml.jackson.core.JsonGenerationException: Current context not Object but Array
    at com.fasterxml.jackson.core.JsonGenerator._reportError(JsonGenerator.java:2858)
    at com.fasterxml.jackson.core.json.WriterBasedJsonGenerator.writeEndObject(WriterBasedJsonGenerator.java:356)
    at org.gradle.internal.cc.impl.problems.JsonWriter.endObject(JsonWriter.kt:48)
    at org.gradle.internal.cc.impl.problems.JsonWriter$JsonObject.close(JsonWriter.kt:30)
    at kotlin.jdk7.AutoCloseableKt.closeFinally(AutoCloseableJVM.kt:51)
    at org.gradle.internal.cc.impl.problems.JsonWriter.jsonObject(JsonWriter.kt:38)
    ... 16 more

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.12/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.

BUILD FAILED in 10s
653 actionable tasks: 17 executed, 636 up-to-date

It all stems to this error message which I can't find how to address:

Caused by: java.lang.NullPointerException: group.displayName must not be null

Any help would be appreciated!! 🙇‍♀️

@aschick82
Copy link

Downgrade the Gradle in the project to the following for now and it will fix the issue:

distributionUrl=https://services.gradle.org/distributions/gradle-8.10.2-all.zip

@benoitvallon
Copy link

it seems to be, indeed, a Gradle issue https://discuss.gradle.org/t/issue-upgrading-to-gradle-8-12-problems-api-nullpointerexception-group-displayname/50556

@gkasireddy202
Copy link

Getting same issue in [email protected]

@coder-xiaomo
Copy link

wait for gradle official support: gradle/gradle#32573

@rajravikant
Copy link

still getting the same error
FAILURE: Build failed with an exception.

  • What went wrong:
    java.lang.NullPointerException: group.displayName must not be null

  • Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
BUILD FAILED in 2m 29s
error Failed to install the app. Command failed with exit code 1: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081 FAILURE: Build failed with an exception. * What went wrong: java.lang.NullPointerException: group.displayName must not be null * 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. BUILD FAILED in 2m 29s.
info Run CLI with --verbose flag for more details.

@Bruno125
Copy link

As I shared in gradle/gradle#32573, passing --no-problems-report flag (to either yarn or npm android commands) did the trick for me, at least until the issue is solved in Gradle.

@gkasireddy202
Copy link

@Bruno125 - Any ETA to resolve this issue on Android?

@gautamsamyak
Copy link

I have same issue

@gkasireddy202
Copy link

@gautamsamyak - Are you using the expo in your react-native project?

@gautamsamyak
Copy link

@gkasireddy202 no. i am using react native cli with 0.78.0

@gkasireddy202
Copy link

@gautamsamyak - I have the same issue in 0.78.0 Android won't build and iOS is successfully built.

@gautamsamyak
Copy link

Please change gradle version temprary in gradle-wrapper.properties file.

distributionUrl=https://services.gradle.org/distributions/gradle-8.10.2-all.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants