Problem with adding Admob 6.2.1 SDK to my project


I was developing an application on API 9, 2.3.3 then I changed the build to 4.0.3 because I only had 4.0.3 installed other than 2.3.3 and 2.2 due to admob's policy.

I have tried to embed admob into my Android application but have been failing ever since. I finally did it on my school computer and it works perfectly. However, I imported my project into my own laptop, trying to edit and add on more coding and lots of problems started to arise without even editing any part of the code.

What I know is that my school PCs are using eclipse indigo and I am using juno. Is it because I did not import my codes properly or it is my eclipse version or something else? Here's the dummy code I did.


public void onCreate(Bundle savedInstanceState) {

public boolean onCreateOptionsMenu(Menu menu) {
    getMenuInflater().inflate(, menu);
    return true;


< android:id="@+id/adView"
    ads:adUnitId="the right code"


    android:targetSdkVersion="15" />

So there is it. I have looked into many sites for help but to no avail.

When you move a project in between computers you have to re-import things (because their file path's have changed). Try looking in your imports and seeing if the SDK is still imported.

Whether it is or not, if you are using ADT tools r-17 and up then you have to create a libs/ folder in you main directory, and put a copy of the adMob SDK in there.

Hope this solves your problem