Execution failed for task ':app:mergeDebugResources'. > Index: 1, Size: 1 Error in Android Studio whiling building apk - indexing

022-07-11T09:20:52.256-0700 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
Execution failed for task ':app:mergeDebugResources'.
Index: 1, Size: 1
enter image description here
Try:
Run with --stacktrace option to get the stack trace.
Run with --scan to get full insights.

Related

when used sharedpreferences packge in yaml found error

Launching lib\main.dart on Redmi Note 7 in debug mode...
Running Gradle task 'assembleDebug'...
FAILURE: Build failed with an exception.
Where:
Script 'C:\Users\DELL\Downloads\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1159
What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
Process 'command 'C:\Users\DELL\Downloads\flutter\bin\flutter.bat'' 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 4s
Exception: Gradle task assembleDebug failed with exit code 1
what is the solution

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!

android build failure for react native source code

I am building official react native cloned fro git hub and check out to version v0.69.6. But failed to build.
The official document doesn't help much, I don't know what is wrong.
1: Task failed with an exception.
-----------
* What went wrong:
A problem was found with the configuration of task ':ReactAndroid:prepareJSC' (type 'PrepareJSCTask').
- In plugin 'com.facebook.react' type 'com.facebook.react.tasks.internal.PrepareJSCTask' property 'jscPackagePath' doesn't have a configured value.
Reason: This property isn't marked as optional and no value has been configured.
Possible solutions:
1. Assign a value to 'jscPackagePath'.
2. Mark property 'jscPackagePath' as optional.
Please refer to https://docs.gradle.org/7.3.3/userguide/validation_problems.html#value_not_set for more details about this problem.
* 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:
Execution failed for task ':packages:rn-tester:android:app:buildCodegenCLI'.
> Process 'command '/home/ANT.AMAZON.COM/chngang/opensource/react-native-dev/node_modules/react-native/node_modules/react-native-codegen/scripts/oss/build.sh'' finished with non-zero exit value 254
* 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 8s
19 actionable tasks: 7 executed, 12 up-to-date
Someone met the same issue with any solution

Getting error while creating codegen artifacts from schema

BUILD FAILED in 14s
6 actionable tasks: 6 executed
(base) abc#ABCs-MacBook-Pro android %
./gradlew generateCodegenArtifactsFromSchema
Task :app-modules:generateCodegenSchemaFromJavaScript FAILED
/Users/abc/JSI-sample-project/SampleApp/node_modules/#babel/parser/lib/index.js:3689
throw error;
^
SyntaxError: Unexpected token (10:3)
at instantiate (/Users/abc/JSI-sample-project/SampleApp/node_modules/#babel/parser/lib/index.js:72:32)
at constructor (/Users/abc/JSI-sample-project/SampleApp/node_modules/#babel/parser/lib/index.js:367:12)
at TypeScriptParserMixin.raise (/Users/abc/JSI-sample-project/SampleApp/node_modules/#babel/parser/lib/index.js:3684:19)
at TypeScriptParserMixin.unexpected (/Users/abc/JSI-sample-project/SampleApp/node_modules/#babel/parser/lib/index.js:3723:16)
at TypeScriptParserMixin.tsParseNonArrayType (/Users/abc/JSI-sample-project/SampleApp/node_modules/#babel/parser/lib/index.js:9380:16)
at TypeScriptParserMixin.tsParseArrayTypeOrHigher (/Users/abc/JSI-sample-project/SampleApp/node_modules/#babel/parser/lib/index.js:9384:21)
at /Users/abc/JSI-sample-project/SampleApp/node_modules/#babel/parser/lib/index.js:9453:158
at TypeScriptParserMixin.tsInAllowConditionalTypesContext (/Users/abc/JSI-sample-project/SampleApp/node_modules/#babel/parser/lib/index.js:9809:14)
at TypeScriptParserMixin.tsParseTypeOperatorOrHigher (/Users/abc/JSI-sample-project/SampleApp/node_modules/#babel/parser/lib/index.js:9453:114)
at TypeScriptParserMixin.tsParseUnionOrIntersectionType (/Users/abc/JSI-sample-project/SampleApp/node_modules/#babel/parser/lib/index.js:9462:18) {
code: 'BABEL_PARSER_SYNTAX_ERROR',
reasonCode: 'UnexpectedToken',
loc: Position { line: 10, column: 3, index: 303 },
pos: [Getter/Setter]
}
Node.js v18.9.0
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app-modules:generateCodegenSchemaFromJavaScript'.
> Process 'command 'node'' 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
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
BUILD FAILED in 4s
6 actionable tasks: 1 executed, 5 up-to-date

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