我启动了一个新的android应用项目,到目前为止,除了打开新项目外,什么都没做。初始构建失败,并且我收到以下错误消息。它告诉我安装支持存储库,但它已完全安装。 (我是类人动物开发的新手,所以我不知道发生了什么事
Could not find any version that matches com.android.support:appcompat-v7:29.+.
Versions that do not match:
- 26.0.0-alpha1
- 25.3.1
- 25.3.0
- 25.2.0
- 25.1.1
- + 50 more
Searched in the following locations:
- file:/home/corb/Android/Sdk/extras/m2repository/com/android/support/appcompat-v7/maven-metadata.xml
- file:/home/corb/Android/Sdk/extras/m2repository/com/android/support/appcompat-v7/
- file:/home/corb/Android/Sdk/extras/google/m2repository/com/android/support/appcompat-v7/maven-metadata.xml
- file:/home/corb/Android/Sdk/extras/google/m2repository/com/android/support/appcompat-v7/
- file:/home/corb/Android/Sdk/extras/android/m2repository/com/android/support/appcompat-v7/maven-metadata.xml
- https://dl.google.com/dl/android/maven2/com/android/support/appcompat-v7/maven-metadata.xml
- https://jcenter.bintray.com/com/android/support/appcompat-v7/maven-metadata.xml
- https://jcenter.bintray.com/com/android/support/appcompat-v7/
Required by:
project :app
Please install the Android Support Repository from the Android SDK Manager.
Open Android SDK Manager
build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 29
buildToolsVersion "29.0.0"
defaultConfig {
applicationId "com.example.finances"
minSdkVersion 15
targetSdkVersion 29
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:29.+'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}
答案 0 :(得分:0)
安装Android SDK分为两部分,即代码部分,您可以通过打开SDK管理器,突出显示SDK平台,选择要下载的版本并单击“应用”来下载。然后,有“平台工具”部分,您将在顶部突出显示“ SDK工具”,然后为与您下载的相同SDK版本选择Android SDK Build-Tools,然后单击“应用”。您说“它已经完全安装”了吗?