目录
关闭Google全屏广告
com.google.android.gms.ads.AdActivity
.method protected onCreate(Landroid/os/Bundle;)V
.locals 1
invoke-super {p0, p1}, Landroid/app/Activity;->onCreate(Landroid/os/Bundle;)V
invoke-virtual {p0}, Landroid/app/Activity;->finish()V
return-void
.end method
隐藏Google横幅广告
com.google.android.gms.ads.BaseAdView
The ad size can only be set once on AdView
The ad unit ID can only be set once on AdView.
.method public onLayout(ZIIII)V
.locals 2
const/4 p1, 0x0
invoke-virtual {p0, p1}, Landroid/view/ViewGroup;->getChildAt(I)Landroid/view/View;
move-result-object p1
if-eqz p1, :cond_0
invoke-virtual {p1}, Landroid/view/View;->getVisibility()I
move-result v0
const/16 v1, 0x8
if-eq v0, v1, :cond_0
const/16 v1, 0x8
invoke-virtual {p1, v1}, Landroid/view/View;->setVisibility(I)V
invoke-virtual {p1}, Landroid/view/View;->getMeasuredWidth()I
move-result v0
invoke-virtual {p1}, Landroid/view/View;->getMeasuredHeight()I
move-result v1
sub-int/2addr p4, p2
sub-int/2addr p4, v0
div-int/lit8 p4, p4, 0x2
sub-int/2addr p5, p3
sub-int/2addr p5, v1
div-int/lit8 p5, p5, 0x2
add-int/2addr v0, p4
add-int/2addr v1, p5
invoke-virtual {p1, p4, p5, v0, v1}, Landroid/view/View;->layout(IIII)V
:cond_0
return-void
.end method
Google广告
googleAdViewId为ad_container
首先在AndroidManifest.xml文件内搜索ads关键字,将关于com.google.android.gms.ads的标签全部删除
去除后直接打包运行会崩溃
全局搜索
You must have the following declaration within the <application> element: <meta-data android:name=\"com.google.android.gms.version\" android:value=\"@integer/google_play_services_version\" />
或
You must have the following declaration with
搜索结果可能会出现多个
找到方法结尾为 (Landroid/content/Context;I)I 的方法
或IllegalStateException异常
定位该方法
使其返回0
示例
com.google.android.gms.common.GooglePlayServicesUtilLight
.method public static isGooglePlayServicesAvailable(Landroid/content/Context;I)I
.locals 3
.annotation runtime Ljava/lang/Deprecated;
.end annotation
const/4 v0, 0x0
return v0
.end method
或定位
com.google.android.gms.ads.MobileAds
清除其中
initialize
googleNativeAD占位移除
admob_appopen
com.google.android.gms.ads.appopen.AppOpenAd
public static void load(final Context context, final String str, final AdRequest adRequest, final int i, final AppOpenAdLoadCallback appOpenAdLoadCallback) {
Preconditions.checkNotNull(context, "Context cannot be null.");
Preconditions.checkNotNull(str, "adUnitId cannot be null.");
Preconditions.checkNotNull(adRequest, "AdRequest cannot be null.");
Preconditions.checkMainThread("#008 Must be called on the main UI thread.");
zzbhz.zzc(context);
if (((Boolean) zzbjn.zzd.zze()).booleanValue()) {
if (((Boolean) zzay.zzc().zzb(zzbhz.zziv)).booleanValue()) {
zzcex.zzb.execute(new Runnable() { // from class: com.google.android.gms.ads.appopen.zzb
@Override // java.lang.Runnable
public final void run() {
Context context2 = context;
String str2 = str;
AdRequest adRequest2 = adRequest;
try {
new zzbco(context2, str2, adRequest2.zza(), i, appOpenAdLoadCallback).zza();
} catch (IllegalStateException e) {
zzbyy.zza(context2).zzd(e, "AppOpenAd.load");
}
}
});
return;
}
}
new zzbco(context, str, adRequest.zza(), i, appOpenAdLoadCallback).zza();
}
admob_banner
com.google.android.gms.ads.BaseAdView
public void setAdUnitId(String str) {
this.zza.zzu(str);
}
public final void zzu(String str) {
if (this.zzl == null) {
this.zzl = str;
return;
}
throw new IllegalStateException("The ad unit ID can only be set once on AdView.");
}
public void loadAd(final AdRequest adRequest) {
Preconditions.checkMainThread("#008 Must be called on the main UI thread.");
zzbhz.zzc(getContext());
if (((Boolean) zzbjn.zze.zze()).booleanValue()) {
if (((Boolean) zzay.zzc().zzb(zzbhz.zziv)).booleanValue()) {
zzcex.zzb.execute(new Runnable() { // from class: com.google.android.gms.ads.zzc
@Override // java.lang.Runnable
public final void run() {
BaseAdView baseAdView = BaseAdView.this;
try {
baseAdView.zza.zzm(adRequest.zza());
} catch (IllegalStateException e) {
zzbyy.zza(baseAdView.getContext()).zzd(e, "BaseAdView.loadAd");
}
}
});
return;
}
}
this.zza.zzm(adRequest.zza());
}
admob_inter
com.google.android.gms.ads.interstitial.InterstitialAd
public static void load(final Context context, final String str, final AdRequest adRequest, final InterstitialAdLoadCallback interstitialAdLoadCallback) {
Preconditions.checkNotNull(context, "Context cannot be null.");
Preconditions.checkNotNull(str, "AdUnitId cannot be null.");
Preconditions.checkNotNull(adRequest, "AdRequest cannot be null.");
Preconditions.checkNotNull(interstitialAdLoadCallback, "LoadCallback cannot be null.");
Preconditions.checkMainThread("#008 Must be called on the main UI thread.");
zzbhz.zzc(context);
if (((Boolean) zzbjn.zzf.zze()).booleanValue()) {
if (((Boolean) zzay.zzc().zzb(zzbhz.zziv)).booleanValue()) {
zzcex.zzb.execute(new Runnable() { // from class: com.google.android.gms.ads.interstitial.zza
@Override // java.lang.Runnable
public final void run() {
Context context2 = context;
String str2 = str;
AdRequest adRequest2 = adRequest;
try {
new zzbrc(context2, str2).zza(adRequest2.zza(), interstitialAdLoadCallback);
} catch (IllegalStateException e) {
zzbyy.zza(context2).zzd(e, "InterstitialAd.load");
}
}
});
return;
}
}
new zzbrc(context, str).zza(adRequest.zza(), interstitialAdLoadCallback);
}
admob_native
com.google.android.gms.ads.AdLoader.Builder
public Builder(Context context, String str) {
zzbo zzc = zzaw.zza().zzc(context, str, new zzbtx());
this.zza = (Context) Preconditions.checkNotNull(context, "context cannot be null");
this.zzb = zzc;
}
com.google.android.gms.ads.AdLoader
private final void zzb(final zzdr zzdrVar) {
zzbhz.zzc(this.zzb);
if (((Boolean) zzbjn.zzc.zze()).booleanValue()) {
if (((Boolean) zzay.zzc().zzb(zzbhz.zziv)).booleanValue()) {
zzcex.zzb.execute(new Runnable() { // from class: com.google.android.gms.ads.zza
@Override // java.lang.Runnable
public final void run() {
AdLoader.this.zza(zzdrVar);
}
});
return;
}
}
try {
this.zzc.zzg(this.zza.zza(this.zzb, zzdrVar));
} catch (RemoteException e) {
zzcfi.zzh("Failed to load ad.", e);
}
}
去除Facebook广告
搜索
You must call AudienceNetworkAds.buildInitSettings(Context).initialize() before you can use Audience Network SDK.
定位其中
initialize
去除UnityAds广告
定位
com.unity3d.ads.UnityAds
文件
清空其中的
initialize;load;show
方法使其无效即可
或定位
com.unity3d.services.UnityServices
文件
清空其中
initialize
方法使其无效即可
去除MoPub广告
定位
com.mopub.common.MoPub
文件
清空其中
initializeSdk
方法
去除穿山甲平台广告
定位
com.bytedance.sdk.openadsdk.TTAdSdk
文件
清空其中
init
方法
去除Start.io广告
全局搜索
inAppPurchaseAmount
或定位
com.startapp.sdk.adsbase.StartAppSDK
com.startapp.android.publish.adsCommon.StartAppSDK
文件
清空其中的
init
方法
去除Stack Appodeal广告
定位
com.appodeal.ads.Appodeal
文件
清空其中的
initialize
方法
去除Chartboost广告
定位
com.chartboost.sdk.Chartboost
文件
清空其中
startWithAppId
方法
去除Applovin广告
定位
com.applovin.sdk.AppLovinSdk
文件
清空其中
initializeSdk
方法
全局搜索
Unable to find AppLovin SDK key. Please add meta-data android:name=\"applovin.sdk.key\" android:value=\"YOUR_SDK_KEY_HERE\" into AndroidManifest.xml.
清空其中方法
Manifest文件内搜索
<meta-data android:name="applovin.sdk.key"
将其删除
去除Ogury广告
全局搜索
Presage
或定位
io.presage.Presage.start
清空其方法
io.presage.common.PresageSdk.init
去除iron广告
全局搜索
Lcom/ironsource/mediationsdk/IronSource;
.field public static final DataSource_MOPUB:Ljava/lang/String; = "MoPub"
init() must be called before loadInterstitial()
定位清空方法其中
public synchronized void init(Activity
public varargs declared-synchronized init(Landroid/app/Activity;
去除Amazon广告
定位
com.amazon.device.ads
清空其中
setAppKey
去除inmobi广告
定位
com.inmobi.sdk
或搜索
com.inmobi.rendering.InMobiAdActivity
清空其中
init
去除Smaato广告
定位
com.smaato.sdk.core.SmaatoSdk
或搜索
Parameter publisherId cannot be empty for SmaatoSdk::init
清空其中
init
去除Tapjoy广告
定位
com.tapjoy.Tapjoy
修改其中
connect
去除AdColony广告
定位
Cannot configure AdColony; configuration mechanism requires 5
Ignoring call to AdColony.getZone() as AdColony has not yet been
com.adcolony.sdk.AdColony
修改其中
configure
去除HyprMX广告
定位
com.hyprmx.android.sdk.initialization.InitializationController
"const HYPRInitializationController = new InitializationController(\""
\"); HYPRInitializationController.initialize(\'
HYPRInitializationController.javascriptUpgradeFailed(\
清空其中
initialize
方法
去除OneSignal广告
定位
com.onesignal.OneSignal
onesignal_app_id
OneSignal SDK initialization delayed, user privacy consent is set to required for this application.
Starting OneSignal initialization
清空其中
init
方法
去除appnext广告
定位
com.appnext.base.Appnext
Cannot init Appnext with null context
清空其中
init
方法
去除TradPlus广告
定位
com.tradplus.ads.base.GlobalTradPlus
GlobalTradPlus getLocalParam coppa:
清空其中
initTradPlusSdk
或
com.tradplus.ads.mobileads.TradPlus
facebook,admob and china plugin can not be together
com.tradplus.china.api.TPChinaSDKHandler
GDPR level setting error!!! Level must be PERSONALIZED or NONPERSONALIZED.
setGDPRDataCollection: context should not be null
清空其中
initSDK
去除yandex广告
定位
com.yandex.mobile.ads.common.MobileAds
清空其中
initialize
去除Vungle广告
定位
com.vungle.warren.Vungle
清空其中
init
去除Yodo1Mas广告
定位
com.yodo1.mas.Yodo1Mas
清空其中
init
去除solodroid广告
定位
is selected as Primary Ads
com.solodroid.ads.sdk.format.Initialize
清空其中
initAds
initBackupAds