有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

运行gradlew build时出现java ListenerNotificationException

我试图运行gradlew build已经好几天了,但是ListenerNotificationException被引发了。我试图在互联网上找到一些解决方案,但没有成功

有人能帮我解决这个问题吗

$ ./gradlew build

> Configure project :app
NDK is missing a "platforms" directory.
If you are using NDK, verify the ndk.dir is set to a valid NDK directory.  It is currently set to /home/yanksan/Android/Sdk/ndk-bundle.
If you are not using NDK, unset the NDK variable from ANDROID_NDK_HOME or local.properties to remove this warning.

Configuration 'compile' in project ':app' is deprecated. Use 'implementation' instead.
+-----------------------------------------------------------------
| cordova-安卓-support-gradle-release: 27.+
+-----------------------------------------------------------------
FCMPlugin: Plugin install variables are not accessible, as package.json was unreachable/unreadable.FCMPlugin: Plugin install variables are not accessible, as package.json was unreachable/unreadable.FCMPlugin: Plugin install variables are not accessible, as package.json was unreachable/unreadable.FCMPlugin: Support for Gradle v4 or lower is deprecated. Please upgrade to a newer version.
FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':app'.
> Failed to notify project evaluation listener.
   > org.gradle.api.internal.TaskInputsInternal.property(Ljava/lang/String;Ljava/lang/Object;)Lorg/gradle/api/tasks/TaskInputs;

* 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.

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

See https://docs.gradle.org/7.3.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 1s

使用--stacktrace选项返回以下异常:

* Exception is:
org.gradle.api.ProjectConfigurationException: A problem occurred configuring project ':app'.
        at org.gradle.configuration.project.LifecycleProjectEvaluator.wrapException(LifecycleProjectEvaluator.java:75)

...

        at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:61)
Caused by: org.gradle.internal.event.ListenerNotificationException: Failed to notify project evaluation listener.
        at org.gradle.internal.event.AbstractBroadcastDispatch.dispatch(AbstractBroadcastDispatch.java:89)

...

        at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:61)
Caused by: java.lang.NoSuchMethodError: org.gradle.api.internal.TaskInputsInternal.property(Ljava/lang/String;Ljava/lang/Object;)Lorg/gradle/api/tasks/TaskInputs;
        at com.安卓.build.gradle.internal.pipeline.StreamBasedTask.registerConsumedAndReferencedStreamInputs(StreamBasedTask.java:89)

共 (0) 个答案