Failed to install the app. -PreactNativeDevServerPort=8081

  android, android-studio, react-native

i’m using react-native with android studio

This error occurs when i run the Android emulator after downloading the library called @react-native-seoul/kakao-login.

    * Where:
    Build file 'C:Usersnan84cooking2-masterfrontnode_modulesreact-native-reanimatedandroidbuild.gradle' line: 90

    * What went wrong:
    A problem occurred configuring project ':react-native-reanimated'.
    > You must specify a URL for a Maven repository.

    * 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 21s

    error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Run CLI with --verbose flag for more details.Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081

this is my android file

(bundle.gradle)

    // Top-level build file where you can add configuration options common to all sub-projects/modules.

    buildscript {
      ext {
          buildToolsVersion = "29.0.2"
          minSdkVersion = 16
          compileSdkVersion = 29
          targetSdkVersion = 29
      }
      repositories {
          google()
          jcenter()
      }
      dependencies {
      
          classpath ('com.android.tools.build:gradle:4.1.3')

          classpath 'com.google.gms:google-services:4.3.5'



      }
    }

    allprojects {
      repositories {
          mavenLocal()
          maven {
              // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
              url("$rootDir/../node_modules/react-native/android")
          }
          maven {
              // Android JSC is installed from npm
              url("$rootDir/../node_modules/jsc-android/dist")
          }

          google()
          jcenter()
          maven { url 'https://www.jitpack.io' }
        
        //카카오
        maven { url >'http://devrepo.kakao.com:8088/nexus/content/groups/public/' }
      }
    }

(gradle-wrapper.properties)

    distributionBase=GRADLE_USER_HOME
    distributionPath=wrapper/dists
    distributionUrl=https://services.gradle.org/distributions/gradle-6.5-all.zip
    zipStoreBase=GRADLE_USER_HOME
    zipStorePath=wrapper/dists

(local.properties)

          sdk.dir=C:Usersnan84AppDataLocalAndroidSdk

i’ve tried to change distributionUrl in (gradle-wrapper.properties)

gradle-6.5-all.zip -> gradle-6.3-all.zip but it doesn’t work

how can i fix this error?

Source: Android Questions

LEAVE A COMMENT