我正在使用react native制作一个android应用程序,这是我得到的错误:
FAILURE: Build failed with an exception. * What went wrong: A problem occurred configuring project ':react-native-fetch-blob'. > Could not resolve all artifacts for configuration ':react-native-fetch-blob:classpath'. > Could not find com.android.tools.build:gradle:2.2.3. Searched in the following locations: https://jcenter.bintray.com/com/android/tools/build/gradle/2.2.3/gradle-2.2.3.pom https://jcenter.bintray.com/com/android/tools/build/gradle/2.2.3/gradle-2.2.3.jar Required by: project :react-native-fetch-blob
我还收到以下警告:
> Configure project :app WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'. It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html WARNING: The specified Android SDK Build Tools version (26.0.2) is ignored, as it is below the minimum supported version (28.0.3) for Android Gradle Plugin 3.2.1. Android SDK Build Tools 28.0.3 will be used. To suppress this warning, remove "buildToolsVersion '26.0.2'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools. registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection) registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection) > Configure project :react-native-android-location-services-dialog-box WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'. It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html WARNING: The specified Android SDK Build Tools version (25.0.2) is ignored, as it is below the minimum supported version (28.0.3) for Android Gradle Plugin 3.2.1. Android SDK Build Tools 28.0.3 will be used. To suppress this warning, remove "buildToolsVersion '25.0.2'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.
这是我的build.gradle文件:
// Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { repositories { google() jcenter() mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:3.2.1' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files classpath 'com.google.gms:google-services:3.0.0' } } allprojects { repositories { google() mavenLocal() jcenter() maven { // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm url "$rootDir/../node_modules/react-native/android" } // jitpack repo is necessary to fetch ucrop dependency maven { url "https://jitpack.io" } } }
这是我的gradle包装分发url:
distributionURL=https://services.gradle.org/distributions/gradle-4.6-all.zip
我尝试更改不同存储库的顺序,但仍然得到相同的错误。
subprojects {project ->
if (project.name.contains('react-native-fetch-blob')) {
buildscript {
repositories {
maven { url "https://dl.bintray.com/android/android-tools/" }
}
}
}
}
我正在构建一个react原生应用程序,并使用库。 在我的Android/build.gradle中,我在buildScript中有以下内容: 这是否意味着我必须降级我的gradle版本?
我正在尝试将gradle从1.3.1更新到3.5,因为我的一些依赖项需要3.3或更高版本。 我见过类似的问题,但都没有帮助。 build.gradle: gradle-wrapper.properties: 但是,当我尝试做任何事情(构建、清理等)时,我还是得到了这样的结果:
找不到com.android.tools.build:Gradle:4.0.0. https://jcenter.bintray.com/com/android/tools/build/gradle/4.0.0/gradle-4.0.0.pom
null Build.Gradle(项目): 我刚刚从android Studio2.3.3迁移到4.0.1。 我的问题是什么????如果你需要更多信息就告诉我。 感谢您的回答:)
在我的设置中,我在默认设置和手动设置路径之间切换。我还尝试将和添加到存储库中 我只是蚂蚁建设和运行我的应用程序,但它说不!哈哈救命
我是第一次设置fastlane。在运行fastlane测试时,我得到了一个关于com.android.tools.build:Gradle:3.0.1找不到的错误。 怎么回事?为什么fastlane不工作而Android Studio工作?