Android开发者noobie在这里。
我得到了2013年的最新资料,解决了大部分问题,并相应地编辑了Gradle文件(至少我认为我是在正确的轨道上)。
我现在可以在AVD中启动这个应用程序了。主要解决办法是:
当我去Build > Clean Project的时候,上面写着Gradle invocation completeed succesfully
但是在Android中有下面的一行下划线:
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:+'资料来源:
/*
* 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
}
}我将非常感谢你的帮助。
谢谢你!
编辑
添加了我意思的截图




发布于 2014-05-29 19:45:37
这些警告(不是错误)是完全没有问题的。事实上,我建议你关掉这个警告,因为90%的时间是假阳性。
若要关闭警告,请转到File -> Settings -> Inspections,并搜索“拼写”。取消结果,然后单击Ok。警告就会消失。
底线:如果没有其他错误,您应该能够构建一个运行应用程序。这些警告不应阻止这一点。
https://stackoverflow.com/questions/23940959
复制相似问题