「度客creator」编译DcsSampleApp
99821123啊 发布于2018-10-11 16:32 浏览:74 回复:2
0
收藏

1 资料准备:一台用于调试的Android手机;DcsSampleApp工程包(度秘开放平台论坛->资源中心->文档中心->智能设备开放平台->Android DCS SDK->开发指南中DuerOS DCS Android SDK & Sample App工程)

2 将工程文件夹解压到无中文的路径中(如,直接放在F盘)

3 用Android Studio打开后,会下载需要的jar包

4 很可能会Gradle失败,原因是jar的路径被墙了,解决办法:打开DcsSampleApp目录的顶层build.gradle

即,不使用jcenter()和google(),而是使用阿里云的国内镜像仓库地址。

buildscript {
repositories {
maven{ url 'http://maven.aliyun.com/nexus/content/groups/public/'}
// jcenter()
// google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
// 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/'}
// jcenter()
// google()
}
}

 

收藏
点赞
0
个赞
共2条回复 最后由99821123啊回复于2018-10-16 16:45
#2蜗牛先生的小号回复于2018-10-11

buildscript {
    repositories {
        maven{ url 'http://maven.aliyun.com/nexus/content/groups/public/'}
        // jcenter()
        // google()
        }
       dependencies {
           classpath 'com.android.tools.build:gradle:3.0.1'
           // 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/'}
        // jcenter()
        // google()
    }
}

0
#399821123啊回复于2018-10-16

直接用AS打开所下载DcsSampleApp.zip中的DcsSampleApp工程,报错如下:

org.gradle.api.resources.ResourceException: Could not get resource 'https://jcenter.bintray.com/com/google/code/gson/gson/2.3/gson-2.3.jar'.

0
TOP