How do i build react-native application - react-native

i just created a new react-native app using npx create-react-native-app myapp which was successfully created. but when i try to build it using gradlew assembleRelease, i get this error
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':app:compileReleaseJavaWithJavac'.
> Failed to find Platform SDK with path: platforms;android-30
* 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 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.8/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 43s
it appears like teres a gradle problem. how do i fix it?

Related

I want to start Making mods in minecraft and I have a problem when i am trying to run Gradlew setupDecompWorkspace it gives me a error

When I open powershell I typed ./gradlew setupDecompWorkspace it gives me that
* What went wrong:
Task 'setupDecompWorkspace' not found in root project 'forge-1.12.2-14.23.5.2859-mdk'.
* 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
Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/4.9/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 8s
PS C:\Users\Ostrov\Desktop\Minecraft Mod Creation\forge-1.12.2-14.23.5.2859-mdk>```
It says BUILD FAILED in 8s because I tried to install it and it installed it for a few minutes but then it says there is an error and build failed
Are you using the mdk from Forge's website?
If you're on IntelliJ, you don't have to run this command. It automatically sets up the Gradle project. You should get a UI that looks like this:
Now, instead of typing the command, you can just click genIntellijRuns under the fg_runs section of the Gradle menu.

Why do I get the error: Android Gradle plugin supports only Kotlin Gradle plugin version 1.3.10 and higher

I tried to start my app, but I get a error... I intigrated google_maps_flutter: ^1.0.2 and geolocator: ^2.1.0. So one of this has to be the problem, but I don't understand what the error means.
Error:
FAILURE: Build failed with an exception.
* What went wrong:
The Android Gradle plugin supports only Kotlin Gradle plugin version 1.3.10 and higher.
The following dependencies do not satisfy the required version:
root project 'android' -> org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.71
* 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
Exception: Gradle task assembleDebug failed with exit code 1
But in my build.gradl I have the line: ext.kotlin_version = '1.3.50' and this is higher then 1.2.71
You have to use the geolocator version geolocator: ^5.1.3

Build failed after ejecting from expo

FAILURE: Build failed with an exception.
What went wrong:
Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
Could not resolve all task dependencies for configuration ':app:debugCompileClasspath'.
Could not find com.google.android:cameraview:1.0.0.
Required by:
project :app > project :expo-camera
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 10s
error Failed to install the app. Make sure you have the Android development environment set up: https://facebook.github.io/react-native/docs/getting-started.html#android-development-environment. Run CLI with --verbose flag for more details.
Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081
FAILURE: Build failed with an exception.
What went wrong:
Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
Could not resolve all task dependencies for configuration ':app:debugCompileClasspath'.
Could not find com.google.android:cameraview:1.0.0.
Required by:
project :app > project :expo-camera
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 10s
Go to android/build.gradle and in repositories add
maven {
// expo-camera bundles a custom com.google.android:cameraview
url "$rootDir/../node_modules/expo-camera/android/maven"
}
then in terminal cd android and gradlew clean
then go back to your project folder and try again npx react-native run-android
Have you setup all the environment requirements?
If not you need to set up the following before building a standalone app without expo.
React Native environment set up
Follow the steps in above link

Can not Resolve React Native Camera MLKit Dependencies RN 0.62.0

React Native: 0.62.0
react-native-camera: git+https://git#github.com/react-native-community/react-native-camera.git
My app runs fine using react-native run-android but when I try to generate the .apk it fails with the following error
Error Message:
FAILURE: Build failed with an exception.native-camera:mlkitReleaseCompileClasspath > Resolve dependencies of :react-native-camera:mlkitReleaseRu
* What went wrong:
Could not determine the dependencies of task ':react-native-camera:compileMlkitReleaseJavaWithJavac'.
Could not resolve all task dependencies for configuration ':react-native-camera:mlkitReleaseCompileClasspath'.
Could not find com.google.firebase:firebase-ml-vision:12.0.1.
Required by:
project :react-native-camera
Could not find com.google.firebase:firebase-ml-vision-face-model:12.0.1.
Required by:
project :react-native-camera
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 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.0.1/userguide/command_line_interface.html#sec:command_line_warnings

Execution failed for task ':app:preDebugBuild'

I'm working on a route map app with Flutter using google_maps_webservice,location,map_view package after run
Launching lib\main.dart on SAMSUNG SM G530AZ in debug mode...
Initializing gradle...
Resolving dependencies...
Running Gradle task 'assembleDebug'...
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:preDebugBuild'.
Android dependency 'com.google.android.gms:play-services-base' has different version for the compile (15.0.1) and runtime (16.0.1) classpath. You should manually set the same version via DependencyResolution
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 11s
Finished with error: Gradle task assembleDebug failed with exit code 1
Finaly after sevral day i've found, the package map_view have many dependencies conflict between the migration androidX and android.support: so instead of continue using mapview I'm using cirrus_map_view the correction version of map_view and it work!