我正在尝试将我的应用程序与MAX进行中介,而且我很难将其集成到我的Gradle文件中,我遵循了所有的指令这里,但每次构建应用程序时,我都会将错误日志保存在下面:
A problem occurred configuring project ':app'.
> Could not resolve all artifacts for configuration ':app:classpath'.
> Could not find com.applovin.quality:AppLovinQualityServiceGradlePlugin:.
Required by:
project :app
我的分级档案:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
mavenCentral()
maven { url 'https://artifacts.applovin.com/android' }
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.2'
classpath 'com.google.gms:google-services:4.3.10'
}
}
allprojects {
repositories {
google()
mavenCentral()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
我的Gradle应用程序级别:
buildscript {
repositories {
google()
maven { url 'https://plugins.gradle.org/m2/' }
}
dependencies {
classpath 'gradle.plugin.com.onesignal:onesignal-gradle-plugin:0.12.7'
classpath "com.applovin.quality:AppLovinQualityServiceGradlePlugin:"
}
}
apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'applovin-quality-service'
applovin {
apiKey "########JW3nelTryi1TlKCldNWG-wtTZGhEz_Tpu-ByT6bsZccJT4rABgGP9HNBQqcmywT7_rMvrl0zQvn"
}
android {
compileSdkVersion 31
defaultConfig {
applicationId "com.wallpapers_8k_Sad.app"
minSdkVersion 19
targetSdkVersion 31
versionCode 8
multiDexEnabled true
versionName "1.08"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility 1.8
targetCompatibility 1.8
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:multidex:1.0.3'
implementation 'androidx.appcompat:appcompat:1.4.1'
compile 'com.facebook.android:audience-network-sdk:6.0.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
implementation 'com.google.firebase:firebase-database:20.0.4'
testImplementation 'junit:junit:4.13'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
implementation 'com.google.android.material:material:1.5.0'
implementation 'com.google.ads.mediation:facebook:6.8.0.0'
implementation 'com.google.android.gms:play-services-ads:20.6.0'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.applovin:applovin-sdk:+'
implementation 'com.onesignal:OneSignal:4.3.0'
}
我的舱单元线:
<meta-data android:name="applovin.sdk.key"
android:value="######oRQNDu54FZ1Sr7DocsC0hcs-3ZD91eX-OXTxFK75Qg_EANzzxoKr9lxTdgIh3c-G5os5ykNx2gz4Q5x"/>
N/B -添加的哈希标签只是手动添加,以隐藏我的密钥。
发布于 2022-03-17 14:21:53
发现我需要在gradle顶级构建文件中添加applovin依赖项,同时添加特定的版本
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
mavenCentral()
maven { url 'https://artifacts.applovin.com/android' }
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.2'
classpath 'com.google.gms:google-services:4.3.10'
classpath "com.applovin.quality:AppLovinQualityServiceGradlePlugin:4.3.7"
}
}
allprojects {
repositories {
google()
mavenCentral()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
https://stackoverflow.com/questions/71505497
复制相似问题