A problem occurred evaluating root project query-validator - gradlew

I'm trying to build the project query-validator
According to the instruction, I use
./gradlew
but it results in
FAILURE: Build failed with an exception.
* Where:
Build file '/Users/lopuszanskik/Documents/lib/query-validator/build.gradle' line: 41
* What went wrong:
A problem occurred evaluating root project 'query-validator'.
> java.lang.NullPointerException (no error message)
* 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.
More information with debug and stacktrace:
* Exception is:
org.gradle.api.GradleScriptException: A problem occurred evaluating root project 'query-validator'.
at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:92)
at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl$2.run(DefaultScriptPluginFactory.java:221)
at org.gradle.configuration.ProjectScriptTarget.addConfiguration(ProjectScriptTarget.java:77)
Caused by: java.lang.NullPointerException
at org.gradle.api.internal.file.collections.DefaultConfigurableFileCollection.from(DefaultConfigurableFileCollection.java:123)
at org.gradle.api.internal.file.DefaultFileOperations.configurableFiles(DefaultFileOperations.java:104)
at org.gradle.groovy.scripts.DefaultScript.files(DefaultScript.java:167)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
14:05:46.025 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Evaluate settings' started
14:05:46.030 [DEBUG] [org.gradle.initialization.ProjectPropertySettingBuildLoader] Looking for project properties from: /Users/lopuszanskik/Documents/lib/query-validator/gradle.properties
14:05:46.030 [DEBUG] [org.gradle.initialization.ProjectPropertySettingBuildLoader] project property file does not exists. We continue!

Related

Cannot run the app execution failed in react-native

FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:processDevelopmentDebugResources'.
> A failure occurred while executing com.android.build.gradle.internal.res.LinkApplicationAndroidResourcesTask$TaskAction
> Android resource linking failed
ERROR:C:\Hool\hoolers\Hoolapp\android\app\build\intermediates\incremental\developmentDebug\mergeDevelopmentDebugResources\merged.dir\values\values.xml:404: AAPT: error: resource drawable/rn_edit_text_material (aka com.hoolproject.beta:drawable/rn_edit_text_material) 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:
java.lang.StackOverflowError (no error message)
* 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
I am trying to run the react-native app, but it always shows ':app:processDevelopmentDebugResources'.
I tried all of the solutions in stackoverflow but it doesn't resolve
--stacktrace:
Configure project :app
Reading env from: .env
Configure project :react-native-reanimated
AAR for react-native-reanimated has been found
C:\Hool\hoolers\Hoolapp\node_modules\react-native-reanimated\android\react-native-reanimated-70-jsc.aar
FAILURE: Build failed with an exception.
What went wrong:
Task 'installDebug' is ambiguous in root project 'hool'. Candidates are: 'installBotDebug', 'installBotDebugAndroidTest', 'installDebugAndroidTest', 'installDevelopmentDebug', 'installDevelopmentDebugAndroidTest', 'installProductionDebug', 'installProductionDebugAndroidTest'.
Try:
Run gradlew tasks to get a list of available tasks.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.
Exception is:
org.gradle.execution.TaskSelectionException: Task 'installDebug' is ambiguous in root project 'hool'. Candidates are: 'installBotDebug', 'installBotDebugAndroidTest', 'installDebugAndroidTest', 'installDevelopmentDebug', 'installDevelopmentDebugAndroidTest', 'installProductionDebug', 'installProductionDebugAndroidTest'.
Thanks in advance!

org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':react-native-screens:compileDebugKotlin'

I'm working on a react native project and while trying to run, I'm getting this error, any idea as to what might be wrong
Task :react-native-screens:compileDebugKotlin FAILED
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':react-native-screens:compileDebugKotlin'.
Compilation error. See log for more details
Try:
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.
Exception is: org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':react-native-screens:compileDebugKotlin'.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecut...

Flutter Plugin Issue image_cropper and images_picker

How to use all Plugin together.
image_cropper: ^1.4.1
image_picker: ^0.8.2
images_picker: ^1.2.0
Something wrong in AndroidManifest.xml:49:17-73 Error:
D:\imagepiker\android\app\src\debug\AndroidManifest.xml:49:17-73 Error:
Attribute activity#com.yalantis.ucrop.UCropActivity#theme value=(#style/Theme.AppCompat.Light.NoActionBar) from AndroidManifest.xml:49:17-73
is also present at [com.github.LuckSiege.PictureSelector:picture_library:v2.6.1] AndroidManifest.xml:66:13-58 value=(#style/Base.Theme.NoActionBar).
Suggestion: add 'tools:replace="android:theme"' to <activity> element at AndroidManifest.xml to override.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugMainManifest'.
> Manifest merger failed with multiple errors, see logs
* 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 3s

react native apk build fail when using react-native-razorpay

I'm trying to build an signed apk for my react-native code. I've used react-native-razorpay library for payment integration purpose.
On running cd android && ./gradlew assembleRelease in my project root directory I got stuck on following error.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':react-native-razorpay:verifyReleaseResources'.
> com.android.ide.common.process.ProcessException: Failed to execute aapt
* 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 22s
102 actionable tasks: 2 executed, 100 up-to-date
While running ./gradlew assembleRelease --info i get following in the last few lines-
....
....
Successfully started process 'command '/Users/clove/Library/Android/sdk/build-tools/27.0.3/aapt''
/Users/clove/.gradle/caches/transforms-1/files-1.1/appcompat-v7-26.1.0.aar/37abea56216e7a3ad9a6c076b6dd1a92/res/values-v24/values-v24.xml:3:5-157: AAPT: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Borderless.Colored'.
/Users/clove/.gradle/caches/transforms-1/files-1.1/appcompat-v7-26.1.0.aar/37abea56216e7a3ad9a6c076b6dd1a92/res/values-v24/values-v24.xml:4:5-135: AAPT: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Colored'.
/Users/clove/.gradle/caches/transforms-1/files-1.1/appcompat-v7-26.1.0.aar/37abea56216e7a3ad9a6c076b6dd1a92/res/values-v26/values-v26.xml:13:5-16:13: AAPT: No resource found that matches the given name: attr 'android:keyboardNavigationCluster'.
> Task :react-native-razorpay:verifyReleaseResources FAILED
Putting task artifact state for task ':react-native-razorpay:verifyReleaseResources' into context took 0.0 secs.
Up-to-date check for task ':react-native-razorpay:verifyReleaseResources' took 0.0 secs. It is not up-to-date because:
Task has failed previously.
All input files are considered out-of-date for incremental task ':react-native-razorpay:verifyReleaseResources'.
Unable do incremental execution: full task run
QueuedCruncher is using /Users/clove/Library/Android/sdk/build-tools/27.0.3/aapt
Shutdown finished in 0ms
:react-native-razorpay:verifyReleaseResources (Thread[Daemon worker Thread 18,5,main]) completed. Took 0.402 secs.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':react-native-razorpay:verifyReleaseResources'.
> com.android.ide.common.process.ProcessException: Failed to execute aapt
* Try:
Run with --stacktrace option to get the stack trace. Run with --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 16s
102 actionable tasks: 9 executed, 93 up-to-date
Found a solution. Turned out that the problem was due to configuration mismatch. the gradle version I was using was above 3, which requires the android sdk version 25 or above. Whereas react-native-razorpay was shipped with sdk version 23. So I changed those settings in node_modules and the build completed successfully.

Task :app:transformClassesWithMultidexlistForLive

Task :app:transformClassesWithMultidexlistForLive FAILED
Error in /app/multidex-config.pro:
Failed to read file: /app/multidex-config.pro
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:transformClassesWithMultidexlistForLive'.
com.android.build.api.transform.TransformException: Error while generating the main dex list.
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 20s
51 actionable tasks: 26 executed, 25 up-to-date