попробуйте подключить мое приложение для Android к бэкэнду google [дубликат]

Чтобы указать очевидное, чаша представляет outerScopeVar.

Асинхронные функции будут выглядеть как ...

4
задан pimmen 7 September 2014 в 15:51
поделиться

2 ответа

Убедитесь, что в графе вашего приложения есть следующая зависимость:

dependencies {
compile project(path: ':mymodule', configuration: 'android-endpoints')
}

Надеюсь, что это сработает для вас.

0
ответ дан foolioJones 27 August 2018 в 22:27
поделиться

Был другой способ, помогший попробовать несколько вещей; добавьте эти зависимости для приложения.

// Play Services will validate the application prior to allowing OAuth2 access.
compile(group: 'com.google.android.gms', name: 'play-services', version: '3.2.+')

// The following lines implement maven imports as defined at:
// https://code.google.com/p/google-api-java-client/wiki/Setup

// Add the Google API client library.
compile(group: 'com.google.api-client', name: 'google-api-client', version: '1.17.0-rc') {
    // Exclude artifacts that the Android SDK/Runtime provides.
    exclude(group: 'xpp3', module: 'xpp3')
    exclude(group: 'org.apache.httpcomponents', module: 'httpclient')
    exclude(group: 'junit', module: 'junit')
    exclude(group: 'com.google.android', module: 'android')
}

// Add the Android extensions for the Google API client library.
// This will automatically include play services as long as you have download that library
// from the Android SDK manager.
// Add the Android extensions for the Google API client library.
compile(group: 'com.google.api-client', name: 'google-api-client-android',
        version: '1.17.0-rc')
        {
            // Exclude play services, since we're not using this yet.
            exclude(group: 'com.google.android.google-play-services', module: 'google-play-services')
        }

// END Google APIs


// The following client libraries make HTTP/JSON on Android easier.

// Android extensions for Google HTTP Client.
compile(group: 'com.google.http-client', name: 'google-http-client-android',
        version: '1.17.0-rc') {
    exclude(group: 'com.google.android', module: 'android')
}

// This is used by the Google HTTP client library.
compile(group: 'com.google.guava', name: 'guava', version: '14.0.+')

Наконечник был предоставлен Morad и изначально был о чем-то другом, но также решил эту проблему.

4
ответ дан Community 27 August 2018 в 22:27
поделиться
Другие вопросы по тегам:

Похожие вопросы: