use minimum api level 22 or above for admob 7.3.1 or later
1 Like
lol, I am guessing, the team responsible for handling this issue doesnât exist anymore!
I was able to solve the export problem, but now that I installed the APK on my cell phone, the game stops as soon as it starts.
Does anyone know what could be happening?
@Mikhael_stardust use debugging on mac for android build. see here
This worked for me as well, Much thanks to the author of this solution @Unity3D_FerozAhamed
Delete folder <PROJECT_FOLDER>\Library\Bee\Android , Android Resolver > Force Resolve
1 Like
Thanks! This solution helped
2 Likes
Set it to at min API level 24 or higher.
If it still happens, inside gradleTemplate.properties
android.useAndroidX=true
android.enableDexingArtifactTransform=false
Check if it is set.
If you do useAndroidX=true , the ASM7 library is included, and here android.enableDexingArtifactTransform=false seems to conflict with that option.
If you delete android.enableDexingArtifactTransform=false, it will build normally.
android.enableDexingArtifactTransform=false is sometimes included in the ads sdk.
7 Likes
[quote=âMiryum, post:8, topic: 903995, username:Miryumâ]
I increased the min API Level to Android 7.0 and worked for me. And make sure Android dependencies are resolved.
[/quote] This worked for me tysm
Deleting the <PROJECT_FOLDER>\Library\Bee\Android did the trick for me
Thank you !
1 Like
Unity3D_FerozAhamed:
And then try building the game, if the issue still persists, try following the below steps:
Delete folder: <PROJECT_FOLDER>\Library\Bee\Android
Android Resolver > Force Resolve
Build again
Even if the above steps do not work then do the following:
Delete âAndroidâ folder present in the location : <PROJECT_FOLDER>\Library\Bee\Android
Increase the min API Level to Android 7.0
Android Resolver > Force Resolve
Build
This worked for me. Thank a ton
1 Like
Unity3D_FerozAhamed:
Well, if someone is stuck with the same issue, you can try doing the following :
Add the below content in Custom Progaurd :
# To enable ProGuard in your project, edit project.properties
# to define the proguard.config property as described in that file.
#
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in ${sdk.dir}/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the ProGuard
# include property in project.properties.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# Add any project specific keep options here:
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
-injars bin/admob-unity-plugin.jar
-outjars bin/proguard-admob-unity-plugin.jar
#-libraryjars <java.home>/lib/rt.jar
#-libraryjars /libs/android-support-v4.jar
-libraryjars <android.sdk>/platforms/android-16/android.jar
-libraryjars /libs/GoogleAdMobAdsSdk-6.4.1.jar
-libraryjars /libs/Unity-4.1-androidplayer.jar
-printusage bin/proguard.txt
-printmapping bin/proguard-out.map
-renamesourcefileattribute SourceFile
-dontusemixedcaseclassnames
-keepattributes Exceptions,InnerClasses,Signature,Deprecated,
SourceFile,LineNumberTable,*Annotation*,EnclosingMethod
-keep,includedescriptorclasses public class com.google.** { *; }
# Keep - Library. Keep all public and protected classes, fields, and methods.
-keep public class * {
public protected <fields>;
public protected <methods>;
}
# Keep names - _class method names. Keep all .class method names. This may be
# useful for libraries that will be obfuscated again with different obfuscators.
-keepclassmembers, allowshrinking class * {
java.lang.Class class$(java.lang.String);
java.lang.Class class$(java.lang.String, boolean);
}
# Keep names - Native method names. Keep all native class/method names.
-keepclasseswithmembers, allowshrinking class * {
native <methods>;
}
# Also keep - Enumerations. Keep the special static methods that are required in
# enumeration classes.
-keepclassmembers enum * {
public static **[] values();
public static ** valueOf(java.lang.String);
}
-keepclassmembers class * extends java.io.Serializable {
static final long serialVersionUID;
private static final java.io.ObjectStreamField[] serialPersistentFields;
private void writeObject(java.io.ObjectOutputStream);
private void readObject(java.io.ObjectInputStream);
java.lang.Object writeReplace();
java.lang.Object readResolve();
}
And then try building the game, if the issue still persists, try following the below steps:
Delete folder: <PROJECT_FOLDER>\Library\Bee\Android
Android Resolver > Force Resolve
Build again
Even if the above steps do not work then do the following:
Delete âAndroidâ folder present in the location : <PROJECT_FOLDER>\Library\Bee\Android
Increase the min API Level to Android 7.0
Android Resolver > Force Resolve
Build
Just these two steps solved my problem <PROJECT_FOLDER>\Library\Bee\Android and next: Android > Force Resolve, the unity team should have people like you on the team, thanks!.
1 Like
I have just increase the minimum API level to 8.0 and it works for me and then APK exported successfully.
I have not deleted any other folder.
1 Like