gpt4 book ai didi

android - 运行 react-native run-android : Unexpected Token in build. gradle 时出错

转载 作者:行者123 更新时间:2023-11-29 16:35:39 24 4
gpt4 key购买 nike

What went wrong: Could not compile build file '/Users/nathanael/Code/highst/mobile/android/build.gradle'.

startup failed: build file '/../../android/build.gradle': 6: unexpected token: << @ line 6, column 1.

 <<<<<<< ours
^
1 error

提前抱歉,我是 Gradle 菜鸟。每当我运行 react-native run-android 时我都会遇到这个问题

    // Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
repositories {
jcenter()
<<<<<<< ours
maven { url 'https://maven.fabric.io/public' }
mavenCentral()



}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
classpath 'com.google.gms:google-services:3.1.2'
classpath 'io.fabric.tools:gradle:1.+'
=======
maven {
url 'https://maven.google.com/'
name 'Google'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
>>>>>>> theirs

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

allprojects {
repositories {
mavenLocal()
mavenCentral()

jcenter()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url "$rootDir/../node_modules/react-native/android"
}
maven {
<<<<<<< ours
url 'https://maven.google.com'
}
}
}

=======
url 'https://maven.google.com/'
name 'Google'
}
}
}

ext {
buildToolsVersion = "26.0.3"
minSdkVersion = 16
compileSdkVersion = 26
targetSdkVersion = 26
supportLibVersion = "26.1.0"
}
>>>>>>> theirs

最佳答案

它说 <<<<< 不是 gradle 可识别的语法。你的项目有 git merge 冲突你应该接受他们的或我们的并删除 <<<<<零件

关于android - 运行 react-native run-android : Unexpected Token in build. gradle 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52573564/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com