Android SDK_安装SDK和配置环
修改build.gradle
buildscript { repositories { ... google() mavenCentral() maven { url "https://jitpack.io" } } dependencies { ... classpath 'com.google.gms:google-services:4.3.14' } } allprojects { repositories { ... google() mavenCentral() maven { url "https://jitpack.io" } } }android { defaultConfig { ... // GamePot [START] resValue "string", "gamepot_project_id", "[projectId]" // required resValue "string", "gamepot_store", "[storeId]" // required resValue "string", "gamepot_payment", "[storeId]" // optional resValue "string", "gamepot_app_title","@string/app_name" // required (fcm) resValue "string", "gamepot_push_default_channel","Default" // required (fcm) resValue "string", "facebook_app_id", "[Facebook ID]" // facebook resValue "string", "fb_login_protocol_scheme", "fb[Facebook ID]" // (facebook) resValue "string", "facebook_client_token", "[Facebook客户端Token]" // Facebook控制台 > APP > 高级设置 > 客户端Token // resValue "string", "gamepot_elsa_projectid", "" // (ncp elsa) resValue "string", "gamepot_region", "" // Caution! Only if the gamepot region is Singapore , value as sg resValue "string", "gamepot_license_url", "" // Caution! Only if the gamepot region is Japan , value as https://gamepot.apigw.ntruss.com/fw/jp-v1 // GamePot [END] } packagingOptions { exclude 'META-INF/proguard/androidx-annotations.pro' } } repositories { flatDir { dirs 'libs' } } dependencies { implementation 'androidx.appcompat:appcompat:1.2.0' implementation 'androidx.multidex:multidex:2.0.1' // GamePot common [START] implementation(name: 'gamepot-common', ext: 'aar') implementation('io.socket:socket.io-client:1.0.0') { exclude group: 'org.json', module: 'json' } implementation('com.github.ihsanbal:LoggingInterceptor:3.0.0') { exclude group: 'org.json', module: 'json' } implementation "com.github.nisrulz:easydeviceinfo:2.4.1" implementation 'com.android.installreferrer:installreferrer:1.0' implementation 'com.google.code.gson:gson:2.8.2' implementation 'com.jakewharton.timber:timber:4.7.0' implementation 'com.squareup.okhttp3:okhttp:4.9.1' implementation 'com.apollographql.apollo:apollo-runtime:2.5.14' implementation 'com.apollographql.apollo:apollo-android-support:2.5.14' implementation 'com.android.billingclient:billing:7.0.0' implementation 'com.google.firebase:firebase-crashlytics-buildtools:2.9.1' implementation 'com.github.bumptech.glide:glide:3.7.0' implementation 'androidx.sqlite:sqlite-framework:2.0.1' implementation 'com.google.firebase:firebase-core:18.0.1' implementation 'com.google.firebase:firebase-messaging:23.1.2' implementation 'com.google.firebase:firebase-iid:21.1.0' implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0" implementation 'pub.devrel:easypermissions:3.0.0' implementation(name: 'pageindicatorview-1.0.3', ext: 'aar') implementation(name: 'puree-4.1.6', ext: 'aar') implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0' // GamePot common [END] implementation(name: 'gamepot-channel-base', ext: 'aar') // GamePot facebook [START] implementation(name: 'gamepot-channel-facebook', ext: 'aar') implementation 'com.facebook.android:facebook-android-sdk:14.1.1' // GamePot facebook [END] // GamePot google sigin [START] implementation(name: 'gamepot-channel-google-signin', ext: 'aar') implementation "com.google.android.gms:play-services-auth:19.0.0" // GamePot google sigin [END] } // ADD THIS AT THE BOTTOM apply plugin: 'com.google.gms.google-services'
刷新失败时
设置AndroidManifest.xml
设置推送通知图标
初始化
Last updated