when use this library :----- react-native-tesseract-ocr - html

D:\OCR2>npm run android
OCR2#0.0.1 android
react-native run-android
info JS server already running.
info Installing the app...
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.5.1/userguide/command_line_interface.html#sec:command_line_warnings
5 actionable tasks: 5 up-to-date
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
Where:
Build file 'D:\OCR2\node_modules\react-native-tesseract-ocr\android\build.gradle' line: 23
What went wrong:
A problem occurred evaluating project ':react-native-tesseract-ocr'.
Plugin with id 'maven' 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.
==============================================================================
2: Task failed with an exception.
What went wrong:
A problem occurred configuring project ':react-native-tesseract-ocr'.
com.android.builder.errors.EvalIssueException: compileSdkVersion is not specified. Please add it to build.gradle
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 6s
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
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
Where:
Build file 'D:\OCR2\node_modules\react-native-tesseract-ocr\android\build.gradle' line: 23
What went wrong:
A problem occurred evaluating project ':react-native-tesseract-ocr'.
Plugin with id 'maven' 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.
==============================================================================
2: Task failed with an exception.
What went wrong:
A problem occurred configuring project ':react-native-tesseract-ocr'.
com.android.builder.errors.EvalIssueException: compileSdkVersion is not specified. Please add it to build.gradle
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 6s
at makeError (D:\OCR2\node_modules\execa\index.js:174:9)
at D:\OCR2\node_modules\execa\index.js:278:16
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async runOnAllDevices (D:\OCR2\node_modules\#react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:109:5)
at async Command.handleAction (D:\OCR2\node_modules\#react-native-community\cli\build\index.js:142:9)
info Run CLI with --verbose flag for more details.
D:\OCR2> npm i rn-text-detector --save
added 1 package, and audited 974 packages in 3s
102 packages are looking for funding
run npm fund for details
found 0 vulnerabilities
D:\OCR2>npm run android --warning-mode=all
OCR2#0.0.1 android
react-native run-android
info JS server already running.
info Installing the app...
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.5.1/userguide/command_line_interface.html#sec:command_line_warnings
5 actionable tasks: 5 up-to-date
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
Where:
Build file 'D:\OCR2\node_modules\react-native-tesseract-ocr\android\build.gradle' line: 23
What went wrong:
A problem occurred evaluating project ':react-native-tesseract-ocr'.
Plugin with id 'maven' 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.
==============================================================================
2: Task failed with an exception.
What went wrong:
A problem occurred configuring project ':react-native-tesseract-ocr'.
com.android.builder.errors.EvalIssueException: compileSdkVersion is not specified. Please add it to build.gradle
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 6s
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
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
Where:
Build file 'D:\OCR2\node_modules\react-native-tesseract-ocr\android\build.gradle' line: 23
What went wrong:
A problem occurred evaluating project ':react-native-tesseract-ocr'.
Plugin with id 'maven' 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.
==============================================================================
2: Task failed with an exception.
What went wrong:
A problem occurred configuring project ':react-native-tesseract-ocr'.
com.android.builder.errors.EvalIssueException: compileSdkVersion is not specified. Please add it to build.gradle
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 6s
at makeError (D:\OCR2\node_modules\execa\index.js:174:9)
at D:\OCR2\node_modules\execa\index.js:278:16
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async runOnAllDevices (D:\OCR2\node_modules\#react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:109:5)
at async Command.handleAction (D:\OCR2\node_modules\#react-native-community\cli\build\index.js:142:9)
info Run CLI with --verbose flag for more details.
D:\OCR2>

i found a soluation
android/build.gradle
ext {
buildToolsVersion = "31.0.0"
minSdkVersion = 21
compileSdkVersion = 31
targetSdkVersion = 31
kotlinVersion = "1.5.31" //use this line -----------
if (System.properties['os.arch'] == "aarch64") {
// For M1 Users we need to use the NDK 24 which added support for aarch64
ndkVersion = "24.0.8215888"
} else {
// Otherwise we default to the side-by-side NDK version from AGP.
ndkVersion = "21.4.7075529"
}
}

Related

Task 'installDebug' is ambiguous in project ':app'

I am trying to run a react native app.that time i am getting ****Task 'installDebug' is ambiguous in project **': app'. Candidates are: 'installProductionDebug', 'installProductionDebugAndroidTest', 'installStagingDebug', 'installStagingDebugAndroidTest'.
**
Could you please help me fix and complete it ? Thanks
BUILD FAILED in 37s
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
FAILURE: Build failed with an exception.
What went wrong:
Task 'installDebug' is ambiguous in project ':app'. Candidates are: 'installProductionDebug', 'installProductionDebugAndroidTest', 'installStagingDebug', 'installStagingDebugAndroidTest'.
Try:
Run gradlew tasks to get a list of available tasks.
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 37s

My libGDX project set up build is failed and throwing an exception. Can anyone help? Here is the error below

FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring root project 'SetupGame'.
Could not resolve all dependencies for configuration ':classpath'.
Could not resolve de.richsource.gradle.plugins:gwt-gradle-plugin:0.6.
Required by:
:SetupGame:unspecified
Could not resolve de.richsource.gradle.plugins:gwt-gradle-plugin:0.6.
'https://jcenter.bintray.com/org/robovm/robovm-gradle-plugin/1.12.0/robovm-gradle-plugin-1.12.0.pom'.
Could not GET 'https://jcenter.bintray.com/org/robovm/robovm-gradle-plugin/1.12.0/robovm-gradle-plugin-1.12.0.pom'.
jcenter.bintray.com
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED

LibGDX - HTML5 Run&Deploy

I'm using Android Studio.
I want to run and deploy my application on HTML5.
I'm entering the command "gradlew.bat html:superDev" on the Terminal, but it gives me that error message:
Execution failed for task ':core:compileJava'. Could not find tools.jar
How can I solve this problem?
Here's the full error message:
Starting a new Gradle Daemon for this build (subsequent builds will be faster).
Configuration on demand is an incubating feature.
:core:compileJava FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':core:compileJava'.
> Could not find tools.jar
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
I had the same issue.
You need install jdk Download here
You need configure your variable environment: JAVA_HOME
Or you can copy tools.jar from %JAVA_HOME\lib to Android Studio\lib

Gradle build / test failed - kryo.KryoException: Buffer overflow

While running a Gradle build, tests are failing.
PS:
1. Gradle is using the correct JDK (1.6) to build.
2. I tried this with JDK 1.7, same error comes there as well.
3. I don't see this error when I build it locally (with JDK 1.6) on a linux/windows
4. machine but one of the machine is giving me this error.
My ?s
1. What can be done to fix the com.esotericsoftware.kryo.KryoException: Buffer overflow error.
2. Why Gradle process failed, even when test section in build.gradle says:
test {
ignoreFailures=true
//more code here for test section...
//..
}
Any hints/help appreciated. Error snapshot is shown below:
:test
Unexpected exception thrown.
org.gradle.messaging.remote.internal.MessageIOException: Could not read message from '/0:0:0:0:0:0:0:1:53371'.
at org.gradle.messaging.remote.internal.inet.SocketConnection.receive(SocketConnection.java:88)
at org.gradle.messaging.remote.internal.hub.MessageHub$ConnectionReceive.run(MessageHub.java:230)
at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:66)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
Caused by: com.esotericsoftware.kryo.KryoException: Buffer underflow.
at com.esotericsoftware.kryo.io.Input.require(Input.java:162)
at com.esotericsoftware.kryo.io.Input.readByte(Input.java:255)
at org.gradle.messaging.remote.internal.hub.InterHubMessageSerializer$MessageReader.read(InterHubMessageSerializer.java:64)
at org.gradle.messaging.remote.internal.hub.InterHubMessageSerializer$MessageReader.read(InterHubMessageSerializer.java:53)
at org.gradle.messaging.remote.internal.inet.SocketConnection.receive(SocketConnection.java:83)
... 5 more
> Building > :test > 84 tests completed
:test FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':test'.
> Process 'Gradle Worker 6' finished with non-zero exit value 139
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
It's an internal error. Best chance is to try with the latest Gradle version.

SonarRunner failed - Analysis is already running

Hi I'm running a Jenkins build with sonarRunner (in Gradle) and during this sonarRunner task, it's failing with the following error message. Any ideas! how to fix it?
09:57:21.410 ERROR - It looks like an analysis of 'MyProject' is already running (started less than a minute ago).
:****Runner FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':****Runner'.
> org.****.api.utils.SonarException: The project is already being analysed.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
OK, that was quick.
I used -Dsonar.forceAnalysis=true and the error went away.