gpt4 book ai didi

android - ModuleVersionNotFoundException android 工作室

转载 作者:塔克拉玛干 更新时间:2023-11-03 00:56:29 29 4
gpt4 key购买 nike

当我点击运行按钮时出现了这个错误

Error:org.gradle.api.artifacts.ResolveException: Could not resolve all dependencies for configuration ':app:_debugApkCopy'.

Error:org.gradle.internal.resolve.ModuleVersionNotFoundException: Could not find com.android.support:appcompat-v7:27.0.1.

请看下面的截图

enter image description here

当我尝试 gradle 同步时然后我遇到了这个问题

请看下面的截图

enter image description here

我的构建.gradle

buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
}

}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'

repositories {
maven { url 'https://maven.fabric.io/public' }
}
android {
signingConfigs {
config {
}
}
repositories {
mavenCentral()
}
compileSdkVersion 25
buildToolsVersion '26.0.0'
useLibrary 'org.apache.http.legacy'
defaultConfig {
applicationId "com.hechat"
minSdkVersion 18
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true

}
dexOptions {
javaMaxHeapSize "2048M"
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES.txt'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/notice.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/dependencies.txt'
exclude 'META-INF/LGPL2.1'
exclude 'project.properties'
exclude 'META-INF/INDEX.LIST'

}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}

}

repositories {
maven { url "https://dl.bintray.com/hani-momanii/maven" }
}
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'
exclude group: 'com.google.code.findbugs'
})
compile('com.twitter.sdk.android:twitter:2.3.1@aar') { transitive = true; }
compile('com.crashlytics.sdk.android:crashlytics:2.6.5@aar') { transitive = true; }
compile 'com.facebook.android:facebook-android-sdk:[4,5)'
compile 'com.theartofdev.edmodo:android-image-cropper:2.3.1'
compile 'com.android.support:appcompat-v7:25.0.0'
compile 'com.android.support:cardview-v7:25.0.0'
compile 'com.android.support:design:25.0.0'
compile 'net.gotev:uploadservice:2.1'
compile 'com.android.support:recyclerview-v7:25.0.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'hani.momanii.supernova_emoji_library:supernova-emoji-library:0.0.2'
compile 'com.google.android.gms:play-services:11.0.4'
compile 'com.google.firebase:firebase-core:10.2.1'
compile 'com.google.code.gson:gson:2.3'
compile 'org.apache.httpcomponents:httpcore:4.3.2'
compile 'org.apache.httpcomponents:httpmime:4.3.3'
compile 'com.mcxiaoke.volley:library:1.0.17'
compile 'com.github.clans:fab:1.6.2'
compile 'org.jsoup:jsoup:1.8.1'
compile 'com.parse.bolts:bolts-tasks:1.4.0'
compile 'com.commit451:PhotoView:1.2.4'
compile 'com.android.support:multidex:1.0.0'
compile 'com.splitwise:tokenautocomplete:1.3.3'
compile 'com.tubb.smrv:swipemenu-recyclerview:5.2.1'
compile 'com.github.bumptech.glide:glide:3.5.2'
compile 'se.emilsjolander:stickylistheaders:2.7.0'
compile 'com.mindorks:placeholderview:0.6.4'
compile 'org.twitter4j:twitter4j-core:4.0.2'
compile 'jp.wasabeef:fresco-processors:2.1.0'
compile 'jp.co.cyberagent.android.gpuimage:gpuimage-library:1.3.0'
compile 'com.google.firebase:firebase-messaging:10.2.1'
compile 'com.android.billingclient:billing:1.0'

testCompile 'junit:junit:4.12'
compile project(':cometchat_platinum-sdk')

}


apply plugin: 'com.google.gms.google-services'

我没有使用过 v-27 那么为什么我面临 v7 问题提前致谢

最佳答案

在您的应用级构建文件中添加 allprojects block

1.

 allprojects {
repositories {
jcenter()
maven {
url 'https://maven.google.com'
}}}

2。使用 Android Studio 3.0 及更高版本创建的新项目还包括

allprojects {
repositories {
jcenter()
google()
}}

并将您的 compileSdkVersion 更改为 26,并将 buildToolsVersion 更改为“26.0.1”,然后同步您的项目

希望对您有所帮助。

关于android - ModuleVersionNotFoundException android 工作室,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47688955/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com