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

Build fails on the latest version of React Native v0.76.7 #29

Open
robertclarkson opened this issue Aug 3, 2023 · 3 comments
Open

Build fails on the latest version of React Native v0.76.7 #29

robertclarkson opened this issue Aug 3, 2023 · 3 comments
Labels
documentation Improvements or additions to documentation figuring-out Issues that are under inspection

Comments

@robertclarkson
Copy link

Fresh project installed from React Native v0.76.7

npx react-native run-android
FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':react-native-hce'.
> Failed to notify project evaluation listener.
   > Could not create task ':react-native-hce:compileDebugAndroidTestKotlin'.
      > Cannot use @TaskAction annotation on method AbstractKotlinCompile.execute() because interface org.gradle.api.tasks.incremental.IncrementalTaskInputs is not a valid parameter to an action method.
   > KotlinJvmAndroidCompilation with name 'debugAndroidTest' not found.

* 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 2s
error Failed to install the app. Command failed with exit code 1: ./gradlew tasks FAILURE: Build failed with an exception. * What went wrong:
A problem occurred configuring project ':react-native-hce'.
> Failed to notify project evaluation listener. > Could not create task ':react-native-hce:compileDebugAndroidTestKotlin'. > Cannot use @TaskAction annotation on method AbstractKotlinCompile.execute() because interface org.gradle.api.tasks.incremental.IncrementalTaskInputs is not a valid parameter to an action method. > KotlinJvmAndroidCompilation with name 'debugAndroidTest' not found. * 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 2s
> Task :gradle-plugin:compileKotlin UP-TO-DATE
> Task :gradle-plugin:compileJava NO-SOURCE
> Task :gradle-plugin:pluginDescriptors UP-TO-DATE
> Task :gradle-plugin:processResources UP-TO-DATE
> Task :gradle-plugin:classes UP-TO-DATE
> Task :gradle-plugin:jar UP-TO-DATE
> Task :gradle-plugin:inspectClassesForKotlinIC UP-TO-DATE 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. See https://docs.gradle.org/8.0.1/userguide/command_line_interface.html#sec:command_line_warnings
5 actionable tasks: 5 up-to-date.
@roeicohen
Copy link

This happens to me as well.

@PraneethGunas
Copy link

@appidea
Copy link
Owner

appidea commented Aug 22, 2023

The problem is that in the freshly-generated project does not define kotlin version. Add this to android/build.gradle - take care to define at least v1.6. I will be investigating further on that matter.

buildscript {
    ext {
        ...
        kotlinVersion = "1.6.20"
        ...
    }
}

@appidea appidea added the figuring-out Issues that are under inspection label Aug 22, 2023
@appidea appidea added the documentation Improvements or additions to documentation label Sep 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation figuring-out Issues that are under inspection
Projects
None yet
Development

No branches or pull requests

4 participants