我想在android studio上運行android應用程序時收到此消息。安裝存儲庫和同步項目不起作用
Error:(28, 13) Failed to resolve: com.android.support:design:26.0.0
如果我點擊安裝庫並且同步項目什麼也沒有發生。
這是我idea.log文件後,我點擊安裝庫和同步工程
2017-06-13 13:05:08,498 [1840757]
INFO - ea.sdk.wizard.SdkQuickfixUtils - Downloading *://dl.google.com/android/repository/repository2-1.xml 2017-06-13 13:05:09,088 [1841347]
INFO - ea.sdk.wizard.SdkQuickfixUtils - Downloading *://dl.google.com/android/repository/sys-img/android/sys-img2-1.xml 2017-06-13 13:05:09,251 [1841510]
INFO - ea.sdk.wizard.SdkQuickfixUtils - Downloading *://dl.google.com/android/repository/sys-img/android-wear/sys-img2-1.xml 2017-06-13 13:05:09,416 [1841675]
INFO - ea.sdk.wizard.SdkQuickfixUtils - Downloading *://dl.google.com/android/repository/sys-img/android-tv/sys-img2-1.xml 2017-06-13 13:05:09,561 [1841820]
INFO - ea.sdk.wizard.SdkQuickfixUtils - Downloading *://dl.google.com/android/repository/sys-img/google_apis/sys-img2-1.xml 2017-06-13 13:05:09,717 [1841976]
INFO - ea.sdk.wizard.SdkQuickfixUtils - Downloading *://dl.google.com/android/repository/sys-img/google_apis_playstore/sys-img2-1.xml 2017-06-13 13:05:09,852 [1842111]
INFO - ea.sdk.wizard.SdkQuickfixUtils - Downloading *://dl.google.com/android/repository/addon2-1.xml 2017-06-13 13:05:10,027 [1842286]
INFO - ea.sdk.wizard.SdkQuickfixUtils - Downloading *://dl.google.com/android/repository/glass/addon2-1.xml 2017-06-13 13:05:10,152 [1842411]
INFO - ea.sdk.wizard.SdkQuickfixUtils - Downloading *://dl.google.com/android/repository/extras/intel/addon2-1.xml
這些線沒有再次發生之後。
我不得不改變HTTPS爲 「*」
,這是我的build.gradle文件:
android {
compileSdkVersion 26
buildToolsVersion '26.0.0'
defaultConfig {
applicationId "com.xxx.yyy"
minSdkVersion 15
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-
core:2.2.2', {
exclude group: 'com.android.support', module: 'support-
annotations'
})
compile 'com.android.support:design:26.0.0'
compile 'com.android.support:appcompat-v7:26.+'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
testCompile 'junit:junit:4.12'
}
你能在這裏分享你的gradle文件嗎? –
我添加了gradle文件到問題 –
你得到任何錯誤在Java文件? –