听起来这个问题可能与以下内容重复:
但事实并非如此!(特别是因为这个问题来自2011年,谷歌进程发生了变化(看起来似乎)).我正在关注此google-reference以进行正确设置.
首先,有"使用Android Studio"选项,我不知道那是什么.然后,我去了下一个:"使用Eclipse或其他IDE ",然后有一个注释,这是非常直接的.
我在IntelliJ Idea上选择了我的项目,按下F4(打开模块设置)并转到平台设置中的SDK,然后添加了他们要求的文件夹(extras\google\google_play_services).假设这是"添加Google广告库"的正确方法,我继续并将清单文件添加到他们要求的内容中.当我编译应用程序时,我收到错误:
D:\Computer Programming\IdeaProjects\Black Square\AndroidManifest.xml:8: error:
Error: No resource found that matches the given name (at 'value' with value '@integer/google_play_services_version').
Run Code Online (Sandbox Code Playgroud)
所以,看起来,我没有正确导入它(从这部分开始,我不知道如何继续).
我正在测试Android SDK的AdMob.我无法设置admob:testing="true"因为admob属性未知.
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:admob="http://schemas.android.com/apk/res/org.ifies.android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:background="#FF000000"
android:clickable="true"
>
<com.admob.android.ads.AdView
android:id="@+id/admob"
android:visibility="visible"
android:layout_width="fill_parent"
android:layout_height="100px"
android:background="#FF0000"
admob:testing="true"
/>
</LinearLayout>
Run Code Online (Sandbox Code Playgroud)
我的Eclipse抱怨admob:testing="true"说它有一个未知的前缀.有人知道如何解决这个问题吗?
子问题:任何人都知道如何更改广告的高度?它似乎固定为48px,在任何DROID手机上看起来都不太好......