2016-10-10 17 views
0

を示されていないこれは私のプロジェクトでは、これは私のアプリはAdMob広告は、実際のデバイスで

apply plugin: 'com.android.application' 

android { 
compileSdkVersion 24 
buildToolsVersion "24.0.2" 

defaultConfig { 
    applicationId "com.example.personal.numbermania" 
    minSdkVersion 10 
    targetSdkVersion 24 
    versionCode 1 
    versionName "1.0" 
} 
buildTypes { 
    debug 
      { 
       debuggable true 
      } 
    release { 
     minifyEnabled false 
     proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
    } 
} 


dependencies { 
    compile fileTree(include: ['*.jar'], dir: 'libs') 
    testCompile 'junit:junit:4.12' 
    compile 'com.android.support:appcompat-v7:24.2.1' 
    compile 'com.android.support:design:24.2.1' 
    compile 'com.google.firebase:firebase-ads:9.6.0' 
    compile 'com.google.firebase:firebase-core:9.6.1' 

} 
apply plugin: 'com.google.gms.google-services' 

}

テスト広告がでアップshowimgされているグレードのコードをビルドです

// Top-level build file where you can add configuration options common to all sub-projects/modules. 

buildscript { 
    repositories { 
     jcenter() 
    } 
    dependencies { 
     classpath 'com.android.tools.build:gradle:2.1.3' 
     classpath 'com.google.gms:google-services:1.3.0-beta1' 


     // NOTE: Do not place your application dependencies here; they belong 
     // in the individual module build.gradle files 
    } 
} 

allprojects { 
    repositories { 
     jcenter() 
    } 
} 

task clean(type: Delete) { 
    delete rootProject.buildDir 
} 

グレードコードをビルドですエミュレータで実際のデバイスに広告はありません。

私は以下のリンクにアクセスして広告を表示します https://firebase.google.com/docs/admob/android/quick-start

私はあなたが広告暴徒にプロジェクトで作成した特定のカテゴリの設定firebase https://firebase.google.com/docs/android/setup

+0

あなたが実際のデバイスでそれを実行するホエイホールドログを親切に共有します。 –

+0

メソッドを実行するとデバイスが表示されません。デバイスにapkファイルを手動でインストールしています –

答えて

0

利用の広告ユニットIDにリンクの下に続きます。

あなたのプロジェクトでバナー広告ユニットを作成しました。リスト内のバナーの広告ユニットIDがその広告ユニットIDを使用します(バナー広告の作成中に指定したタイトルの下に広告ユニットIDが表示されます)。

詳細については、https://support.google.com/admob/answer/3052638を参照してください。私が説明しようとしているものが得られます。

関連する問題