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

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

问题描述

所以我正在尝试同步一个 android studio 项目,但 flexbox 一直无法解析.据我所知,所有相关的存储库都包括在内.我尝试了多个互联网连接(不涉及代理)都无济于事.

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" }

更新

感谢 @Volker Voecking 的回答

dependencies {
    implementation 'com.google.android.flexbox:flexbox:3.0.0'
}

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

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