搭建ARcore环境碰到的问题

搭建环境碰到的问题

我的电脑:MacBook,系统:macOS Catalina(10.15.2),64位,安装了 Android studio 3.5.3

我完全照着官网的步骤搭建环境,还是碰到了一些问题。

  1. 网络问题

由于我之前安装了 Charles 代理工具,不知道是不是这个工具的问题,反正碰到了不少网络问题,比如AS代理设置问题---How to remove JVM property “https.proxyHost”?,或者run的时候,报错提示找不到模块。在我把 Charles 里的 Proxy -> macOS Proxy 去掉勾选,然后在 Android studio 里选择 File -> Invalidate Caches / Restart -> invalidate and restart 就好了。

  1. helloworld程序无法编译

编译配置找不到模块---Android Studio Run/Debug configuration error: Module not specified,如下图。解决其实也正如链接里提到的,在项目根目录下的settings.gradle里去掉include ':app'File -> Sync Project with Gradle files一下,然后再加回去,再sync一些即可。

image
  1. 依赖使用阿里云镜像

简单粗暴地设置了一下

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        maven{ url 'http://maven.aliyun.com/nexus/content/groups/public/'}
        google()
        jcenter()
        
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.5.3'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

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

task clean(type: Delete) {
    delete rootProject.buildDir
}

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容