Description
Hi, i have an error while opening the project in android studio. The connection was successful when i checked connection in File > Settings > System Settings > HTTP Proxy > Check connection.
react-native-cli: 2.0.1
react-native: 0.46.4
android studio: 2.3.3
Error screenshot here: https://pasteboard.co/GDzxKKgd.png
Below is my gradle.properties file:
`
systemProp.http.proxyPassword=<my_password>
systemProp.http.proxyHost=<proxy_host>
android.useDeprecatedNdk=true
systemProp.http.proxyPort=8080
systemProp.http.proxyUser=<my_username>
`
Below is build.gradle (Project:sampleProjectOne) file:
`buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}allprojects {
repositories {
mavenLocal()
jcenter()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url "$rootDir/../node_modules/react-native/android"
}
}
}`
Below is build.gradle (Module:app) file:
`dependencies {
compile fileTree(dir: "libs", include: ["*.jar"])
compile "com.android.support:appcompat-v7:23.0.1"
compile "com.facebook.react:react-native:+" // From node_modules
}// Run this once to be able to run the application with BUCK
// puts all compile dependencies into folder libs for BUCK to use
task copyDownloadableDepsToLibs(type: Copy) {
from configurations.compile
into 'libs'
}`
I believe the error is coming from the line: compile "com.facebook.react:react-native:+" because the error goes away and the build is successful when I comment out that line. Can someone help out how to resolve this error?