我正在构建一个简单的天气应用程序,我正在使用最后一个谷歌播放服务API来获取该位置.通过调用以下内容:
LocationServices.FusedLocationApi.requestLocationUpdates(mGoogleApiClient, mLocationRequest, this);
Run Code Online (Sandbox Code Playgroud)
我们能够获得位置更新并感谢听众:
@Override
public void onLocationChanged(Location location)
{
    // update the location    
}
Run Code Online (Sandbox Code Playgroud)
我们可以成功更新位置.我的问题是我有一个天气应用程序,我应该停止位置更新取消注册监听器:
LocationServices.FusedLocationApi.removeLocationUpdates(mGoogleApiClient, this);
Run Code Online (Sandbox Code Playgroud)
我没有任何按钮.一种可能的解决方案是设置更高的可能间隔或者您对此有何看法?
关于SO的许多其他问题,我遇到类似的错误消息.与其他问题不同,这与硬件调试设备有关.
我的gradle wear-build文件如下所示:
dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.google.android.support:wearable:1.2.0'
    compile 'com.google.android.gms:play-services-wearable:8.3.0'
    compile 'com.android.support:appcompat-v7:23.1.0'
}
Run Code Online (Sandbox Code Playgroud)
在模拟器中调试应用程序工作正常,但是一旦我发布应用程序并将其安装在我的可穿戴设备上,移动设备和磨损之间的连接将无法正常工作.通过蓝牙调试磨损(除了快速之外的其他任何东西),显示了这一小部分调试信息:
W/GooglePlayServicesUtil: Google Play services out of date.  Requires 8298000 but found 8107534
我认为gradle依赖项会将可穿戴服务打包到已发送的apk(因为有'compile'),这不是正确的吗?
如何使硬件手表工作?
我正在使用视觉API进行人脸检测,现在我想实现眨眼,但是当一只眼睛熄灭时,仍然可以通过视觉api检测眼睛.
请帮我看看如何实现眨眼功能.
我更新谷歌谷歌游戏服务,如下所述:unity插件,但我有以下错误:
Google.JarResolver.ResolutionException:找不到com.google.android.gms的候选工件:play-services-games:8.4+在Google.JarResolver.PlayServicesSupport.DependOn(System.String group,System.String artifact,System.String version) )[0x00000] in:0中的GooglePlayGames.Editor.GPGSDependencies..cctor()[0x00024] /Users/gabriele/Documents/number777pro/number/Number777/Assets/GooglePlayGames/Editor/GPGSDependencies.cs:46 UnityEditor.EditorAssemblies: SetLoadedEditorAssemblies(大会[])
我试图找到一个解决方案,但没有成功,任何人都知道如何解决?
我正在尝试使用Google Play服务进行定位.因此,我想将谷歌播放服务添加到我的应用程序.在build.gradle依赖项中,我添加了以下行.
    compile 'com.google.android.gms:play-services:9.0.1'
Run Code Online (Sandbox Code Playgroud)
但是它会出现以下错误
 Error:(25, 13) Failed to resolve: com.google.android.gms:play-services:9.0.1
Run Code Online (Sandbox Code Playgroud)
我无法找到安装了哪个版本的Google Play服务.在SDK工具选项卡中,它表示版本30.
我也尝试过跟随线,但它也给出了同样的错误
 compile 'com.google.android.gms:play-services:30'
Run Code Online (Sandbox Code Playgroud)
编辑:这是整个build.gradle文件.
apply plugin: 'com.android.application'
android {
    compileSdkVersion 23
    buildToolsVersion "23.0.3"
    defaultConfig {
        applicationId "ozu.cs394.umurali.whereismycar"
        minSdkVersion 15
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}
dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:23.1.1'
    compile 'com.google.android.gms:play-services:9.0.1'
}
Run Code Online (Sandbox Code Playgroud) 我正在尝试实施谷歌播放服务库,在我看来,我做的一切都是正确的.
这是我的堆栈跟踪:
06-14 13:17:51.804: E/AndroidRuntime(22809): java.lang.IllegalStateException: The meta-data tag in your app's AndroidManifest.xml does not have the right value.  Expected 8298000 but found 0.  You must have the following declaration within the <application> element:     <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
06-14 13:17:51.804: E/AndroidRuntime(22809):    at com.google.android.gms.common.GooglePlayServicesUtil.zzak(Unknown Source)
06-14 13:17:51.804: E/AndroidRuntime(22809):    at com.google.android.gms.common.GooglePlayServicesUtil.isGooglePlayServicesAvailable(Unknown Source)
06-14 13:17:51.804: E/AndroidRuntime(22809):    at com.google.android.gms.maps.internal.zzy.zzaQ(Unknown Source)
Run Code Online (Sandbox Code Playgroud)
这是我的清单:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    android:versionCode="1"
    android:versionName="1alpha"
    package="ru.vezdeok.driverapp">
   <uses-sdk
        android:minSdkVersion="11"
        android:targetSdkVersion="23" />
    <uses-permission android:name="android.permission.NFC" />
    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.RECORD_AUDIO"/>
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
    <uses-permission …Run Code Online (Sandbox Code Playgroud) 在我的应用程序中,我正在尝试使用gcm服务,但我甚至无法编译gradle.我不断收到消息,我错过了"firebase core",虽然我不知道如何安装它.
这是我的顶级gradle文件:
buildscript {
repositories {
    jcenter()
}
dependencies {
    classpath 'com.android.tools.build:gradle:2.1.2'
    classpath "io.realm:realm-gradle-plugin:1.1.0"
    classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
    classpath 'com.google.gms:google-services:3.0.0'
  }
}
allprojects {
repositories {
    jcenter()
    maven {
        url "https://jitpack.io"
    }
    maven {
        url "https://mint.splunk.com/gradle/"
    }
}
}
Run Code Online (Sandbox Code Playgroud)
这是我的模块级gradle文件:
apply plugin: 'com.android.application'
apply plugin: 'realm-android'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 24
buildToolsVersion "24.0.0"
defaultConfig {
    applicationId "roof.android"
    minSdkVersion 17
    targetSdkVersion 23
    versionCode 11
    versionName "0.0.4"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
packagingOptions { …Run Code Online (Sandbox Code Playgroud) android firebase google-cloud-messaging google-play-services android-gradle-plugin
我正在尝试将Google Play服务库添加到Eclipse中的Android项目中.我需要一个> 9.0.0的版本.
我正在使用Unity3D中的游戏并且集成服务具有Google Play游戏,但是当导入插件GoogleMobileAds时,它会引发我的错误.
我用:
这两个插件单独运行良好,但是当我导入两个插件时,我得到以下两个错误:
Assets/PlayServicesResolver/Editor/PlayServicesResolver.cs(146,56):错误CS0433:导入的类型`Google.JarResolver.Dependency'被多次定义
和
Assets/GooglePlayGames/Editor/GPGSDependencies.cs(37,23):错误CS0433:导入的类型`Google.JarResolver.PlayServicesSupport'被多次定义
我该如何解决?
android unity-game-engine admob google-play-services google-play-games
android ×8
firebase ×2
admob ×1
bluetooth ×1
build.gradle ×1
geolocation ×1
listener ×1
wear-os ×1