首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >从Android为iosched 2013源代码配置Gradle

从Android为iosched 2013源代码配置Gradle
EN

Stack Overflow用户
提问于 2014-05-29 19:00:27
回答 1查看 338关注 0票数 0

Android开发者noobie在这里。

我得到了2013年的最新资料,解决了大部分问题,并相应地编辑了Gradle文件(至少我认为我是在正确的轨道上)。

我现在可以在AVD中启动这个应用程序了。主要解决办法是:

  1. 运行SDK管理器并包括我发现的库
  2. 编辑Gradle文件如下所示。

当我去Build > Clean Project的时候,上面写着Gradle invocation completeed succesfully

但是在Android中有下面的一行下划线:

代码语言:javascript
复制
compile 'com.google.android.apps.dashclock:dashclock-api:+'
compile 'com.google.code.gson:gson:2.+'

exclude group: 'org.apache.httpcomponents', module: 'httpclient'
compile 'com.google.apis:google-api-services-plus:+'

资料来源:

代码语言:javascript
复制
/*
 * Copyright 2013 Google Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

apply plugin: 'android'

repositories {
    mavenCentral()
}

    dependencies {
        compile 'com.google.android.gms:play-services:3.+'
        compile 'com.android.support:appcompat-v7:19.1.0'
        compile 'com.google.android.apps.dashclock:dashclock-api:+' // underlined from dashclock:dashclock-api:+ 
        compile 'com.google.code.gson:gson:2.+' // underlined from gson:gson:2.+'
        compile('com.google.api-client:google-api-client:1.+') {
            exclude group: 'xpp3', module: 'shared'
            exclude group: 'org.apache.httpcomponents', module: 'httpclient' // underlined from httpcomponents', module: 'httpclient'
            exclude group: 'junit', module: 'junit'
            exclude group: 'com.google.android', module: 'android'
        }
        compile 'com.google.api-client:google-api-client-android:1.17.+'
        compile 'com.google.apis:google-api-services-plus:+' // underlined from apis:google-api-services-plus:+'
        compile fileTree(dir: 'libs', include: '*.jar')
    }

    android {
        compileSdkVersion 19
        buildToolsVersion "19.0.0"

        defaultConfig {
            minSdkVersion 10
            targetSdkVersion 19
        }
    }

我将非常感谢你的帮助。

谢谢你!

编辑

添加了我意思的截图

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2014-05-29 19:45:37

这些警告(不是错误)是完全没有问题的。事实上,我建议你关掉这个警告,因为90%的时间是假阳性。

若要关闭警告,请转到File -> Settings -> Inspections,并搜索“拼写”。取消结果,然后单击Ok。警告就会消失。

底线:如果没有其他错误,您应该能够构建一个运行应用程序。这些警告不应阻止这一点。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/23940959

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档