2014-04-09 3 views
0

내 APP를 실행할 수 없습니다 ... 문제가 activitymain_xml입니다. 누군가 나를 도울 수 있습니까? 그게 layout activity입니다.다음 클래스를 인스턴스화 할 수 없습니다. - com.google.ads.AdView

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
xmlns:app="http://schemas.android.com/apk/res-auto" 
xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads" 
xmlns:tools="http://schemas.android.com/tools" 
android:id="@+id/container" 
android:layout_width="match_parent" 
android:layout_height="match_parent" 
android:background="@drawable/background" 
tools:context="com.denisprojects.shoppinglist.MainActivity" 
tools:ignore="MergeRootFrame" > 



    <Button 
    android:id="@+id/button2" 
    style="?android:attr/buttonStyleSmall" 
    android:layout_width="80dp" 
    android:layout_height="50dp" 
    android:layout_alignParentLeft="true" 
    android:layout_alignParentTop="true" 
    android:background="@drawable/add" /> 
<com.google.ads.AdView 
    android:id="@+id/adsView" 
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    android:layout_below="@id/button2" 
    ads:adUnitId="ca-app-pub-5426545253667840/7625762411" 
    ads:adSize="BANNER" 
    ads:loadAdOnCreate="true" /> 
</RelativeLayout> 

는 이미 다른 퀘스트를 볼 수 있지만 난 여전히 내 APP 실행을 가져올 수 없습니다. 내 영어로 유감스럽게 생각합니다.

+0

은 프로젝트의 빌드 경로에 라이브러리 파일을 추가해야합니다. – GrIsHu

+0

나는 그것을 추가 ... 그리고 안드로이드 Manifest에 라인을 추가 ... 난 정말 문제가 어디 있는지 이해할 수 없다 ... 어쩌면 누군가가 알고 – DenisHD

답변

0

<activity android:name="com.google.ads.AdActivity" 
      android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/> 
+0

네 ... 그랬지 ...하지만 그건 작동하지 않습니다 ... 여전히 같은 오류가 발생합니다. – DenisHD

+0

라이브러리를 가져 왔습니까? – Lal

+0

예 .. lib admodsdk 6.4 및 Google Play를 가져 와서 경로를 빌드하기 위해 추가했습니다 .... 여전히 오류가 발생합니다. – DenisHD

0

당신이 당신의 프로젝트의 빌드 경로에 구글 광고 라이브러리 파일을 추가하는 것을 잊지 수도 것 같다 당신은 또한 당신의 AndroidManifest를에 AdActivity를 선언해야합니다.

enter image description here

+0

그랬지만 동일한 오류가 발생합니다. – DenisHD

관련 문제