开发者

Moved application to Library, now com.google.ads.adview doesn't work

I had a working Android app that I built in Eclipse. I'm in the process of making a free version of the app and so I moved to existing app into a library (I checked the "IsLibrary" button) - then I created a "Free" project with the intent to reference the now new library.

I have an error though -

I've got this:

   <com.google.ads.AdView android:id="@+id/a开发者_JS百科dView"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    ads:adUnitId="a14e11c5fc50399"
                    ads:adSize="BANNER"
                    ads:loadAdOnCreate="false"/>

And AdView adView = (AdView)findViewById(R.id.adView); to reference it from an activity. It says "adView cannot be resolved". I added the google admob jar to my new library, but still no-go there.

There must be something about using a jdk within a library that I've missed.

Any tips?


Make sure the admob jar needed in the library project is in the "Free" project classpath as well

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜