2016-10-01 8 views
1

이상한 문제가 있습니다. 위의 라인AdRequest가 해결되지 않고 RED로 표시되지만 앱이 정상적으로 작동합니다.

import com.google.android.gms.ads.AdRequest; 
import com.google.android.gms.ads.AdView; 

클래스 AdRequest 및 RED 표시 AdView와 IDE는 말한다 : Cannot resolve symbol!
을하지만 내 장치에 응용 프로그램을 실행할 때 모든 것을 확인을 실행합니다. 컴파일러 오류가없고 기기에 광고가 표시됩니다.
다음은 내 의존성입니다.

dependencies { 
compile fileTree(include: ['*.jar'], dir: 'libs') 
compile files('src/main/java/nineoldandroid.jar') 
compile files('android.jar') 
compile 'com.google.firebase:firebase-core:9.4.0' 
compile 'com.google.firebase:firebase-messaging:9.4.0' 
compile 'com.android.support:recyclerview-v7:24.2.0' 
compile 'com.android.support:support-v4:24.2.0' 
compile 'com.android.support:appcompat-v7:24.2.0' 
compile 'com.android.support:design:24.2.0' 
compile 'com.google.android.gms:play-services-gcm:9.4.0' 
compile 'com.android.support:multidex:1.0.1' 
compile 'com.google.android.gms:play-services-ads:9.4.0' 

compile files('httpclient-4.5.2.jar') 
compile files('httpcore-4.4.4.jar') 
compile 'com.google.android.gms:play-services-appindexing:9.4.0' 
} 
apply plugin: 'com.google.gms.google-services' 

및 XML 파일

<com.google.android.gms.ads.AdView 
    xmlns:ads="http://schemas.android.com/apk/res-auto" 
    android:id="@+id/adView" 
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    ads:adSize="BANNER" 
    ads:adUnitId="ca-app-pub-*******" 
    android:layout_above="@+id/adView2" 
    android:layout_alignParentLeft="true" 
    android:layout_alignParentStart="true" 
    android:paddingBottom="5dp" 
    android:background="#000000" /> 

답변

0

나는 오류를 발견 : 내가 사용하고 있습니다 :

compile 'com.google.android.gms:play-services-ads:9.4.0' 

을 그냥 교체와 :

compile 'com.google.firebase:firebase-ads:9.6.0'