Closed hunght85 closed 5 months ago
@hunght85 , we're going to release a new version of our plugin that will fix this issue. In the mean time do you mind trying the workaround mentioned here: https://github.com/AppLovin/AppLovin-MAX-Unity-Plugin/issues/376#issuecomment-2121341734
Also, going to close this as duplicate.
@hunght85 I was not able to reproduce your error in Unity 6 preview. Could you share the gradle files in your project? Could you also check if you are able to reproduce this in our demo app?
Starting a Gradle Daemon (subsequent builds will be faster)
Configure project :launcher
AppLovin Quality Service Plug-in for Gradle and Android Studio Version 5.2.7 Copyright (c) 2024 AppLovin Ltd. All rights reserved.
Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
BELOW IS CUSTOM MAIN GRADLE: apply plugin: 'com.android.library' apply plugin: 'applovin' APPLY_PLUGINS
dependencies { implementation "androidx.startup:startup-runtime:1.1.1" implementation "androidx.fragment:fragment:1.6.2" implementation fileTree(dir: 'libs', include: ['*.jar']) // Android Resolver Dependencies Start implementation 'com.applovin.mediation:google-adapter:[23.0.0.1]' // Assets/MaxSdk/Mediation/Google/Editor/Dependencies.xml:5 implementation 'com.applovin.mediation:unityads-adapter:4.10.0.0' // Assets/MaxSdk/Mediation/UnityAds/Editor/Dependencies.xml:4 implementation 'com.applovin:applovin-sdk:12.4.2' // Assets/MaxSdk/AppLovin/Editor/Dependencies.xml:4 implementation 'com.google.android.ump:user-messaging-platform:2.1.0' // Assets/MaxSdk/AppLovin/Editor/Dependencies.xml:5 // Android Resolver Dependencies End DEPS}
// Android Resolver Exclusions Start android { packaging { exclude ('/lib/armeabi/' + '') exclude ('/lib/armeabi-v7a/' + '') exclude ('/lib/mips/' + '') exclude ('/lib/mips64/' + '') exclude ('/lib/x86/' + '') exclude ('/lib/x86_64/' + '') } } // Android Resolver Exclusions End android { ndkPath "NDKPATH"
compileSdk **APIVERSION**
buildToolsVersion '**BUILDTOOLS**'
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
defaultConfig {
minSdk **MINSDK**
targetSdk **TARGETSDK**
ndk {
abiFilters **ABIFILTERS**
}
versionCode **VERSIONCODE**
versionName '**VERSIONNAME**'
consumerProguardFiles 'proguard-unity.txt'**USER_PROGUARD**
}
lint {
abortOnError false
}
androidResources {
noCompress = **BUILTIN_NOCOMPRESS** + unityStreamingAssets.tokenize(', ')
ignoreAssetsPattern = "!.svn:!.git:!.ds_store:!*.scc:!CVS:!thumbs.db:!picasa.ini:!*~"
}**PACKAGING**
} IL_CPP_BUILD_SETUP SOURCE_BUILD_SETUP EXTERNAL_SOURCES
Could you check that you have Custom Main Gradle Template
, Custom Base Gradle Template
, and Custom Gradle Properties Template
enabled in your project settings? If not, could you enable them, resolve dependencies using the External Dependency Manager, and try to build again?
I had all of them and try resolve dependencies using the External Dependency Manage but nothing changed.
Was this app updated from an older version of Unity? If so, the gradle templates might be old and you may have to re-generate them by disabling and re-enabling the templates.
Was this app updated from an older version of Unity? If so, the gradle templates might be old and you may have to re-generate them by disabling and re-enabling the templates.
That's is exactly reason. After delete all file and re-check option, I build success for android. Thank you all for great support
i have a same problem . What files do I need to delete? @hunght85
i have a same problem . What files do I need to delete? @hunght85 Bạn xóa hết file trong Asset -> Plugin -> Android. . rồi tick lại trong player setting
MAX Plugin Version
6.5.2
Unity Version
Unity 6000.0.1
Device/Platform Info
Android 14
Current Behavior
Error android build
Expected Behavior
No response
How to Reproduce
[SafeDK-ERROR] Android variants not detected. Please make sure you place the directive: apply plugin: 'applovin' after you apply the Android plugin in your build.gradle file
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
Where: Build file '/Volumes/MyData/Unity/Projects/Galaxiga/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/build.gradle' line: 22
What went wrong: A problem occurred evaluating project ':unityLibrary'.
Try:
2: Task failed with an exception.
Additional Info
No response