0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

cocos2d-x/AndroidStudio에서 admob사용을 위한 Firebase 도입 1

Last updated at Posted at 2019-06-30

cocos2d-x 3.17.1
AndroidStudio 3.4.1

공식 가이드 페이지 -> Add Firebase to your C++ project

  • Firebase 프로젝트 추가 후 앱을 추가합니다.

디버그 서명 인증서 SHA-1은 구글 스토어에 앱 등록시 새로운 인증 방식에 동의 할 경우 필요할 수 있습니다.
firebaseaddapp_1.PNG

  • 구성파일(google-services.json) 다운로드 후 아래의 경로에 위치시킵니다.
    • 프로젝트/proj.android/app/

firebaseaddapp_2.PNG

  • build.gradle 수정

firebaseaddapp_3.PNG

adMob사용을 위해 아래의 소스를 추가합니다.

implementation 'com.google.firebase:firebase-core:16.0.9'
implementation 'com.google.firebase:firebase-ads:17.2.1' // 추가.
  • AndroidManifest.xml 수정

참고 페이지 -> Update your AndroidManifest

<manifest>
    <application>
        <!-- Sample AdMob App ID: ca-app-pub-3940256099942544~3347511713 -->
        <meta-data
            android:name="com.google.android.gms.ads.APPLICATION_ID"
            android:value="[ADMOB_APP_ID]"/>
    </application>
</manifest>
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?