Android Studio報錯集錦(三)

一、依賴包無法正常下載 / 一致卡在"Download maven-metadata.xml" / 無法獲取pom文件

項目的build.gradle

buildscript {
    repositories {
        maven{ url 'https://maven.aliyun.com/repository/public/' }
        maven{ url 'http://maven.aliyun.com/nexus/content/groups/public/'}
        maven{ url "https://maven.google.com"}
        jcenter()
        google()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.3.0'
    }
}

allprojects {
    repositories {
        maven{ url 'https://maven.aliyun.com/repository/public/' }
        maven{ url 'http://maven.aliyun.com/nexus/content/groups/public/'}
        maven{ url "https://maven.google.com"}
        jcenter()
        google()
    }
}

Android Studio引用遠程依賴包時下載不了jar包的解決方法

Android Studio Download maven-metadata.xml 下載中一直卡住

國內maven庫鏡像(阿里雲)

升級Gradle Plugin爲4.4後,Could not resolve all files for configuration ':classpath'.

Android studio 的repositories配置

二、Default Activity Not Found 問題總結

三、Compilation is not supported for following modules: xxxxxx, app.Unfortunately you can 't have non-Gradle Java modules and Android-Gradle modules in one project.

1-結束項目
2-關閉Android工作室
3-刪除.IDEA目錄
4-刪除所有.iml文件
5-打開android studio並導入該項目

四、resource android:attr/fontVariationSettings not found

五、強制所有的第三方包使用指定版本的support包

configurations.all {
    resolutionStrategy.eachDependency { DependencyResolveDetails details ->
        def requested = details.requested
        if (requested.group == 'com.android.support') {
            if (!requested.name.startsWith("multidex")) {
                details.useVersion '27.1.1'
            }
        }
    }
}

 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章