2017-03-22 31 views
0

私のアンドロイドアプリにfirebase inviteを追加します。私は、チュートリアル(https://firebase.google.com/docs/invites/android)の手順に従ったが、私はこのエラーを持っているREQUEST_INVITEを解決できません

私はfirebaseコアを追加したと私はコンソルの動的リンクをクリックしたときに、すでに私のアプリに招待し、

シンボルREQUEST_INVITE解決できません、それを私は何も受け入れるように頼まなかった。

のGradle:

dependencies { 
compile fileTree(dir: 'libs', include: ['*.jar']) 
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { 
    exclude group: 'com.android.support', module: 'support-annotations' 
}) 
compile 'com.android.support:appcompat-v7:24.2.1' 
compile 'com.android.support.constraint:constraint-layout:1.0.2' 
compile 'com.android.support:design:24.2.1' 
compile 'com.google.firebase:firebase-ads:10.2.0' 
compile 'com.google.firebase:firebase-invites:10.2.0' 
compile 'com.google.firebase:firebase-core:10.2.0' 
testCompile 'junit:junit:4.12' 
} 
apply plugin :'com.google.gms.google-services' 

javaファイル:

//sent Invite 
private void onInviteClicked(){ 
    Intent intent = new AppInviteInvitation.IntentBuilder(getString(R.string.invitation_title)) 
      .setMessage(getString(R.string.invit_message)) 
      .setCallToActionText(getString(R.string.invit_cta)) 
      .build(); 
    startActivityForResult(intent, REQUEST_INVITE); 
} 

GoogleのサービスJSON:

"services": { 
    "analytics_service": { 
     "status": 1 
    }, 
    "appinvite_service": { 
     "status": 1, 
     "other_platform_oauth_client": [] 
    }, 
    "ads_service": { 
     "status": 2 
    } 
    } 

またはREQUEST_INVITEは、私たちが依存して設定する必要が変数ですんプレイストアのアプリのIDですか? もしそうなら、それを起動する前にそのIDを知ることは可能でしょうか?

答えて

2

REQUEST_INVITEは、単にあなたがそれを使用している活動で定義static final intあるあなたの助けをたくさんありがとうございます。例:

private static final int REQUEST_INVITE = 0; 

Quickstart Sampleのコードを参照してください。

関連する問題