我想这个库添加到我的项目:无法同步的Android Studio和Maven仓库
- com.loopj.android:android-async-http:1.4.6
- com.google.apis:google-api-services-analytics:v3-rev115-1.20.0
- com.github.castorflex.smoothprogressbar:library:1.1.0
但是Android工作室返回此错误:
Error:(8, 13) Failed to resolve: com.github.castorflex.smoothprogressbar:library:1.1.0
Error:(6, 13) Failed to resolve: com.loopj.android:android-async-http:1.4.6
Error:(7, 13) Failed to resolve: com.google.apis:google-api-services-analytics:v3-rev115-1.20.0
这是我build.grade文件:
apply plugin: 'com.android.application'
dependencies {
compile fileTree(dir: 'libs', include: '*.jar')
compile project(':librarySmartHotel')
compile 'com.loopj.android:android-async-http:1.4.6'
compile 'com.google.apis:google-api-services-analytics:v3-rev115-1.20.0'
compile 'com.github.castorflex.smoothprogressbar:library:1.1.0'
compile 'com.google.android.gms:play-services:6.5.87'
}
android {
compileSdkVersion 19
buildToolsVersion "22.0.1"
defaultConfig {
multiDexEnabled true
}
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}
// Move the tests to tests/java, tests/res, etc...
instrumentTest.setRoot('tests')
// Move the build types to build-types/<type>
// For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ...
// This moves them out of them default location under src/<type>/... which would
// conflict with src/ being used by the main source set.
// Adding new build types or product flavors should be accompanied
// by a similar customization.
debug.setRoot('build-types/debug')
release.setRoot('build-types/release')
}
}
我一定要配置什么?例如com.google.android.gms:play-services:6.5.87正在运行完美,我还没有做任何配置。
任何帮助将不胜感激。
我刚刚添加了代码,一切都开始正常工作,谢谢! –
不客气 – CROSP
@CROSP真棒男人你让我的一天,“离线模式”是罪魁祸首 –