I have encountered a problem while I was adding ads to my app. The problem is that when I import the ads, it gives me an error. The error is The import com.google.ads cannot be resolved
. I don't know how to resolve it. I have checked the internet and banged my head on the wall for the past week. Nothing is working. Here's what I have:
My Android SDK Manager:
My JAR files:
Order and Export:
Project Explorer:
For my project build target in project.properties, it is target=Google Inc.:Google APIs:17
What am I doing wrong? Do I need to add something? Any help regarding this problem is greatly appreciated.
EDIT
Here is my AndroidManifest.xml:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.currencyconverter"
android:versionCode="1"
android:versionName="1.0" >
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<supports-screens
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:xlargeScreens="true" />
<uses-sdk
android:minSdkVersion="13"
android:targetSdkVersion="18" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.example.currencyconverter.MainActivity2"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
You have added the zip
and not the jar
in your eclipse build path. Unzip the zipped file, take the jar out of it and add it to your eclipse build path.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.