gpt4 book ai didi

android - google iosched 示例项目 : com. google.api.client.repackaged.com.google.common.base 不存在

转载 作者:塔克拉玛干 更新时间:2023-11-02 08:58:04 27 4
gpt4 key购买 nike

我已经下载google iosched存储库并遵循 build instructions但是当我跑的时候

./gradlew clean assembleDebug

我收到这个错误:

    Information:Gradle tasks [clean, :apk:generateMapEditorDebugSources, :apk:generateMapEditorDebugAndroidTestSources, :apk:mockableAndroidJar, :apk:prepareMapEditorDebugUnitTestDependencies, :lib:generateMapEditorDebugSources, :lib:generateMapEditorDebugAndroidTestSources, :lib:mockableAndroidJar, :lib:prepareMapEditorDebugUnitTestDependencies]
Warning:[options] bootstrap class path not set in conjunction with -source 1.7
/home/mhmd/android_work/iosched/server/src/main/java/com/google/samples/apps/iosched/server/gcm/FcmRegistrationEndpoint.java
Error:(21, 63) error: package com.google.api.client.repackaged.com.google.common.base does not exist
/home/mhmd/android_work/iosched/server/src/main/java/com/google/samples/apps/iosched/server/registration/RegistrationEndpoint.java
Warning:(41, 52) Bool is internal proprietary API and may be removed in a future release
Warning:(41, 52) Bool is internal proprietary API and may be removed in a future release
Error:Execution failed for task ':server:compileJava'.
> Compilation failed; see the compiler error output for details.
Information:BUILD FAILED
Information:Total time: 7.497 secs
Information:2 errors
Information:3 warnings
Information:See complete output in console

错误行:Error:(21, 63) 错误:包 com.google.api.client.repackaged.com.google.common.base 不存在

注意:我还没有对项目进行任何更改。我只是按照这些说明操作。

最佳答案

忘记他们 github 页面上的构建说明吧。当你导入代码时,不要在 android studio 给你弹出窗口时升级 gradle 版本。本项目的gradle版本为2.3.1。保持这种方式。不要升级到 3 或 4。

server 模块的 build.gradle 文件中进行以下更改:

添加这个依赖:

compile group: 'com.google.api.client', name: 'google-api-client-repackaged-com-google-common-base', version: '1.2.3-alpha'

将此依赖项更新到版本 1.23.0:

compile 'com.google.api-client:google-api-client-appengine:1.23.0'

add googleClientVersion in endpoints:

appengine {
// ...
endpoints {
googleClientVersion = '1.23.0'
// ...
}
}

不再对 build.gradle 文件进行更改。现在替换下面的导入

import com.google.api.client.repackaged.com.google.common.base.Strings;

import com.google.appengine.repackaged.com.google.common.base.Strings;

server 模块的文件 com.google.samples.apps.iosched.server.gcm.FcmRegistrationEndpoint.java 中。

从您的 Google Developer 项目更新 api_keys。

现在构建并运行!

编辑

相关github问题:

#246

#241

关于android - google iosched 示例项目 : com. google.api.client.repackaged.com.google.common.base 不存在,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47855552/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com