AppLovin 质量服务 Gradle 插件

发布于 2025-01-14 17:50:48 字数 3584 浏览 5 评论 0原文

我正在尝试将我的应用程序与 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

我的 Gradle 文件:

    // 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 - 添加的主题标签只是手动添加以隐藏我的密钥。

I'm trying to mediate my app with MAX and I'm having trouble trying to integrating it on my Gradle file I have followed all the instructions here but I keep the error log below every time I try to build my app :

    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

My Gradle file :

    // 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
}

My Gradle App level :

    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'
}

My manifest meta line :

<meta-data android:name="applovin.sdk.key"
        android:value="######oRQNDu54FZ1Sr7DocsC0hcs-3ZD91eX-OXTxFK75Qg_EANzzxoKr9lxTdgIh3c-G5os5ykNx2gz4Q5x"/>

N/B - The hashtags added are just added manually to hide my keys.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

黎夕旧梦 2025-01-21 17:50:48

发现我需要在 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
}

Found out I needed to add the applovin dependency inside the gradle top level build file adding the specific version as well

    // 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
}
捎一片雪花 2025-01-21 17:50:48

在项目级别的 gradle 文件中,您应该添加 dependentenciew `dependency {

    classpath 'com.android.tools.build:gradle:8.2.1'
    classpath "com.applovin.quality:AppLovinQualityServiceGradlePlugin:4.13.6"
}`

AppLovinQualityServiceGradlePlugin 也应该随着您的 gradle 更新而更新。在这种情况下,因为我的 gradle 是 8.2.1,那么您的 AppLovinQualityServiceGradlePlugin 也应该更新

in project level gradle file you should add in dependenciew `dependencies {

    classpath 'com.android.tools.build:gradle:8.2.1'
    classpath "com.applovin.quality:AppLovinQualityServiceGradlePlugin:4.13.6"
}`

the AppLovinQualityServiceGradlePlugin should also be updated as your gradle updated. in this case as my gradle is 8.2.1 then against this your AppLovinQualityServiceGradlePlugin should also update

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文