InflateException使用的ProGuard后,AdMob的AD浏览报 [英] InflateException for admob's adview after using proguard
问题描述
我是新来admob.I采用Android的Froyo和我说 AD浏览报
来我的main.xml如下:
I'm new to admob.I use Android froyo and I added Adview
to my main.xml as follow:
<com.google.ads.AdView
xmlns:googleads="http://schemas.android.com/apk/lib/com.google.ads"
android:id="@+id/ad"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
googleads:adSize="BANNER"
googleads:adUnitId="a14ed7ed1b71bc0" />
所以当我尝试部署使用亚行的一切我的应用程序就可以了。 但是当我使用ProGuard的,我在我的手机上安装APK,应用程序崩溃,在开始时。
so when i try to deploy my app using adb everything is ok. But when i use proguard and i install the apk on my phone, app crashes at the begining.
LogCat中说:
产生的原因:android.view.InflateException:二进制XML文件中的行#10: 错误充气类com.google.ads.AdView
Caused by: android.view.InflateException: Binary XML file line #10: Error inflating class com.google.ads.AdView
于是我跟着一些职位在这里,说要重命名的lib应用程序文件夹中的库,但没有结果。我加了
So I followed some posts here that says to rename lib app folder to libs but no result. I added
我的清单app.But没有结果。 是admpob 4.3.1兼容升级Froyo? 我真的不知道什么是problem.Please帮助 侨
to my manifest app.But no result. Is admpob 4.3.1 compliant with froyo? I really have no idea what is the problem.Please help ciao
推荐答案
在ProGuard的手册中,一些例子给出。在那里,它规定
In proguard manual, some examples are given. There it states
如果您使用的是另外谷歌的API,你必须指定那些为好,如:
If you're using additional Google APIs, you'll have to specify those as well, for instance:
-libraryjars /usr/local/android-sdk/add-ons/google_apis-7_r01/libs/maps.jar
-libraryjars /usr/local/android-sdk/add-ons/google_apis-7_r01/libs/maps.jar
尝试指定的AdMob的库路径这种方式ProGuard的配置文件。
Try specifying the admob library path this way in proguard config file.
你有没有加入你的罐子构建路径?
看看这有助于
Have you added your jar to build path?
See if this helps
这篇关于InflateException使用的ProGuard后,AdMob的AD浏览报的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!