最近潜入React-Native的世界并立即陷入困境 . 从Udemy购买了一门名为The Complete React Native and Redux Course的课程,并试图编译我的第一个应用程序 .

我已经尝试了很多不同的解决方案,并经历了各种不同的错误,所以它到了我必须制作我的第一个stackoverflow帖子的地步 . 要在下面发布一堆我当前的设置以及我收到的错误 .

My Configuations

JAVA_HOME = C:\ Program Files \ Java \ jdk1.8.0_151

ANDROID_HOME = C:\ Users \ Danny \ AppData \ Local \ Android \ sdk

PATH = C:\ Users \ Danny \ AppData \ Roaming \ cabal \ bin; C:\ Users \ Danny \ AppData \ Roaming \ npm;

React Native Properties

Android Studio Properties

gradle-wrapper.properties

#Mon Dec 11 21:41:46 EST 2017

distributionBase=GRADLE_USER_HOME

distributionPath=wrapper/dists

zipStoreBase=GRADLE_USER_HOME

zipStorePath=wrapper/dists

distributionUrl=https\://services.gradle.org/distributions/gradle-4.3-rc-2-

all.zip

build.gradle(模块:app)

android {

compileSdkVersion 23

buildToolsVersion '25.0.1'

defaultConfig {

applicationId "com.albums"

minSdkVersion 16

targetSdkVersion 23

versionCode 1

versionName "1.0"

ndk {

abiFilters "armeabi-v7a", "x86"

}

}

build.gradle(项目:专辑)

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()

}

}

在使用教师的过程中,我说要使用NEXUS 5 API 23,这有助于帮助 . 在Android Studio中构建Gradle没有错误 .

感谢您的帮助

Logo

开源鸿蒙跨平台开发社区汇聚开发者与厂商,共建“一次开发,多端部署”的开源生态,致力于降低跨端开发门槛,推动万物智联创新。

更多推荐