Java gradle无法在React Native上生成应用程序

Java gradle无法在React Native上生成应用程序,java,android,gradle,android-gradle-plugin,react-native-android,Java,Android,Gradle,Android Gradle Plugin,React Native Android,在将我的react本机应用升级到版本0.59.1(从expo中弹出)后,由于Google的新策略,所有应用都需要在64 cpu上运行,我的gradle构建无法构建,错误为:错误:进程“command”cmd“”已完成,退出值为非零1 我不是安卓开发者,也不太了解安卓工具,但这看起来我在构建gradle文件中遗漏了一些东西 我检查了Android Gradle插件版本是3.5.0,Gradle版本是5.4.1 这是build.gradle(项目)的外观: buildscript {

在将我的react本机应用升级到版本0.59.1(从expo中弹出)后,由于Google的新策略,所有应用都需要在64 cpu上运行,我的gradle构建无法构建,错误为:错误:进程“command”cmd“”已完成,退出值为非零1

我不是安卓开发者,也不太了解安卓工具,但这看起来我在构建gradle文件中遗漏了一些东西

我检查了Android Gradle插件版本是3.5.0,Gradle版本是5.4.1

这是build.gradle(项目)的外观:

    buildscript {
      repositories {
        jcenter()
          google()
      }
      dependencies {
        classpath 'com.android.tools.build:gradle:3.5.0'
    //    old
    //    classpath 'com.google.gms:google-services:4.3.1'
    //    classpath 'de.undercouch:gradle-download-task:2.0.0'
    //    classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
      }
    }

    allprojects {
      repositories {
        maven {
          url "$rootDir/maven"
        }
        maven {
          // We use a modified build of com.android.support.test:runner:1.0.1. Explanation in maven-test/README
          url "$rootDir/maven-test"
        }
        jcenter()
        maven {
          // Local Maven repo containing AARs with JSC built for Android
          url "$rootDir/../js/node_modules/jsc-android/android"
        }
        flatDir {
          dirs 'libs'
          // dirs project(':expoview').file('libs')
        }
        maven { url "https://jitpack.io" }
        maven {
          url 'https://maven.google.com'
        }

        // Want this last so that we never end up with a stale cache
        mavenLocal()
      }
    }

    task clean(type: Delete) {
      delete rootProject.buildDir
    }

and build.gradle (app):

buildscript {
  repositories {
    maven { url 'https://maven.fabric.io/public' }
  }

  dependencies {
//    classpath 'io.fabric.tools:gradle:1.+'
  }
}
apply plugin: 'com.android.application'
//apply plugin: 'io.fabric'
//apply plugin: 'com.neenbedankt.android-apt'

repositories {
  maven { url 'https://maven.fabric.io/public' }
}

android {
  flavorDimensions "default"
  compileSdkVersion 28
  buildToolsVersion '26.0.1'

  defaultConfig {
    applicationId 'com.ferrometal12'
    targetSdkVersion 28
    versionCode 1
    versionName '0.1.1'
    ndk {
      abiFilters 'armeabi-v7a', 'x86'
    }
    multiDexEnabled true
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    // Deprecated. Used by net.openid:appauth
    manifestPlaceholders = [
      'appAuthRedirectScheme': 'host.exp.exponent'
    ]
  }
  dexOptions {
    javaMaxHeapSize System.getenv("DISABLE_DEX_MAX_HEAP") ? null : "8g"
  }
  productFlavors {
    // Define separate dev and prod product flavors.
    dev {
      // dev utilizes minSDKVersion = 21 to allow the Android gradle plugin
      // to pre-dex each module and produce an APK that can be tested on
      // Android Lollipop without time consuming dex merging processes.
      minSdkVersion 21
    }
    devRemoteKernel {
      minSdkVersion 21
    }
    dev19 {
      // For debugging / development on older SDK versions. Increases build
      // time so use 'dev' if not running on older SDKs.
      minSdkVersion 19
    }
    prod {
      // The actual minSdkVersion for the application.
      minSdkVersion 19
    }
  }
  buildTypes {
    debug {
      debuggable true
    }
    release {
      minifyEnabled true
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
      zipAlignEnabled true
    }
  }
  signingConfigs {
    debug {
      storeFile file('../debug.keystore')
    }
  }
  lintOptions {
    abortOnError false
  }
  packagingOptions {
    pickFirst "**"
  }
}

// Don't use modern jsc-android since it still has some critical bugs that
// crash applications when the string for the JS bundle is loaded and when
// locale-specific date functions are called.
// configurations.all {
//   resolutionStrategy {
//     force 'org.webkit:android-jsc:r216113'
//   }
// }


task exponentPrebuildStep(type: Exec) {
  workingDir '../'
  if (System.getProperty('os.name').toLowerCase().contains('windows')) {
    commandLine 'cmd', '/c', '.\\detach-scripts\\prepare-detached-build.bat'
  } else {
    commandLine './detach-scripts/prepare-detached-build.sh'
  }
}
preBuild.dependsOn exponentPrebuildStep


dependencies {
  implementation fileTree(dir: 'libs', include: ['*.jar'])

  implementation 'com.android.support:multidex:1.0.1'

  // Our dependencies
//  implementation 'com.android.support:appcompat-v7:28.0.0'

  // Our dependencies from ExpoView
  // DON'T ADD ANYTHING HERE THAT ISN'T IN EXPOVIEW. ONLY COPY THINGS FROM EXPOVIEW TO HERE.
  implementation('com.android.support:appcompat-v7:26.0.1') {
    force true // added force true due onesignal conflict, it wasnt before adding onesignal
  }
  implementation 'com.facebook.android:facebook-android-sdk:4.7.0'
  compile('com.facebook.android:audience-network-sdk:4.22.1') {
    exclude module: 'play-services-ads'
  }
  compileOnly 'org.glassfish:javax.annotation:3.1.1'
  implementation 'com.jakewharton:butterknife:7.0.1'
  implementation 'de.greenrobot:eventbus:2.4.0'
  implementation 'com.amplitude:android-sdk:2.9.2' // Be careful when upgrading! Upgrading might break experience scoping. Check with Jesse. See Analytics.resetAmplitudeDatabaseHelper
  implementation 'com.squareup.picasso:picasso:2.5.2'
//  implementation 'com.google.android.gms:play-services-gcm:10.2.1'
//  implementation 'com.google.android.gms:play-services-analytics:9.8.0'
//  implementation 'com.google.android.gms:play-services-maps:9.8.0'
//  implementation 'com.google.android.gms:play-services-auth:9.8.0'
//  implementation 'com.google.android.gms:play-services-location:9.8.0'
//  implementation 'com.google.android.gms:play-services-ads:9.8.0'
  annotationProcessor 'com.raizlabs.android:DBFlow-Compiler:2.2.1'
  implementation "com.raizlabs.android:DBFlow-Core:2.2.1"
  implementation "com.raizlabs.android:DBFlow:2.2.1"
  implementation "com.madgag.spongycastle:core:1.53.0.0"
  implementation "com.madgag.spongycastle:prov:1.53.0.0"
  debugImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.4-beta1'
  // debugCompile 'com.squareup.leakcanary:leakcanary-android:1.4-beta1'
  releaseImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.4-beta1'
  implementation 'com.facebook.device.yearclass:yearclass:1.0.1'
  implementation 'commons-io:commons-io:1.3.2'
  implementation 'me.leolin:ShortcutBadger:1.1.4@aar'
  implementation 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
  implementation 'com.theartofdev.edmodo:android-image-cropper:2.4.7'
  implementation 'com.yqritc:android-scalablevideoview:1.0.1'
  implementation 'commons-codec:commons-codec:1.10'
  implementation 'com.segment.analytics.android:analytics:4.3.0'
  implementation 'com.google.zxing:core:3.2.1'
  implementation 'net.openid:appauth:0.4.1'
  implementation 'com.airbnb.android:lottie:2.2.0'
  implementation 'io.branch.sdk.android:library:2.6.1'
  compile('io.nlopez.smartlocation:library:3.2.11') {
    transitive = false
  }

  implementation('com.android.support:exifinterface:26.0.1') {
    force true // added force true due onesignal conflict, it wasnt before adding onesignal
  }

  implementation 'com.squareup.okhttp3:okhttp:3.4.1'
  implementation 'com.squareup.okhttp3:okhttp-urlconnection:3.4.1'
  implementation 'com.squareup.okhttp3:okhttp-ws:3.4.1'
  implementation 'com.squareup.okio:okio:1.9.0'

  // Testing
  androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
  // We use a modified build of com.android.support.test:runner:1.0.1. Explanation in maven-test/README
  androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
  'com.android.support.test:runner:1.0.1'
  androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
  'com.android.support:support-annotations:26.0.1'
  androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
  'com.google.code.findbugs:jsr305:3.0.0'
  androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
  'com.android.support.test.uiautomator:uiautomator-v18:2.1.1'
  androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
  'com.azimolabs.conditionwatcher:conditionwatcher:0.2'



  compile('host.exp.exponent:expoview:26.0.0@aar') {
    transitive = true
  }

//  implementation project(path: ':expoview')
}

// This has to be down here for some reason
//apply plugin: 'com.google.gms.google-services'
gradle.wrapper.properties如下所示:

#Sat Aug 31 19:13:53 EEST 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
#distributionUrl=\
#  https\://services.gradle.org/distributions/gradle-4.1-rc-1-all.zip
知道我做错了什么吗?请让我知道如果你需要更多的细节