when used sharedpreferences packge in yaml found error - sharedpreferences

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

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!

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

Error: The resource `Path-to-project-root-directory\index.ts` was not found

I am working on a react-native project and wanted to generate the signed apk for deployment on Play store. I am following the
official documentation for this:
https://facebook.github.io/react-native/docs/signed-apk-android
Building unsigned apk, works just fine.
But for signed apk, after generating "my-upload-key.keystore" and placing it in /android/app directory (inlcluding other settings as guided in docs.), whenever I run command
"gradlew bundleRelease", it gives the following error:
Starting a Gradle Daemon, 1 incompatible and 1 stopped Daemons could not be reused, use --status for details
Task :app:bundleReleaseJsAndAssets
warning: the transform cache was reset.
error The resource Path-to-project-root-directory\index.ts was not found.. Run CLI with --verbose flag for more details.
Task :app:bundleReleaseJsAndAssets FAILED
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:bundleReleaseJsAndAssets'.
Process 'command 'cmd'' 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 39s
4 actionable tasks: 1 executed, 3 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

Robotium : com.android.build.gradle.tasks.factory.AndroidJavaCompile.setDependencyCacheDir

Input:
C:\Users\Irvin\Desktop\Robotium\gradlew.bat -Dorg.gradle.daemon=true
assembleDebugAndroidTest -u -b
C:\Users\Irvin\Desktop\Robotium\executorproject\build.gradle
Output:
FAILURE: Build failed with an exception. * What went wrong: A
problem occurred configuring root project 'executorproject'. > Failed
to notify project evaluation listener. >
com.android.build.gradle.tasks.factory.AndroidJavaCompile.setDependencyCacheDir(Ljava/io/File;)V
* Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. * Get more help at https://help.gradle.org BUILD FAILED in 2s
What actually went wrong here ? I still cant figure it out for 3 days.