error while building APK in android studio for flutter project - javascript

Building with sound null safety
Running Gradle task 'assembleRelease'...
Parameter format not correct -
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:lintVitalRelease'.
Could not delete old C:\Users\Best Computers\StudioProjects\shoes\build\app\reports\lint-results-release-fatal.html
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 2m 49s
Running Gradle task 'assembleRelease'... 172.1s
Gradle task assembleRelease failed with exit code 1
Process finished with exit code 1

You just need to add checkReleaseBuilds to false in your build.gradle. It will be look like.
android {
lintOptions {
checkReleaseBuilds false
// Or, if you prefer, you can continue to check for errors in release builds,
// but continue the build even when errors are found:
abortOnError false
}
}
Or can you try File > Invalidate Caches/Restart

Related

I constantly get this error when creating APK in React native application

I constantly get this error when creating APK in React native application.
Could you please help?
I have tried all of the codes below.
react-native bundle --platform android --dev false --entry-file
index.js --bundle-output
android/app/src/main/assets/index.android.bundle --assets-dest
android/app/src/main/res
gradlew clean
gradlew assembleRelease -x bundleReleaseJsAndAssets or gradlew
bundleRelease
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:mergeReleaseResources'.
> C:\Users\Emre Can\Desktop\ReactNative\bulutmd\android\app\src\main\res\drawables\launch_screen.png: Error: The file name must end with .xml
* 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
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
BUĀ¦LD FAILED in 2m 46s
159 actionable tasks: 127 executed, 32 up-to-date
PS C:\Users\Emre Can\Desktop\ReactNative\bulutmd\android>
* History restored
Try the new cross-platform PowerShell https://aka.ms/pscore6
PS C:\Users\Emre Can\Desktop\ReactNative> cd bulutmd
PS C:\Users\Emre Can\Desktop\ReactNative\bulutmd> cd android
PS C:\Users\Emre Can\Desktop\ReactNative\bulutmd\android>
guys i have fixid this error using react native old version 0.68.0....
newer version of react native are fixing this problem like
0.70.2,0.70.2 are
so plz change your project with old version,hope this guide helps you..

React native Webview error, App not installing Help me to solve this

I am creating an app that uses webview. I installed and imported the webview and when using it, app was not installed in the android emulator. Without webview app installing correctly.
I tried by creating another project for example ,same error returns.
Here is the error by using webview:
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
-----------
* Where:
Build file 'F:\FirstProject\node_modules\react-native-webview\android\build.gradle' line: 35
* What went wrong:
A problem occurred evaluating project ':react-native-webview'.
> org/jetbrains/kotlin/cli/common/PropertiesKt
* 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-webview'.
> 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 15s
I am using java version: java 15.0.2
compileSdkVersion : 30

How do I build app with :app:bundleReleaseJsAndAssets error?

I need help, I need to fix this error when building apk using gradlew assembleRelease, the configuration is successful, but when executing at 70% there throws an error:
> Task :app:bundleReleaseJsAndAssets_SentryUpload FAILED
error: An organization slug is required (provide with --org)
Add --log-level=[info|debug] or export SENTRY_LOG_LEVEL=[info|debug] to see more output.
Please attach the full debug log to all bug reports.
FAILURE: Build completed with 2 failures.
1: Task 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.
==============================================================================
2: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:bundleReleaseJsAndAssets_SentryUpload'.
> 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.
For info, I tried building without bundleReleasejsAssets, but when I install the app on my phone, App won"t start it is instantly crashing, just can't open, I think this bundleReleaseJsAssets needs to be added, or my app won't run.

How can i solve the following error while run the app : Could not resolve all files for configuration?

FAILURE: Build failed with an exception.
What went wrong:
Could not resolve all files for configuration ':react-native-camera:debugCompileClasspath'.
Could not find play-services-basement.aar (com.google.android.gms:play-services-basement:15.0.1).
Searched in the following locations:
https://jcenter.bintray.com/com/google/android/gms/play-services-basement/15.0.1/play-services-basement-15.0.1.aar
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 0s
12 actionable tasks: 1 executed, 11 up-to-date
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/getting-started.html
what is the build command you are running. as it says adding --stacktrace to that may help. something like (assuming package.json/npm etc) - npm run build --stacktrace or in the scripts - <BUILD-PACKAGE> --stacktrace [options]
package.json:
{
"scripts": {
"makeItSo": "<BUILD-PACKAGE> --stacktrace [options]"
}
}

Execution failed for task :processDebugResources [ react-native ]

I present the following error when running react-native run-android
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:processDebugResources'.
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.
BUILD FAILED
Total time: 15.042 secs
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/android-setup.html
Do you have any idea how to solve this problem?
Thanks!!

Categories