我实施新的谷歌云消息之后从谷歌开发者页面的导游在这里
我已成功运行并测试它.但我现在的问题是我有不同的productFlavors具有不同的applicationId/packageName和不同的GCM项目ID.在google-services.json具有在被投入/app/google-services.json不是味道文件夹.
有没有办法让google-services.json配置与许多口味不同?
在我写这个问题之前,我已经搜索了相同的问题,他们确实导出了许可证,因为仍然使用alpha版本的约束布局.但是现在android已经发布了稳定版的约束布局.我尝试了很多设置,但仍然失败了..
我的最新消息 .travis.yml
language: android
jdk: oraclejdk8
android:
components:
- platform-tools
- tools # to get the new `repository-11.xml`
- tools # see https://github.com/travis-ci/travis-ci/issues/6040#issuecomment-219367943)
- build-tools-25.0.0
- android-25
# Additional components
- extra-google-google_play_services
- extra-google-m2repository
- extra-android-m2repository
licenses:
- 'android-sdk-preview-license-52d11cd2'
- 'android-sdk-license-.+'
- 'google-gdk-license-.+'
script:
- ./gradlew clean build
Run Code Online (Sandbox Code Playgroud)
这是我的 build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion '25.0.0'
defaultConfig {
applicationId "com.package.my"
minSdkVersion 16
targetSdkVersion 25
versionCode 6
versionName "1.3.1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled …Run Code Online (Sandbox Code Playgroud) android gradle android-sdk-tools travis-ci android-constraintlayout