nativescript-ng2-carousel error after installing when run tns build android - java

I am making a nativescript app and want to add a carousel by using nativescript-ng2-carousel but after I did npm i nativescript-ng2-carousel I get an error saying
Warning: there already is an extend called com.tns.NativeScriptActivity.
Warning: there already is an extend called com.tns.FragmentClass.
Exception in thread "main" java.io.IOException: File already exists. This may lead to undesired behavior.
Please change the name of one of the extended classes.
File:D:\Documents\coursera_examples\nativescript\VilcabambaHotel\platforms\android\app\src\main\java\com\tns\gen\java\lang\Object_button_19_32_ClickListenerImpl.java Class:
at org.nativescript.staticbindinggenerator.Generator.writeBindings(Generator.java:81)
at org.nativescript.staticbindinggenerator.Main.main(Main.java:47)
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:runSbg'.
Process 'command 'C:\Program Files\Android\Android Studio\jre\bin\java.exe'' finished with non-zero exit value 1
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 10s
Command gradlew.bat failed with exit code 1
I have tried updating my typescript, I have deleted node_modules and reinstalled, I have removed and added platforms and still get the same error

Related

Execution failed for task ':app:mergeDebugNativeLibs'. ... starting run-android failing last 3 days with no solution to it

info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 870 file(s) to forward-jetify. Using 8 workers...
info JS server already running.
daemon not running; starting now at tcp:5037
daemon started successfully
info Installing the app...
Starting a Gradle Daemon, 1 busy and 1 incompatible Daemons could not be reused, use --status for details
Task :app:compileDebugJavaWithJavac
Task :app:mergeDebugNativeLibs FAILED
28 actionable tasks: 5 executed, 23 up-to-date
Note: D:\working-projects\TestProject\android\app\src\debug\java\com\testproject\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:mergeDebugNativeLibs'.
A failure occurred while executing com.android.build.gradle.internal.tasks.MergeJavaResWorkAction
java.io.IOException: Data error (cyclic redundancy check)
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.bat app:installDebug -PreactNativeDevServerPort=8081
Note: D:\working-projects\TestProject\android\app\src\debug\java\com\testproject\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:mergeDebugNativeLibs'.
A failure occurred while executing com.android.build.gradle.internal.tasks.MergeJavaResWorkAction
java.io.IOException: Data error (cyclic redundancy check)
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
at makeError (D:\working-projects\TestProject\node_modules\#react-native-community\cli-platform-android\node_modules\execa\index.js:174:9)
at D:\working-projects\TestProject\node_modules\#react-native-community\cli-platform-android\node_modules\execa\index.js:278:16
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async runOnAllDevices (D:\working-projects\TestProject\node_modules\#react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:109:5)
at async Command.handleAction (D:\working-projects\TestProject\node_modules\#react-native-community\cli\build\index.js:192:9)
info Run CLI with --verbose flag for more details.
Have been facing this issue all of a sudden
I have reinstalled the whole setup again for react native but still getting this same error. Getting no clues as to what is the exact issue.. All help appreciated..
I finally managed to get it working ... the issue was of bad sectors on HDD ... just ran chkdsk /f/r and everything started to work fine after its completion

Execution failed for task ':Main.main()' - IntelliJ Gradle

so I'm trying to compile my gradle project, and am using intellij. I keep getting this error on compilation
Execution failed for task ':Main.main()'.
> Process 'command 'C:/Program Files/AdoptOpenJDK/jdk-15.0.2.7-hotspot/bin/java.exe'' finished with non-zero exit value 1
* 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.
And I have tried clearing cache and re-starting but nothing seems to work. Here is the class that is throwing this error.
It worked when I had one system tray menu item, and when I added the about one it stopped working. I tried reverting it but still got the same error. Really confused.
Thanks in advance
Check your project path to make sure it's not under the 'Downloads' directory.

Getting starting process 'command 'C:\Program Files\AdoptOpenJDK\jdk-11.0.6.10-hotspot\bin\java.exe''

by running gradlew run on Window 10 The following error is displayed in the terminal :
> Task :storage:run FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':storage:run'.
> A problem occurred starting process 'command 'C:\Program Files\AdoptOpenJDK\jdk-11.0.6.10-hotspot\bin\java.exe''
* 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 1s
2 actionable tasks: 1 executed, 1 up-to-date
Any suggestion is welcome
Not really sure what just happened; but for me, working in a spring-boot project, changing Shorten command line option in Run/Debug Configurations to JAR manifest from none solved the issue.

When I run Flutter project I got this error my Ubuntu system

Compiler message
../../../../Android/flutter_linux_v1.12.13+hotfix.5-stable/flutter/.pub-cache/hosted/pub.dartlang.org/cached_network_image-1.1.3/lib/src/cached_network_image_provider.dart:42:24:
Error: The method 'CachedNetworkImageProvider.load' has fewer positional arguments than those of overridden method 'ImageProvider.load'.
Method
ImageStreamCompleter load(CachedNetworkImageProvider key) {
^
../../../../Android/flutter_linux_v1.12.13+hotfix.5-stable/flutter/packages/flutter/lib/src/painting/image_provider.dart:403:24:
Context: This is the overridden method ('load').
ImageStreamCompleter load(T key, DecoderCallback decode);
^
Target kernel_snapshot failed: Exception: Errors during snapshot creation: null
build failed.
FAILURE:
Build failed with an exception.
* Where:
Script '/home/omelnour/Android/flutter_linux_v1.12.13+hotfix.5-stable/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 780
* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command '/home/omelnour/Android/flutter_linux_v1.12.13+hotfix.5-stable/flutter/bin/flutter'' finished with non-zero exit value 1
* 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 7s
Finished with error: Gradle task assembleDebug failed with exit code 1
This is the problem with older version of cached_network_image Just update to the latest version of cached_network_image
which is 2.0.0, so in your pubspec.yaml file where you have
cached_network_image: ^1.1.3 change 1.1.3 with 2.0.0.

Error while trying to run react-native on ubuntu

I'm trying to run react-native on Ubunty 16.04..When I go to my project folder and type
react-native run-android
I'm getting the following error
:app:compileDebugJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
:app:compileDebugJavaWithJavac FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compileDebugJavaWithJavac'.
> Could not create an instance of type com.sun.tools.javac.api.JavacTool.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Please help me solve this issue

Categories