Gradle Build Error找不到supportlibrary [英] Gradle Build Error could not find supportlibrary
问题描述
我正在使用支持库版本27.0.0
我得到这个奇怪的构建错误。我使用的支持库是27.0.0,但它仍然抛出27.0.99的错误
我尝试了干净的项目,在Android Studio中使缓存失效,重新启动我的android Studio如果我更新了我的 buildtoolversion
并支持库到27.0.2,它仍然会抛出错误for 27.0.99
错误:找不到com.android。支持:customtabs:27.0.99。
在以下位置搜索:
file:/ Applications / Android Studio.app/Contents/gradle/m2repository/com/android/support/customtabs/27.0.99/customtabs-27.0.99.pom
文件:/ Applications / Android Studio.app/Contents/gradle/m2repository/com/android/support/customtabs/27.0.99/customtabs-27.0.99.jar
https://jcenter.bintray。 com / com / android / support / customtabs / 27.0.99 / customtabs-27.0.99.pom
https://jcenter.bintray.com/com/android/support/customtabs/27.0.99/customtabs-27.0 .99.jar
https://repo1.maven.org/maven2/com/android/support/customtabs/27.0.99/customtabs-27.0.99.pom
https://repo1.maven .org / maven2 / com / android / support / customtabs / 27.0.99 / customtabs-27.0.99.jar
https://maven.fabric.io/public/com/android/support/customtabs/27.0。 99 / customtabs-27.0.99.pom
https://maven.fabric.io/public/com/android/support/customtabs/27.0.99/customtabs-27.0.99.jar
https: //jitpack.io/com/android/support/customtabs/27.0.99/customtab s-27.0.99.pom
https://jitpack.io/com/android/support/customtabs/27.0.99/customtabs-27.0.99.jar
https://maven.google。 com / com / android / support / customtabs / 27.0.99 / customtabs-27.0.99.pom
https://maven.google.com/com/android/support/customtabs/27.0.99/customtabs-27.0 .99.jar
所需的:
项目:app
请从Android SDK Manager安装Android Support Repository。
< a href =openAndroidSdkManager>打开Android SDK Manager< / a>
Iv'e为Google支持库添加了maven
allprojects {
存储库{
jcenter()
maven {
urlhttps://maven.google.com
$ b $ / code $ / pre
$ b $ p这是我的默认 gradle
config
compileSdkVersion 27
buildToolsVersion27.0.0
defaultConfig {
vectorDrawables.useSupportLibrary = true
applicationIdcom.pro.test
minSdkVersion 19
targetSdkVersion 27
versionCode 18
versionName 1.17
testInstrumentationRunnerandroid.support.test.runner.AndroidJUnitRunner
signingConfig signingConfigs.config
multiDexEnabled true
}
我使用的支持库是
compile'com。 android.support:appcompat-v7:27.0.0'
compile'com.android.support.constraint:constraint-layout:1.0.2'
compile'com.android.support:design:27.0.0'
compile'com.android.support :support-v4:27.0.0'
compile'com.android.support:customtabs:27.0.0'
compile'com.android.support:cardview-v7:27.0.0'
解决方案您是否在应用中使用OneSignal SDK? b
$ b
如果是的话,你应该使用这个include:
compile'com.onesignal: OneSignal:3.5.8'
您应该降级您的 buildToolsVersion , targetSdkVersion 和 compileSdkVersion 改为26.0.2而不是27.
它似乎不是100%兼容的v27:)
来源:
https://github.com/OneSignal/OneSignal-A ndroid-SDK / issues / 352
https:/ /github.com/OneSignal/OneSignal-Android-SDK/issues/303
I'm using support library version 27.0.0
I get this weird build error. The support library I use is 27.0.0 but it still throws error for 27.0.99
I've tried clean project, invalidating caches in Android studio, restarted my android Studio It did't help.
If I updated my buildtoolversion
and support libraries to 27.0.2 it still throws error for 27.0.99
Error:Could not find com.android.support:customtabs:27.0.99.
Searched in the following locations:
file:/Applications/Android Studio.app/Contents/gradle/m2repository/com/android/support/customtabs/27.0.99/customtabs-27.0.99.pom
file:/Applications/Android Studio.app/Contents/gradle/m2repository/com/android/support/customtabs/27.0.99/customtabs-27.0.99.jar
https://jcenter.bintray.com/com/android/support/customtabs/27.0.99/customtabs-27.0.99.pom
https://jcenter.bintray.com/com/android/support/customtabs/27.0.99/customtabs-27.0.99.jar
https://repo1.maven.org/maven2/com/android/support/customtabs/27.0.99/customtabs-27.0.99.pom
https://repo1.maven.org/maven2/com/android/support/customtabs/27.0.99/customtabs-27.0.99.jar
https://maven.fabric.io/public/com/android/support/customtabs/27.0.99/customtabs-27.0.99.pom
https://maven.fabric.io/public/com/android/support/customtabs/27.0.99/customtabs-27.0.99.jar
https://jitpack.io/com/android/support/customtabs/27.0.99/customtabs-27.0.99.pom
https://jitpack.io/com/android/support/customtabs/27.0.99/customtabs-27.0.99.jar
https://maven.google.com/com/android/support/customtabs/27.0.99/customtabs-27.0.99.pom
https://maven.google.com/com/android/support/customtabs/27.0.99/customtabs-27.0.99.jar
Required by:
project :app
Please install the Android Support Repository from the Android SDK Manager.
<a href="openAndroidSdkManager">Open Android SDK Manager</a>
Iv'e added maven for support library from google
allprojects {
repositories {
jcenter()
maven {
url "https://maven.google.com"
}
}
}
This is my default gradle
config
compileSdkVersion 27
buildToolsVersion "27.0.0"
defaultConfig {
vectorDrawables.useSupportLibrary = true
applicationId "com.pro.test"
minSdkVersion 19
targetSdkVersion 27
versionCode 18
versionName "1.17"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
signingConfig signingConfigs.config
multiDexEnabled true
}
The support library I use is
compile 'com.android.support:appcompat-v7:27.0.0'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:design:27.0.0'
compile 'com.android.support:support-v4:27.0.0'
compile 'com.android.support:customtabs:27.0.0'
compile 'com.android.support:cardview-v7:27.0.0'
解决方案 Are you using OneSignal SDK in your app ?
If yes, you should use this include instead :
compile 'com.onesignal:OneSignal:3.5.8'
And you should downgrade your buildToolsVersion, targetSdkVersion and compileSdkVersion to the 26.0.2 and not 27.
It seems to not be 100% compatible with the v27 :)
sources:
https://github.com/OneSignal/OneSignal-Android-SDK/issues/352
https://github.com/OneSignal/OneSignal-Android-SDK/issues/303
这篇关于Gradle Build Error找不到supportlibrary的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!