1.操作步骤

在项目根目录下,用 cmd 或者 powershell 运行:

.\android\gradlew

会输出以下内容:

Starting a Gradle Daemon, 1 incompatible and 2 stopped Daemons could not be reused, use --status for details

> Task :help

Welcome to Gradle 4.10.2.

To run a build, run gradlew <task> ...

To see a list of available tasks, run gradlew tasks

To see a list of command-line options, run gradlew --help

To see more detail about a task, run gradlew help --task <task>

For troubleshooting, visit https://help.gradle.org

BUILD SUCCESSFUL in 3s
actionable task: 1 executed
Dependencies
A rewrite of the old legacy software "depends.exe" in C# for Windows devs to troubleshoot dll load dependencies issues.

然后再重新运行项目即可。

2.经过上面的步骤之后,如果还是不行,则是因为墙的问题了

打开 项目目录/android/build.gradle,替换成阿里的源:

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

    dependencies {
        classpath 'com.android.tools.build:gradle:3.1.2'
    }
}

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

rootProject.buildDir = '../build'
subprojects {
    project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
    project.evaluationDependsOn(':app')
}

task clean(type: Delete) {
    delete rootProject.buildDir
}
阅读全文
AI总结
GitHub 加速计划 / de / Dependencies
30
1
下载
A rewrite of the old legacy software "depends.exe" in C# for Windows devs to troubleshoot dll load dependencies issues.
最近提交(Master分支:6 个月前 )
1997a400 - 3 年前
2f423539 - 3 年前
Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐