如何在 android 程序中加入 admob 广告赚钱
2010-03-01 05:14:00 来源:WEB开发网Go to the Properties of your project (right-click on your project from the
Package Explorer tab and select Properties)
Select "Java Build Path" from
left panel
Select "Libraries" tab from the main window
Click on "Add
JARs..."
Select the JAR copied to the libs directory
Click "OK" to add
the SDK to your android project
注意:需要首先在你工程的根目录下新建一个叫做“libs”的文件夹,并把之前所说的最重要的东西“admob-sdk-android.jar”复制到里面。
AndroidManifest.xml
Your AdMob publisher ID was given to you when creating your publisher account on www.admob.com before downloading this code. It is a 15-character code like a1496ced2842262. Just before the closing </application> tag add a line to set your publisher ID:
<!-- The application's publisher ID assigned by AdMob
-->
<meta-data android:value="YOUR_ID_HERE"
android:name="ADMOB_PUBLISHER_ID" />
</application>
Set
any permissions not already included just before the closing </manifest>
tag:
<!-- AdMob SDK permissions -->
<uses-permission android:name="android.permission.INTERNET"
/>
<uses-permission
android:name="android.permission.ACCESS_COARSE_LOCATION" />
</manifest>
更多精彩
赞助商链接