Reputation: 82
I use react native 66 when run yarn android
got the Error
yarn run v1.22.17 $ react-native run-android info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag. Jetifier found 1428 file(s) to forward-jetify. Using 4 workers... info JS server already running. info Installing the app... Configure project :react-native-firebase react-native-firebase: using React Native prebuilt binary from /Users/ha3an/Documents/Bahrami/phone/homeserviceuser/node_modules/react-native/android WARNING:: The specified Android SDK Build Tools version (28.0.3) is ignored, as it is below the minimum supported version (30.0.2) for Android Gradle Plugin 4.2.2. Android SDK Build Tools 30.0.2 will be used. To suppress this warning, remove "buildToolsVersion '28.0.3'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools. Task :app:checkDebugAarMetadata FAILED 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.9/userguide/command_line_interface.html#sec:command_line_warnings 39 actionable tasks: 2 executed, 37 up-to-date FAILURE: Build failed with an exception. What went wrong: Execution failed for task ':app:checkDebugAarMetadata'. Could not resolve all files for configuration ':app:debugRuntimeClasspath'. Could not find com.android.volley:volley:1.1.1. Searched in the following locations: - https://repo.maven.apache.org/maven2/com/android/volley/volley/1.1.1/volley-1.1.1.pom - file:/Users/ha3an/.m2/repository/com/android/volley/volley/1.1.1/volley-1.1.1.pom - file:/Users/ha3an/Documents/Bahrami/phone/homeserviceuser/node_modules/react-native/android/com/android/volley/volley/1.1.1/volley-1.1.1.pom - file:/Users/ha3an/Documents/Bahrami/phone/homeserviceuser/node_modules/jsc-android/dist/com/android/volley/volley/1.1.1/volley-1.1.1.pom - https://dl.google.com/dl/android/maven2/com/android/volley/volley/1.1.1/volley-1.1.1.pom - https://www.jitpack.io/com/android/volley/volley/1.1.1/volley-1.1.1.pom Required by: project :app > project :react-native-google-places > com.google.android.libraries.places:places:1.1.0 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 25s
and build.qradle file is
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
buildToolsVersion = "30.0.2"
minSdkVersion = 21
compileSdkVersion = 30
targetSdkVersion = 30
ndkVersion = "21.4.7075529"
}
repositories {
google()
mavenCentral()
}
dependencies {
classpath("com.android.tools.build:gradle:4.2.2")
classpath("com.google.gms:google-services:4.3.10")
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
mavenCentral()
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()
maven { url 'https://www.jitpack.io' }
}
}
i try use jcenter on my build.gradle file it's build successfully but got error
Error: ENOENT: no such file or directory, open '/.../phone/homeserviceuser/http:/localhost:8081/index.bundle?platform=android&dev=true&minify=false&app=com.aloosalamati.homeserviceuser&modulesOnly=false&runModule=true'
at Object.openSync (node:fs:585:3)
at Object.readFileSync (node:fs:453:35)
at getCodeFrame (/.../phone/homeserviceuser/node_modules/metro/src/Server.js:919:18)
at Server._symbolicate (/.../phone/homeserviceuser/node_modules/metro/src/Server.js:992:22)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async Server._processRequest (/.../phone/homeserviceuser/node_modules/metro/src/Server.js:403:7) {
errno: -2,
syscall: 'open',
code: 'ENOENT',
path: '/.../phone/homeserviceuser/http:/localhost:8081/index.bundle?platform=android&dev=true&minify=false&app=com.aloosalamati.homeserviceuser&modulesOnly=false&runModule=true'
}
i google it but can not find any solution for it
Upvotes: 2
Views: 7629
Reputation: 96
The working version dependency is now
implementation 'com.android.volley:volley:1.2.1'
Refer to the Google Volley overview here.
Upvotes: 0
Reputation: 96
In Android Studio, the dependency
// implementation 'com.android.volley:volley:1.1.1'
is no longer working. This one however, works:
implementation 'com.android.volley:volley:1.2.1'
Refer to the HTTP library
Upvotes: 0
Reputation: 11
In node_modules\react-native-google-places\android build.gradle file
replace below
> implementation "com.google.android.libraries.places:places:1.1.0
by this :-
>implementation('com.google.android.libraries.places:places:1.1.0') {
exclude group: 'com.android.volley'
}
implementation 'com.android.volley:volley:1.2.0'
Source : https://github.com/tolu360/react-native-google-places/issues/301
Upvotes: 1
Reputation: 11477
This worked for me.
Added these lines in project gradle all projects section
jcenter() //by adding this
google()
maven { url 'https://www.jitpack.io' }
maven {
url "https://maven.google.com" // by adding this
}
Full code
allprojects {
repositories {
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")
}
mavenCentral {
// We don't want to fetch react-native from Maven Central as there are
// older versions over there.
content {
excludeGroup "com.facebook.react"
}
}
jcenter()
google()
maven { url 'https://www.jitpack.io' }
maven {
url "https://maven.google.com" // specifically this worked
}
}
}
Upvotes: 2