使用Applovin插件Android Studio后会出错

发布于 2025-01-30 07:56:15 字数 6541 浏览 3 评论 0原文

我的应用程序在不添加Applovin SDK的情况下运行完美,顺利地工作,如何解决遇到的问题的问题?

这是我的gradle文件(root),

buildscript {
repositories {
    maven { url 'https://artifacts.applovin.com/android' }
    google()
}
dependencies {
                    //4.3.1
    classpath 'com.android.tools.build:gradle:4.3.1'
    classpath 'com.google.gms:google-services:4.3.10'
    classpath "com.applovin.quality:AppLovinQualityServiceGradlePlugin:3.0.0"
}
}// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
    id 'com.android.application' version '7.1.1' apply false
    id 'com.android.library' version '7.1.1' apply false
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

这是我的gradle应用程序级别

apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'applovin-quality-service'

applovin {
    apiKey "OkvHFuab6SR_8RzKBqWGvaAdGFTuBmTQiITRJzo2fV0PulrwAyX1OfftyR3O9JsC5eGR7vbUp76zHLFI6TQ1FF"
}

android { compilesdk 31

defaultConfig {
    applicationId "com.test.app"
    minSdk 21
    targetSdk 31
    versionCode 1
    versionName "1.0"

    testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

buildTypes {
    release {
        minifyEnabled true
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_8
    targetCompatibility JavaVersion.VERSION_1_8
}

}

dependencies {
                        //FIREBASE
    implementation platform('com.google.firebase:firebase-bom:28.0.0')
    implementation 'com.google.android.gms:play-services-auth:20.2.0'
    implementation 'com.google.firebase:firebase-auth'
    implementation 'com.google.firebase:firebase-database:'
    implementation 'com.firebaseui:firebase-ui-database:8.0.1'
    implementation 'com.google.firebase:firebase-storage'
                        //CONSTANT SIZE
    implementation 'com.intuit.sdp:sdp-android:1.0.6'
    implementation 'com.intuit.ssp:ssp-android:1.0.6'
                        //NEUMORPH
    implementation 'com.github.fornewid:neumorphism:0.3.0'
                        //ANIMATED BOTTOM BAR NAVIGATION
    implementation 'com.github.chetankoli1.BottomNavigation:chetanbottomnavigation:0.0.3'
                        //LOAD IMAGES FROM ONLINE
    implementation 'com.github.bumptech.glide:glide:4.13.0'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.13.0'
                        //CIRCLE IMAGE
    implementation 'de.hdodenhof:circleimageview:3.1.0'
                        //ADS
    implementation 'com.applovin:applovin-sdk:11.4.0'

    implementation 'androidx.appcompat:appcompat:1.4.1'
    implementation 'com.google.android.material:material:1.6.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
    testImplementation 'junit:junit:4.13.2'
    androidTestImplementation 'androidx.test.ext:junit:1.1.3'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
}

这是我试图运行应用程序

> Task :app:safedkAdjustInputsDebug FAILED
AGPBI: {"kind":"warning","text":"API 'MergedFlavor.getApplicationId()' is obsolete and has been replaced with 'Variant.getApplicationId()'.\nIt will be removed in version 7.0 of the Android Gradle plugin.\nGradle Properties must be used to change Variant information.\nFor more information, see https://d.android.com/r/tools/use-properties.\nTo determine what is calling MergedFlavor.getApplicationId(), use -Pandroid.debug.obsoleteApi=true on the command line to display more information.","sources":[{}]}

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:processDebugManifest'.
> Error processing manifest file for variantdebug

* Try:
Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:processDebugManifest'.
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.lambda$executeIfValid$1(ExecuteActionsTaskExecuter.java:188)
    at org.gradle.internal.Try$Failure.ifSuccessfulOrElse(Try.java:282)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeIfValid(ExecuteActionsTaskExecuter.java:186)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:174)
    at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:109)
    at org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute(FinalizePropertiesTaskExecuter.java:46)
    at org.gradle.api.internal.tasks.execution.ResolveTaskExecutionModeExecuter.execute(ResolveTaskExecutionModeExecuter.java:51)
    at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:57)
API 'MergedFlavor.getApplicationId()' is obsolete and has been replaced with 'Variant.getApplicationId()'.
It will be removed in version 7.0 of the Android Gradle plugin.
Gradle Properties must be used to change Variant information.
For more information, see https://d.android.com/r/tools/use-properties.
To determine what is calling MergedFlavor.getApplicationId(), use -Pandroid.debug.obsoleteApi=true on the command line to display more information.

    https://docs.gradle.org/7.2/userguide/validation_problems.html#missing_annotation for more details about this problem.
  - In plugin 'applovin-quality-service' type 'com.safedk.gradleplugin.tasks.AdjustInstrumentationInputsTask' property 'variant' is missing an input or output annotation.
    
    Reason: A property without annotation isn't considered during up-to-date checking.
    
    Possible solutions:
      1. Add an input or output annotation.
      2. Mark it as @Internal.

以使其简短的错误,这是造成问题的原因

org.gradle.api.GradleException: Error processing manifest file for variantdebug

Caused by: groovy.lang.MissingPropertyException: Could not get unknown property 'manifestOutputDirectory' for task ':app:processDebugManifest' of type com.android.build.gradle.tasks.ProcessMultiApkApplicationManifest.

任何帮助都是高度可观的

My App was working perfectly and smoothly without adding the applovin SDK, how do I solve the issue of the problem that I encountered?

Here's my Gradle file (Root)

buildscript {
repositories {
    maven { url 'https://artifacts.applovin.com/android' }
    google()
}
dependencies {
                    //4.3.1
    classpath 'com.android.tools.build:gradle:4.3.1'
    classpath 'com.google.gms:google-services:4.3.10'
    classpath "com.applovin.quality:AppLovinQualityServiceGradlePlugin:3.0.0"
}
}// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
    id 'com.android.application' version '7.1.1' apply false
    id 'com.android.library' version '7.1.1' apply false
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

Here's my Gradle app level

apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'applovin-quality-service'

applovin {
    apiKey "OkvHFuab6SR_8RzKBqWGvaAdGFTuBmTQiITRJzo2fV0PulrwAyX1OfftyR3O9JsC5eGR7vbUp76zHLFI6TQ1FF"
}

android {
compileSdk 31

defaultConfig {
    applicationId "com.test.app"
    minSdk 21
    targetSdk 31
    versionCode 1
    versionName "1.0"

    testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

buildTypes {
    release {
        minifyEnabled true
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_8
    targetCompatibility JavaVersion.VERSION_1_8
}

}

dependencies {
                        //FIREBASE
    implementation platform('com.google.firebase:firebase-bom:28.0.0')
    implementation 'com.google.android.gms:play-services-auth:20.2.0'
    implementation 'com.google.firebase:firebase-auth'
    implementation 'com.google.firebase:firebase-database:'
    implementation 'com.firebaseui:firebase-ui-database:8.0.1'
    implementation 'com.google.firebase:firebase-storage'
                        //CONSTANT SIZE
    implementation 'com.intuit.sdp:sdp-android:1.0.6'
    implementation 'com.intuit.ssp:ssp-android:1.0.6'
                        //NEUMORPH
    implementation 'com.github.fornewid:neumorphism:0.3.0'
                        //ANIMATED BOTTOM BAR NAVIGATION
    implementation 'com.github.chetankoli1.BottomNavigation:chetanbottomnavigation:0.0.3'
                        //LOAD IMAGES FROM ONLINE
    implementation 'com.github.bumptech.glide:glide:4.13.0'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.13.0'
                        //CIRCLE IMAGE
    implementation 'de.hdodenhof:circleimageview:3.1.0'
                        //ADS
    implementation 'com.applovin:applovin-sdk:11.4.0'

    implementation 'androidx.appcompat:appcompat:1.4.1'
    implementation 'com.google.android.material:material:1.6.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
    testImplementation 'junit:junit:4.13.2'
    androidTestImplementation 'androidx.test.ext:junit:1.1.3'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
}

This is the error that i am getting when trying to run the app

> Task :app:safedkAdjustInputsDebug FAILED
AGPBI: {"kind":"warning","text":"API 'MergedFlavor.getApplicationId()' is obsolete and has been replaced with 'Variant.getApplicationId()'.\nIt will be removed in version 7.0 of the Android Gradle plugin.\nGradle Properties must be used to change Variant information.\nFor more information, see https://d.android.com/r/tools/use-properties.\nTo determine what is calling MergedFlavor.getApplicationId(), use -Pandroid.debug.obsoleteApi=true on the command line to display more information.","sources":[{}]}

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:processDebugManifest'.
> Error processing manifest file for variantdebug

* Try:
Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:processDebugManifest'.
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.lambda$executeIfValid$1(ExecuteActionsTaskExecuter.java:188)
    at org.gradle.internal.Try$Failure.ifSuccessfulOrElse(Try.java:282)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeIfValid(ExecuteActionsTaskExecuter.java:186)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:174)
    at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:109)
    at org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute(FinalizePropertiesTaskExecuter.java:46)
    at org.gradle.api.internal.tasks.execution.ResolveTaskExecutionModeExecuter.execute(ResolveTaskExecutionModeExecuter.java:51)
    at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:57)
API 'MergedFlavor.getApplicationId()' is obsolete and has been replaced with 'Variant.getApplicationId()'.
It will be removed in version 7.0 of the Android Gradle plugin.
Gradle Properties must be used to change Variant information.
For more information, see https://d.android.com/r/tools/use-properties.
To determine what is calling MergedFlavor.getApplicationId(), use -Pandroid.debug.obsoleteApi=true on the command line to display more information.

    https://docs.gradle.org/7.2/userguide/validation_problems.html#missing_annotation for more details about this problem.
  - In plugin 'applovin-quality-service' type 'com.safedk.gradleplugin.tasks.AdjustInstrumentationInputsTask' property 'variant' is missing an input or output annotation.
    
    Reason: A property without annotation isn't considered during up-to-date checking.
    
    Possible solutions:
      1. Add an input or output annotation.
      2. Mark it as @Internal.

To make it short, here's the cause of the problem

org.gradle.api.GradleException: Error processing manifest file for variantdebug

and,

Caused by: groovy.lang.MissingPropertyException: Could not get unknown property 'manifestOutputDirectory' for task ':app:processDebugManifest' of type com.android.build.gradle.tasks.ProcessMultiApkApplicationManifest.

Any help is highly appreciable

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文