这是我在尝试构建项目时遇到的错误,请帮助我解决这个问题,我已经陷入困境,而且我是android的初学者。
配置'编译'已经过时,已被“实施”所取代。和' api'。它将在2018年底删除。有关详细信息,请参阅:http://d.android.com/r/tools/update-dependency-configurations.html
我还附加了我的应用级别和构建级别的gradle文件。
应用级别buld.gradle
buildscript {
repositories { maven { url 'https://maven.fabric.io/public' } }
dependencies { classpath 'io.fabric.tools:gradle:1.25.3' }
}
plugins {
id 'com.onesignal.androidsdk.onesignal-gradle-plugin' version '0.8.1'
}
apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'
repositories {
maven { url 'https://maven.google.com' }
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
repositories { maven { url 'https://maven.fabric.io/public' } }
android {
compileSdkVersion 27
useLibrary 'org.apache.http.legacy'
defaultConfig {
minSdkVersion 19
targetSdkVersion 27
versionCode 102
versionName "1.0.2"
multiDexEnabled true
// resConfigs "en"
manifestPlaceholders = [onesignal_app "code",
// Live
onesignal_google_project_number: "REMOTE"]
////
// manifestPlaceholders = [onesignal_app_id : "b35433d4-be61-473f-94f8-65364b2cd501",
// // Internal Testing
// onesignal_google_project_number: "REMOTE"]
}
android {
lintOptions {
checkReleaseBuilds false
abortOnError false
}
}
android {
buildTypes {
packagingOptions {
exclude 'META-INF/NOTICE' // will not include NOTICE file
exclude 'META-INF/LICENSE' // will not include LICENSE file
// as noted by @Vishnuvathsan you may also need to include
// variations on the file name. It depends on your dependencies.
// Some other common variations on notice and license file names
exclude 'META-INF/notice'
exclude 'META-INF/notice.txt'
exclude 'META-INF/license'
exclude 'META-INF/license.txt'
}
debug {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
release {
debuggable false
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
consumerProguardFiles 'proguard-file.pro'
}
}
}
dexOptions {
preDexLibraries = false
javaMaxHeapSize "12g"
}
}
repositories
{
maven { url 'https://repo.commonsware.com.s3.amazonaws.com' }
maven { url 'https://jitpack.io' }
maven { url "https://s3.amazonaws.com/repo.commonsware.com" }
}
//configurations.all {
// resolutionStrategy {
// force 'com.android.support:design:23.4.0'
//// force 'com.android.support:support-v4:23.4.0'
// force 'com.android.support:appcompat-v7:23.4.0'
// }
//}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:recyclerview-v7:27.1.1'
implementation 'com.android.support:cardview-v7:27.1.1'
// implementation 'com.helpshift:android-aar:3.7.2'
implementation 'com.mcxiaoke.volley:library:1.0.19'
implementation files('libs/universal-image-loader-1.6.1-with-src.jar')
implementation project(':library')
implementation files('libs/Parse-1.8.0.jar')
implementation project(':gallery')
implementation project(':indicator')
implementation 'com.amplitude:android-sdk:2.9.2'
implementation 'com.razorpay:checkout:1.4.1'
implementation('com.crashlytics.sdk.android:crashlytics:2.6.6@aar') {
transitive = true;
}
// implementation 'com.hokolinks:hoko:2.3.0'
implementation 'cat.ereza:customactivityoncrash:1.5.0'
implementation 'com.android.support:multidex:1.0.3'
implementation 'com.android.support:design:27.1.1'
implementation 'com.google.android.gms:play-services-auth:15.0.1'
implementation 'com.google.android.gms:play-services-base:15.0.1'
implementation 'com.google.firebase:firebase-appindexing:15.0.1'
implementation 'com.google.android.gms:play-services-appinvite:16.0.0'
implementation 'com.google.android.gms:play-services-gcm:15.0.1'
implementation 'com.google.android.gms:play-services-location:15.0.1'
implementation 'com.google.android.gms:play-services-plus:15.0.1'
implementation 'com.google.android.gms:play-services-maps:15.0.1'
implementation 'com.github.jaydeepw:poly-picker:v1.0.22'
implementation 'com.github.Commit451:NativeStackBlur:1.0.2'
implementation 'com.github.Hitta:RippleEffect:82cf00e551'
implementation 'com.github.zplesac:android_connectionbuddy:v1.0.7'
implementation 'com.github.paolorotolo:expandableheightlistview:1.0.0'
implementation 'com.github.tony19:timber-loggly:1.0.1'
implementation 'com.neumob:neumob-android:3.7.2'
implementation 'com.facebook.fresco:fresco:1.8.0'
implementation 'com.firebase:firebase-client-android:2.5.2'
implementation 'com.google.android.exoplayer:exoplayer:r1.5.10'
implementation project(':common')
implementation project(':commonwidget')
implementation project(':videowidget')
implementation 'com.google.protobuf.nano:protobuf-javanano:3.0.0-alpha-7'
implementation project(':Spotlight-library')
implementation 'com.onesignal:OneSignal:3.9.1@aar'
implementation files('libs/YouTubeAndroidPlayerApi.jar')
implementation files('libs/dropbox-android-sdk-1.6.3.jar')
implementation 'com.pitt.fresh.library:freshdownloadview:1.0'
implementation 'es.voghdev.pdfviewpager:library:1.0.1'
implementation('com.crashlytics.sdk.android:answers:1.3.11@aar') {
transitive = true;
}
// implementation 'com.bugsee:bugsee-android:+'
implementation 'com.stripe:stripe-android:5.0.0'
implementation 'com.google.firebase:firebase-core:16.0.0'
implementation 'com.google.firebase:firebase-perf:16.0.0'
implementation 'io.branch.sdk.android:library:2.18.1'
implementation project(path: ':androidQuery')
implementation 'com.onesignal:OneSignal:[3.9.1, 3.99.99]'
implementation 'com.instabug.library:instabug:4.11.0'
implementation ('io.branch.sdk.android:library:2.+') {
exclude module: 'answers-shim'
}
}
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.firebase-perf'
项目级别buld.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.2'
classpath 'com.google.gms:google-services:3.2.0'
classpath 'com.google.firebase:firebase-plugins:1.1.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
google()
maven {
url "https://maven.google.com" // Google's Maven repository
}
}
}
错误
主机名' repo.commonsware.com.s3.amazonaws.com'与对等方提供的证书主题不匹配(CN = * .s3.amazonaws.com,O = Amazon.com Inc.,L = Seattle,ST = Washington,C = US)
答案 0 :(得分:1)
您好请用下面的版本替换或更新播放服务版本,它会删除警告
classpath 'com.google.gms:google-services:3.2.0'
答案 1 :(得分:0)
这不是一个错误,它是一个警告。只是现在不要打扰。 像这样改变这个部分:
在:
repositories {
jcenter()
}
在:
repositories {
jcenter()
mavenCentral()
google()
}