相关疑难解决方法(0)

无法解决:com.google.android.gms:使用gradle在IntelliJ Idea中播放服务

我正在尝试在IntelliJ Idea中为我的libGDX项目添加Google Play服务.我已按照此处的设置指南进行操作:https://developers.google.com/android/guides/setup

这看起来非常简单.我刚刚在相应的部分中将这些行添加到我的build.gradle中,所以现在看起来像:

project(":android") {
    apply plugin: "android"
    apply plugin: 'com.android.application'

    configurations { natives }

    dependencies {
        compile project(":core")
        compile "com.badlogicgames.gdx:gdx-backend-android:$gdxVersion"
        natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi"
        natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi-v7a"
        natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-arm64-v8a"
        natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86"
        natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86_64"
        compile "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion"
        natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-armeabi"
        natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-armeabi-v7a"
        natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-x86"
        compile "com.badlogicgames.gdx:gdx-freetype:$gdxVersion"
        natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-armeabi"
        natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-armeabi-v7a"
        natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-arm64-v8a"
        natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-x86"
        natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-x86_64"
        compile 'com.google.android.gms:play-services:11.2.0'
    }
}
Run Code Online (Sandbox Code Playgroud)

然后我尝试在Idea中同步我的gradle项目,以获得"无法解决"错误.

好吧,设置指南还说"确保每次更新Google Play服务时都更新此版本号",但问题是找到该版本号几乎是不可能的:根据Android SDK我的Google Play Services SDK版本manager是"43",到目前为止,我无法将这样的"11.2.0"或任何典型的版本字符串与"43"版本号相关联.并非设置指南对此没有任何说明.

无论如何,我从与此相关的众多问题中尝试了很多事情但无济于事.具体来说,我必须指出我确实更新了我的Android SDK,我确信它是Idea正在使用的那个(我已经三次检查了这个......):

Android SDK Manager 项目结构

我正在使用API​​级别26,但无论如何其他定义确实使用Android SDK的相同目录.此外,我没有在这台笔记本电脑上安装任何其他Android SDK,所以毫无疑问,Idea只使用那个和那个.

任何想法都非常受欢迎.

提前致谢!

java android intellij-idea gradle libgdx

68
推荐指数
6
解决办法
11万
查看次数

无法解决实施'com.google.firebase:firebase-messaging:15.0.2'

我正在为一个版本集成Firebase消息:

'com.google.firebase:firebase-messaging:15.0.2' 
Run Code Online (Sandbox Code Playgroud)

我的类路径是: -

classpath 'com.google.gms:google-services:3.2.0'
Run Code Online (Sandbox Code Playgroud)

我有Faced跟随错误: -

无法解决:firebase-messaging打开文件

android firebase google-play-services android-studio firebase-cloud-messaging

0
推荐指数
1
解决办法
4718
查看次数