首页 文章

React-Native ':app:compileDebugJavaWithJavac'错误(Android Studio)

提问于
浏览
1

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

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

Error

My Configuations

Java SDK/JRE's I have installed

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

React-Native Version

Android Studio Properties

Project Structure

SDK/JDK Location

Installed SDK Tools

Installed SDK's

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没有错误 .

感谢您的帮助

1 回答

  • 0

    解决了 .

    删除了我的项目,使用react-native init ProjectName重新创建它,运行AVD,通过终端编译项目 . 我想我在旧的配置中修改了太多配置并需要重新创建它 .

相关问题