无法解决:com.google.android:flexbox:1.1.0 [英] Failed to resolve: com.google.android:flexbox:1.1.0

查看:716
本文介绍了无法解决:com.google.android:flexbox:1.1.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我试图同步一个android studio项目,但是flexbox一直无法解决.据我所知,所有相关存储库均已包括在内.我尝试了多个Internet连接(不涉及代理)无济于事.

So I'm trying to sync an android studio project but flexbox keeps failing to resolve. As far as I'm aware all relevant repositories are included. I've tried on multiple internet connections (no proxies involved) to no avail.

我也尝试过不同版本的flexbox.

I've tried different versions of flexbox as well.

这是我的应用程序build.gradle:

Here's my app build.gradle:

buildscript {
    repositories {
        jcenter()
        maven { url 'https://maven.google.com' }
        maven { url 'https://maven.fabric.io/public' }

    }
    dependencies {
        classpath 'io.fabric.tools:gradle:1.+'
    }
}

allprojects {
    repositories {
        flatDir {
            dirs 'libs'
        }
        maven { url "https://jitpack.io" }
    }
}

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'org.jetbrains.kotlin.android.extensions'
androidExtensions {
    experimental = true
}
apply plugin: 'io.fabric'
apply plugin: 'jacoco'

repositories {
    google()
    jcenter()
    maven { url 'https://maven.fabric.io/public' }
    maven { url 'https://maven.google.com' }
    mavenCentral()
}

所有其他google依赖项都已下载并安装,并且flexbox在gradle同步过程中确实已下载,但此后始终会失败.我真的不知道是什么原因造成的.我已经完全删除了Android Studio(包括Gradle文件,sdk文件,首选项等),并从头开始重新安装,但是此错误一直在发生.我真的很茫然.

All other google dependencies download and install and it appears that flexbox does download during the gradle sync but always fails afterwards. I really don't know what could be causing this. I've completely removed Android Studio (inc Gradle files, sdk files, preferences, etc) and reinstalled from scratch but this error just keeps occurring. I'm really at a loss here.

依赖关系列为:

implementation 'com.google.android:flexbox:1.1.0'

因此,在尝试再次同步时,我设法抓取了Android Studio底部的状态栏,以查看当我看到"flexbox"闪烁时发生了什么:

So while trying to sync again I managed to screengrab the statusbar at the bottom of Android Studio to see what was going on when I saw 'flexbox' flash up:

当我尝试在浏览器中转到此URL时,我得到了404

When I try to go to this URL in the browser I get a 404

这甚至是正确的回购吗?

Is this even the correct repo?

推荐答案

将此添加到gradle文件中

Add this to your gradle file

maven {
    url "https://google.bintray.com/flexbox-layout" }

这篇关于无法解决:com.google.android:flexbox:1.1.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆