草庐IT

reporting-services

全部标签

android - 为什么我们需要在 Firebase SDK 的底部应用 google-services 插件?

已编辑作为@doug-stevensontellsusinhisanswer,Firebase依赖项声明不必再位于build.gradle的底部。关于FirebaseSDKsetuppage,它说,applyplugin:'com.android.application'android{//...}dependencies{//...compile'com.google.firebase:firebase-core:9.0.2'}//ADDTHISATTHEBOTTOMapplyplugin:'com.google.gms.google-services'这是为什么呢?顺序重要吗?

Android:FCM java.io.IOException:某些设备上的 SERVICE_NOT_AVAILABLE 错误

我在我的项目中使用FCM它在Sonyxperia、GalaxyS6、Motorola等设备上正常运行。但是在GalaxyS3上我得到了java.io.IOException:SERVICE_NOT_AVAILABLE错误GalaxyS3的时间是自动的并且googleplay已更新互联网连接很强,我无需代理即可连接到开放互联网 最佳答案 当设备无法注册到Firebase时会导致此错误。调用此代码时,请确保互联网正常工作。并将代码放在try-catch中以阻止应用程序崩溃。编辑:在注册设备或获取token之前添加互联网连接检查。或者将F

android - 长时间运行 Android 'service'

我有一个Android应用程序,其中Activity触发在后台运行的长时间运行的操作。这些操作在完成时与Activity交互。我正在开发一个处理Activity/Long-Running-Task耦合的组件,负责销毁和重新创建Activity。现在该组件是作为Android服务实现的。Activity调用bindService并使用生成的IBinder来启动和跟踪任务。我决定不使用startService,因为我更喜欢通过Java接口(interface)获得更丰富的API。现在是问题。ActivityA启动,绑定(bind)到服务并调用serviceApi.runTask(...)。

android - logcat 错误中的 "Error reporting WTF"

很难说出这里要问什么。这个问题模棱两可、含糊不清、不完整、过于宽泛或夸夸其谈,无法以目前的形式得到合理的回答。如需帮助澄清此问题以便重新打开,visitthehelpcenter.关闭10年前。在运行android项目时,我收到错误消息“ErrorreportingWTF”logcat显示:LevelTagTextEAndroidRuntime"ErrorreportingWTF"这个错误是什么意思?

android - 如何在 MIUI 8+ 中获得读取 "Service SMS"的权限(以编程方式)

如何在MIUI8+中获取读取“服务短信”的权限(以编程方式)。 最佳答案 这将启动服务短信的Intent。一旦用户允许访问服务短信,您将能够阅读通知短信。if(isMIUI()){//thiswilllaunchtheautostartscreenwhereusercanenablethepermissionforyourappIntentlocalIntent=newIntent("miui.intent.action.APP_PERM_EDITOR");localIntent.setClassName("com.miui.sec

service - 如何从 Android 中的同步适配器服务访问已经运行的应用程序上下文?

我有一个包含多个Activity的应用程序,我使用应用程序上下文(从应用程序类开始,我让它持久化)在所有Activity之间共享数据和对象。我使用应用程序类而不是后台服务有几个很好的理由,我不会在这里讨论。我最近还在我的应用程序中添加了一个自定义联系人同步适配器。它在同一个包下,在同一个APK中。因此,我将其设置为访问应用程序上下文,就像我的应用程序中的其他所有内容一样,以授予它访问所有共享数据和对象的权限。但是,即使它(大部分)有效,它也会创建一个新的应用程序上下文实例。所以我的应用程序基本上有2个单独的实例在运行,并且它们之间不共享数据。我认为问题在于我的应用程序从未启动同步服务,

java - SecurityException : Not allowed to start service Intent { act=com. google.android.c2dm.intent.REGISTER pkg=com.google.android.gms(有附加功能)}

我尝试从Google获取我的GCMregistrationId。我的代码:StringSENDER_ID="722******53";/***RegisterstheapplicationwithGCMserversasynchronously.**StorestheregistrationIDandtheappversionCodeintheapplication's*sharedpreferences.*/privatevoidregisterInBackground(){newAsyncTask(){@OverrideprotectedStringdoInBackground(V

android - 添加 google-play-services 后,您需要在此 Activity 中使用 Theme.AppCompat 主题(或后代)

在我目前正在开发的应用程序中(这是我的第一个android应用程序),我使用android-maven-plugin和maven-android-sdk-deployer。在我添加google-play-servies库之前,应用程序一直运行良好(使用ActionBarActivity的MainActivity已正确显示)。之后我得到以下异常(除了向pom.xml添加所需的依赖项外,应用程序没有任何变化):E/AndroidRuntime(2146):java.lang.RuntimeException:UnabletostartactivityComponentInfo{com.my

android - 无法解析 Intent Service Android

我在尝试配置推送通知时遇到以下错误:06-0701:05:59.73518708-18708/com.ebr.apps.ebr.developmentE/FirebaseInstanceId:Failedtoresolvetargetintentservice,skippingclassnameenforcement06-0701:05:59.73518708-18708/com.ebr.apps.ebr.developmentE/FirebaseInstanceId:Errorwhiledeliveringthemessage:ServiceIntentnotfound.我在grad

android - 没有 google-services.json,Google 服务插件无法运行

这个问题在这里已经有了答案:Error"Filegoogle-services.jsonismissingfrommodulerootfolder.TheGoogleServicesPlugincannotfunctionwithoutit"[duplicate](23个回答)关闭2年前。Filegoogle-services.jsonismissing.TheGoogleServicesPlugincannotfunction我收到此错误代码是因为我从我的项目中删除了我的google-services.json文件。现在解决这个问题的明显方法是再次包含它,但我有理由将其删除。“Not