So I just recently updated to ADT 20 and it's been a complete nightmare.
所以我最近刚刚更新到ADT 20,这是一场彻头彻尾的噩梦。
I tried all the solutions I've found online. 1. I put the jar into the LIBS folder 2. Added jar from libary tab in the build path & checked it in the export path 3. I even did this one thing where someone said to make the libs folder a source folder (i guess so it get exported)
我尝试了我在网上找到的所有解决方案。 1.我将jar放入LIBS文件夹2.在构建路径的libary选项卡中添加jar并在导出路径中检查它3.我甚至做了一件事,有人说将libs文件夹作为源文件夹(我猜所以它出口了)
Nothing works. Please help this is a total nightmare. I can't use any external jars at all...
什么都行不通。请帮助这是一场彻头彻尾的噩梦。我根本不能使用任何外部罐子......
08-18 11:06:45.144: E/AndroidRuntime(3886): FATAL EXCEPTION: main
08-18 11:06:45.144: E/AndroidRuntime(3886): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.test/com.example.test.Main}: android.view.InflateException: Binary XML file line #15: Error inflating class com.google.ads.AdView
08-18 11:06:45.144: E/AndroidRuntime(3886): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1696)
08-18 11:06:45.144: E/AndroidRuntime(3886): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1716)
08-18 11:06:45.144: E/AndroidRuntime(3886): at android.app.ActivityThread.access$1500(ActivityThread.java:124)
08-18 11:06:45.144: E/AndroidRuntime(3886): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:968)
08-18 11:06:45.144: E/AndroidRuntime(3886): at android.os.Handler.dispatchMessage(Handler.java:99)
08-18 11:06:45.144: E/AndroidRuntime(3886): at android.os.Looper.loop(Looper.java:130)
08-18 11:06:45.144: E/AndroidRuntime(3886): at android.app.ActivityThread.main(ActivityThread.java:3806)
08-18 11:06:45.144: E/AndroidRuntime(3886): at java.lang.reflect.Method.invokeNative(Native Method)
08-18 11:06:45.144: E/AndroidRuntime(3886): at java.lang.reflect.Method.invoke(Method.java:507)
08-18 11:06:45.144: E/AndroidRuntime(3886): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
08-18 11:06:45.144: E/AndroidRuntime(3886): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
08-18 11:06:45.144: E/AndroidRuntime(3886): at dalvik.system.NativeStart.main(Native Method)
08-18 11:06:45.144: E/AndroidRuntime(3886): Caused by: android.view.InflateException: Binary XML file line #15: Error inflating class com.google.ads.AdView
08-18 11:06:45.144: E/AndroidRuntime(3886): at android.view.LayoutInflater.createView(LayoutInflater.java:518)
08-18 11:06:45.144: E/AndroidRuntime(3886): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:570)
08-18 11:06:45.144: E/AndroidRuntime(3886): at android.view.LayoutInflater.rInflate(LayoutInflater.java:623)
08-18 11:06:45.144: E/AndroidRuntime(3886): at android.view.LayoutInflater.inflate(LayoutInflater.java:408)
08-18 11:06:45.144: E/AndroidRuntime(3886): at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
08-18 11:06:45.144: E/AndroidRuntime(3886): at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
08-18 11:06:45.144: E/AndroidRuntime(3886): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:256)
08-18 11:06:45.144: E/AndroidRuntime(3886): at android.app.Activity.setContentView(Activity.java:1703)
08-18 11:06:45.144: E/AndroidRuntime(3886): at com.example.test.Main.onCreate(Main.java:12)
08-18 11:06:45.144: E/AndroidRuntime(3886): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
08-18 11:06:45.144: E/AndroidRuntime(3886): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1660)
08-18 11:06:45.144: E/AndroidRuntime(3886): ... 11 more
08-18 11:06:45.144: E/AndroidRuntime(3886): Caused by: java.lang.reflect.InvocationTargetException
08-18 11:06:45.144: E/AndroidRuntime(3886): at java.lang.reflect.Constructor.constructNative(Native Method)
08-18 11:06:45.144: E/AndroidRuntime(3886): at java.lang.reflect.Constructor.newInstance(Constructor.java:415)
08-18 11:06:45.144: E/AndroidRuntime(3886): at android.view.LayoutInflater.createView(LayoutInflater.java:505)
08-18 11:06:45.144: E/AndroidRuntime(3886): ... 21 more
08-18 11:06:45.144: E/AndroidRuntime(3886): Caused by: java.lang.RuntimeException: Could not initialize AdView: Required XML attribute "adUnitId" missing
08-18 11:06:45.144: E/AndroidRuntime(3886): at com.google.ads.AdView.a(SourceFile:417)
08-18 11:06:45.144: E/AndroidRuntime(3886): at com.google.ads.AdView.<init>(SourceFile:129)
08-18 11:06:45.144: E/AndroidRuntime(3886): ... 24 more
08-18 11:06:45.144: E/AndroidRuntime(3886): Caused by: com.google.ads.internal.b: Required XML attribute "adUnitId" missing
08-18 11:06:45.144: E/AndroidRuntime(3886): at com.google.ads.AdView.a(SourceFile:360)
08-18 11:06:45.144: E/AndroidRuntime(3886): ... 25 more
1 个解决方案
#1
0
I actually figure out what was wrong right when I posted this. Caused by: com.google.ads.internal.b: Required XML attribute "adUnitId" missing
. So stupid, the error logs put it all the way at the bottom.
当我发布这个时,我确实找出了什么是错的。原因:com.google.ads.internal.b:缺少必需的XML属性“adUnitId”。如此愚蠢,错误日志将它一直放在最底层。
#1
0
I actually figure out what was wrong right when I posted this. Caused by: com.google.ads.internal.b: Required XML attribute "adUnitId" missing
. So stupid, the error logs put it all the way at the bottom.
当我发布这个时,我确实找出了什么是错的。原因:com.google.ads.internal.b:缺少必需的XML属性“adUnitId”。如此愚蠢,错误日志将它一直放在最底层。