Below stacktrace is for android build. And execution is failed for command: ./gradlew -qq assembleStandardDebug assembleStandardDebugAndroidTest
To verify Gradle is fine tried command ./gradlew tasks" but it completed successfully
Then started debugging for dependency issues but didn't get much stacktrace. This is the first time I am trying to build an android project and also trying on docker container. If anyone have idea please let me know.
15:08:19 ANTLR Tool version 4.5.3 used for code generation does not
match the current runtime version 4.7.1ANTLR Runtime version 4.5.3
used for parser compilation does not match the current runtime version
4.7.1ANTLR Tool version 4.5.3 used for code generation does not match the current runtime version 4.7.1ANTLR Runtime version 4.5.3 used for
parser compilation does not match the current runtime version 4.7.1
ui/utils/UiHelper.java:202: warning: Application namespace for
attribute app:imageSrc will be ignored. 15:08:19 public static
void setImageUrl(ImageView imageView, String image) { 15:08:19
^ 15:08:25 Note: Some input files use or override a deprecated API.
15:08:25 Note: Recompile with -Xlint:deprecation for details.
15:08:25 Note: Some input files use unchecked or unsafe operations.
15:08:25 Note: Recompile with -Xlint:unchecked for details. 15:08:25
1 warning 15:10:17 15:10:17 FAILURE: Build failed with an
exception. 15:10:17 15:10:17 * What went wrong: 15:10:17 Execution
failed for task ':app:javaPreCompileStandardDebugAndroidTest'.
15:10:17 > Could not resolve all files for configuration
':app:standardDebugAndroidTestCompileClasspath'. 15:10:17 > Failed
to transform artifact 'cucumber-java.jar
(io.cucumber:cucumber-java:3.0.2)' to match attributes
{artifactType=android-classes, org.gradle.libraryelements=jar,
org.gradle.usage=java-runtime}. 15:10:17 > Execution failed for
JetifyTransform:
/root/.gradle/caches/modules-2/files-2.1/io.cucumber/cucumber-java/3.0.2/6b1790c541528f8b3a47/cucumber-java-3.0.2.jar.
15:10:17 > Failed to transform
'/root/.gradle/caches/modules-2/files-2.1/io.cucumber/cucumber-java/3.0.2/6b1790c541528f8b3a47/cucumber-java-3.0.2.jar'
using Jetifier. Reason: Malformed input or input contains unmappable
characters: cucumber/api/java/sk/Ataktie?.class. (Run with
--stacktrace for more details.) 15:10:17 15:10:17 * Try: 15:10:17 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.
Related
I am facing the following issue while running command : 'react-native run-android' , I have tried to make changes in '/Users/ankitkumar/teachersapp_new/android/app/build/generated/rncli/src/main/java/com/facebook/react/PackageList.java' but it automatically get reset when running the command. Can anyone please help?
> Task :app:compileDebugJavaWithJavac FAILED
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.3/userguide/command_line_interface.html#sec:command_line_warnings
665 actionable tasks: 77 executed, 588 up-to-date
Warning: unexpected element (uri:"", local:"base-extension"). Expected elements are <{}codename>,<{}layoutlib>,<{}api-level>
/Users/ankitkumar/teachersapp_new/android/app/build/generated/rncli/src/main/java/com/facebook/react/PackageList.java:63: error: a type with the same simple name is already defined by the single-type-import of OrientationPackage
import org.wonday.orientation.OrientationPackage;
^
/Users/ankitkumar/teachersapp_new/android/app/build/generated/rncli/src/main/java/com/facebook/react/PackageList.java:158: error: reference to OrientationPackage is ambiguous
new OrientationPackage(),
^
both class com.github.yamill.orientation.OrientationPackage in com.github.yamill.orientation and class org.wonday.orientation.OrientationPackage in org.wonday.orientation match
/Users/ankitkumar/teachersapp_new/android/app/build/generated/rncli/src/main/java/com/facebook/react/PackageList.java:159: error: reference to OrientationPackage is ambiguous
new OrientationPackage(),
^
both class com.github.yamill.orientation.OrientationPackage in com.github.yamill.orientation and class org.wonday.orientation.OrientationPackage in org.wonday.orientation match
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
3 errors
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
* 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 1m 25s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081
Warning: unexpected element (uri:"", local:"base-extension"). Expected elements are <{}codename>,<{}layoutlib>,<{}api-level>
/Users/ankitkumar/teachersapp_new/android/app/build/generated/rncli/src/main/java/com/facebook/react/PackageList.java:63: error: a type with the same simple name is already defined by the single-type-import of OrientationPackage
import org.wonday.orientation.OrientationPackage;
^
/Users/ankitkumar/teachersapp_new/android/app/build/generated/rncli/src/main/java/com/facebook/react/PackageList.java:158: error: reference to OrientationPackage is ambiguous
new OrientationPackage(),
^
both class com.github.yamill.orientation.OrientationPackage in com.github.yamill.orientation and class org.wonday.orientation.OrientationPackage in org.wonday.orientation match
/Users/ankitkumar/teachersapp_new/android/app/build/generated/rncli/src/main/java/com/facebook/react/PackageList.java:159: error: reference to OrientationPackage is ambiguous
new OrientationPackage(),
^
both class com.github.yamill.orientation.OrientationPackage in com.github.yamill.orientation and class org.wonday.orientation.OrientationPackage in org.wonday.orientation match
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
3 errors
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
* 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 1m 25s
I have tried to make changes in '/Users/ankitkumar/teachersapp_new/android/app/build/generated/rncli/src/main/java/com/facebook/react/PackageList.java' but it automatically get reset when running the command and the build is unsuccessful.
Follow below steps and check if same issue still exist
If you did any manual linking like mentioned here then revert back all the changes
Run npx react-native unlink react-native-orientation
Run npm uninstall react-native-orientation
Delete node_modules
Delete build folders (android/build & android/app/build)
Run npm install or yarn to install packages
Check if app builds without react-native-orientation package.If yes, goto next next. If no, add the fix mentioned here React Native Android build failure with different errors without any changes in code for past days due to publish of React Native version 0.71.0-rc.0 then check if app works then, execute next step
run npm install react-native-orientation
Run npx react-native link react-native-orientation
Clean & build
I'm on windows 10, when I do "gradlew genSources" then this happened
Starting a Gradle Daemon, 7 stopped Daemons could not be reused, use --status for details
> Configure project :
Fabric Loom: 0.10.66
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\Users\user\Downloads\MCJAVA\vector-addon\build.gradle'
* What went wrong:
Could not compile build file 'C:\Users\user\Downloads\MCJAVA\vector-addon\build.gradle'.
> startup failed:
General error during conversion: Unsupported class file major version 62
java.lang.IllegalArgumentException: Unsupported class file major version 62
1 error
* 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.2/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 5s
I want to know how can i fix it and im not good at coding and my english is not that good, I still tried with --stacktrace it still have similir error please help me
(its have a lot more text in code but its too much and i dont think it important)
I'm Using a third party library as a jar download in my project called "bandlibrary". Getting following error.
[root#ip-172-31-23-189 hsandroidconsumer]# ./gradlew assembleABCRelease
Configuration on demand is an incubating feature.
Configure project :app
Warning: The 'kotlin-android-extensions' Gradle plugin is deprecated. Please use this migration guide (https://goo.gle/kotlin-android-extensions-deprecation) to start working with View Binding (https://developer.android.com/topic/libraries/view-binding) and the 'kotlin-parcelize' plugin.
WARNING: API 'variant.getMappingFile()' is obsolete and has been replaced with 'variant.getMappingFileProvider()'.
It will be removed in version 5.0 of the Android Gradle plugin.
For more information, see https://d.android.com/r/tools/task-configuration-avoidance.
To determine what is calling variant.getMappingFile(), use -Pandroid.debug.obsoleteApi=true on the command line to display more information.
Task :bandlibrary:compileReleaseKotlin FAILED
'compileReleaseJavaWithJavac' task (current target is 1.7) and 'compileReleaseKotlin' task (current target is 1.8) jvm target compatibility should be set to the same Java version.
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':bandlibrary:compileReleaseKotlin'.
Kotlin could not find the required JDK tools in the Java installation. Make sure Kotlin compilation is running on a JDK, not JRE.
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 1m 29s
23 actionable tasks: 1 executed, 22 up-to-date
I have been facing this error for 2 days on Linux(Ubuntu 20.04) machine, and I have tried almost every possible solution found on stack-overflow and git-hub but I could'not resolve this. Any idea about this error?
Task :app:compileDebugJavaWithJavac
Task :app:mergeDebugJavaResource FAILED
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.7/userguide/command_line_interface.html#sec:command_line_warnings
217 actionable tasks: 3 executed, 214 up-to-date
Note: /home/fareed/Data/Office/Alfabolt/DeNaio-Mobile-App/android/app/src/debug/java/com/denaio/ReactNativeFlipper.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:mergeDebugJavaResource'.
Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
Failed to transform bcprov-jdk15on-1.69.jar (org.bouncycastle:bcprov-jdk15on:1.69) to match attributes {artifactType=android-java-res, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-runtime}.
> Execution failed for JetifyTransform: /home/fareed/.gradle/caches/modules-2/files-2.1/org.bouncycastle/bcprov-jdk15on/1.69/91e1628251cf3ca90093ce9d0fe67e5b7dab3850/bcprov-jdk15on-1.69.jar.
> Failed to transform '/home/fareed/.gradle/caches/modules-2/files-2.1/org.bouncycastle/bcprov-jdk15on/1.69/91e1628251cf3ca90093ce9d0fe67e5b7dab3850/bcprov-jdk15on-1.69.jar' using Jetifier. Reason: IllegalArgumentException, message: Unsupported class file major version 59. (Run with --stacktrace for more details.)
Suggestions:
- Check out existing issues at https://issuetracker.google.com/issues?q=componentid:460323&s=modified_time:desc, it's possible that this issue has already been filed there.
- If this issue has not been filed, please report it at https://issuetracker.google.com/issues/new?component=460323 (run with --stacktrace and provide a stack trace if possible).
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 24s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081
Note: /home/fareed/Data/Office/Alfabolt/DeNaio-Mobile-App/android/app/src/debug/java/com/denaio/ReactNativeFlipper.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:mergeDebugJavaResource'.
Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
Failed to transform bcprov-jdk15on-1.69.jar (org.bouncycastle:bcprov-jdk15on:1.69) to match attributes {artifactType=android-java-res, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-runtime}.
> Execution failed for JetifyTransform: /home/fareed/.gradle/caches/modules-2/files-2.1/org.bouncycastle/bcprov-jdk15on/1.69/91e1628251cf3ca90093ce9d0fe67e5b7dab3850/bcprov-jdk15on-1.69.jar.
> Failed to transform '/home/fareed/.gradle/caches/modules-2/files-2.1/org.bouncycastle/bcprov-jdk15on/1.69/91e1628251cf3ca90093ce9d0fe67e5b7dab3850/bcprov-jdk15on-1.69.jar' using Jetifier. Reason: IllegalArgumentException, message: Unsupported class file major version 59. (Run with --stacktrace for more details.)
Suggestions:
- Check out existing issues at https://issuetracker.google.com/issues?q=componentid:460323&s=modified_time:desc, it's possible that this issue has already been filed there.
- If this issue has not been filed, please report it at https://issuetracker.google.com/issues/new?component=460323 (run with --stacktrace and provide a stack trace if possible).
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 24s
at makeError (/home/fareed/Data/Office/Alfabolt/DeNaio-Mobile-App/node_modules/execa/index.js:174:9)
at /home/fareed/Data/Office/Alfabolt/DeNaio-Mobile-App/node_modules/execa/index.js:278:16
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async runOnAllDevices (/home/fareed/Data/Office/Alfabolt/DeNaio-Mobile-App/node_modules/#react-native-community/cli-platform-android/build/commands/runAndroid/runOnAllDevices.js:94:5)
at async Command.handleAction (/home/fareed/Data/Office/Alfabolt/DeNaio-Mobile-App/node_modules/react-native/node_modules/#react-native-community/cli/build/index.js:186:9)
I am using jdk 11.0.6 and gradle alone with javaFX plugin. When running the program, intellij gives me the error
4:46:44 PM: Executing task 'run'...
> Configure project :
Found module name 'Notes'
> Task :compileJava FAILED
C:\Users\fahid\IdeaProjects\Notes\src\main\java\module-info.java:1: error: modules are not supported in -source 8
module Notes {
^
(use -source 9 or higher to enable modules)
1 error
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileJava'.
> Compilation failed; see the compiler error output for details.
* 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 0s
1 actionable task: 1 executed
4:46:45 PM: Task execution finished 'run'.
How can I fix it?
note- I have selected jdk 11 in both project structure and module section.(Screenshot).