• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
韩亚飞_yue31313_韩梦飞沙
未来的某一天你会觉得现在所做的,大部分很烂,小部分很好
博客园    首页    新随笔    联系   管理    订阅  订阅

Android apk去广告

韩梦飞沙 yue31313 韩亚飞 han_meng_fei_sha  313134555@qq.com

 

下载地址: 【北方网通】    【电信网通】

 

【下载说明】

 

1 点击上面的地址,打开下载页面

 

2 点击"普通下载"--等待30秒--点击"下载"按钮--保存

 

 

使用Choose APK来选择一个APK文件

 

 

点击Decode APK之后,选择一个Decode目录

 

 

Decode APK按钮会自动创建与APK文件同名的目录

 

 

点击Find Ads来查找有广告代码的文件。可以看到上图中main_lite.xml和一些smali文件中都有广告代码。xml文件中的是布局文件,smali文件需要将其中的广告代码的网址替换就可以了。

 

 

点击Open File之后,可以看到

 

<TextView Android:textStyle="bold" android:textColor="#ffcccccc" android:gravity="center" android:id="@id/ad_bk_view" android:background="#ff888888" android:focusable="false" android:focusableInTouchMode="false" android:longClickable="false" android:layout_width="fill_parent" android:layout_height="48.0dip" android:text="" android:layout_alignParentTop="true" />
    <com.admob.android.ads.AdView android:id="@id/ad" android:visibility="visible" android:layout_width="fill_parent" android:layout_height="48.0dip" android:layout_alignParentTop="true" qwad:backgroundColor="#ff000000" qwad:primaryTextColor="#ffffffff" qwad:secondaryTextColor="#ffcccccc" qwad:refreshInterval="60" />

 

需要将上面的改为:

 

<TextView android:textStyle="bold" android:textColor="#ffcccccc" android:gravity="center" android:id="@id/ad_bk_view" android:background="#ff888888" android:focusable="false" android:focusableInTouchMode="false" android:longClickable="false" android:layout_width="0dip" android:layout_height="0dip" android:text="" android:layout_alignParentTop="true" />
    <com.admob.android.ads.AdView android:id="@id/ad" android:visibility="visible" android:layout_width="0dip" android:layout_height="0dip" android:layout_alignParentTop="true" qwad:backgroundColor="#ff000000" qwad:primaryTextColor="#ffffffff" qwad:secondaryTextColor="#ffcccccc" qwad:refreshInterval="60" />

 

 

改动之后,保存。点击“BuildAPK”,之后点击“SignAPK”,之后,可以使用Install按钮来安装到虚拟机。

 



虚拟机上的运行效果如图。

=====

Android去广告

韩梦飞沙 韩亚飞 313134555@qq.com yue31313 han_meng_fei_sha
posted @ 2017-08-17 23:32  韩梦飞沙_韩亚飞  阅读(280)  评论(0)    收藏  举报
刷新页面返回顶部
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3