草庐IT

background_task

全部标签

java - 错误 :Execution failed for task: ExecException: Process 'command ' C:\Program Files\Java\jdk1. 7.0_79\bin\java.exe'' 以非零退出值 2 完成

错误:任务“:app:preDexDebug”执行失败。com.android.ide.common.process.ProcessException:org.gradle.process.internal.ExecException:Process'command'C:\ProgramFiles\Java\jdk1.7.0_79\bin\java.exe''finishedwithnon-zeroexitvalue2dependencies{compilefileTree(dir:'libs',include:['*.jar'])compilefiles('poi-3.13-beta

android - 适用于安卓系统的 FCM : popup system notification when app is in background

是否可以在屏幕顶部显示firebase系统通知的弹出窗口(当应用程序处于后台时)?为此,我使用setPriority(Notification.PRIORITY_MAX)在前台显示来自onMessageReceived的通知。我同时使用了notification和data字段,所以我无法在前台接收到通知。我已经尝试将priority设置为high并使用仅通知推送-没有任何帮助。 最佳答案 当您的应用程序在后台且使用仅data负载时,只有在onMessageReceived中才可能处理消息。当在您的负载中同时使用notificatio

android - 错误 :Execution failed for task ':app:processDebugResources' when using font folder inside res

我已将SDK更新到AndroidO开发者预览版,并开始使用单个TextView进行简单演示。当我在res文件夹中包含font时,它开始显示Error:Executionfailedfortask':app:processDebugResources'.>com.android.ide.common.process.ProcessException:Failedtoexecuteaapt这是我的build.gradleandroid{compileSdkVersion25buildToolsVersion"25.0.2"defaultConfig{...minSdkVersion15ta

android - ionic / Cordova FCM : Execution failed for task ':processDebugGoogleServices'

自从我安装了这个NativeFCMPlugin在IonicProject中,我在执行ioniccordovaandroidbuild时总是遇到以下错误:Runwith--stacktraceoptiontogetthestacktrace.Runwith--infoor--debugoptiontogetmorelogoutput.:processDebugGoogleServicesFoundcom.google.android.gms:play-services-base:11.0.4,butversion9.0.0isneededforthegoogle-servicesplug

安卓工作室 3.1 : StackOverflowError when executing task transformClassesWithDexBuilderForDebug when using qoppapdf library

随着AndroidStudio3.1的更新,我们的应用程序构建开始在所有机器上随机中断。在我的机器上,构建在dexing过程中因StackOverflowError而中断。当在gradle.properties中禁用d8和desugaring时,构建通过。这个问题似乎与我们在产品应用程序中使用了几年没有问题的qoppapdf库有关。该问题在新的Android项目中重现,其中库jar包含在libs目录中并且multidex在gradle中使用。StackOverflow错误如下:org.gradle.api.tasks.TaskExecutionException:Executionfa

缺少 Android Intent 参数 FLAG_ACTIVITY_SINGLE_TASK?

我刚刚注意到参数FLAG_ACTIVITY_SINGLE_TASK在Android开发者文档中不再可用:我只是想这样做:removeCard.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TASK);启动Activity(移除卡片);我已经在Google的代码中看到过这样的参数,但Java编译器只是告诉我它不存在。我只能使用此参数启动主要Activity,但我必须配置list文件才能执行此操作:android:launchMode="singleTask"这不适用于应用启动时启动的主要Activity以外的Activity。有人知道为什么Intent这个参数

android - Toolbar with Gradient Background 设置标题背景透明

我定义了一个GradientDrawable:然后我将它设置在我的工具栏上:@color/textcolorsecundary@color/textcolorsecundary@color/textcolorsecundary@drawable/custom_background_blue这是工作!但是:标题就是这样。它得到相同的梯度。这看起来真的很难看,所以我必须改变它。如何将信息文本的背景设置为透明? 最佳答案 您还可以通过将工具栏的背景设置为您的可绘制对象来解决此问题。mToolbar().setDrawable(R.draw

android - 错误 :Execution failed for task ':app:compileDebugJavaWithJavac' . java.io.FileNotFoundException:

更新并重启androidstudio后,出现以下错误。Error:Executionfailedfortask':app:compileDebugJavaWithJavac'.java.io.FileNotFoundException:/.../Workspace/MyAppName/app/build/intermediates/exploded-aar/com.google.android.gms/play-services/8.3.0/jars/classes.jar(Nosuchfileordirectory)我已经尝试清理和重建我的项目,但每次我都遇到上述错误。编辑:我的gr

java - 安卓 : JSON Parser with async task (GET and POST methods)

只是想检查这个带有异步任务的JSONParser是否正确完成?当我将此代码放入我的Eclipse时,此(method.equals("POST")带有红色下划线。它声明无法解决“方法”。对此有任何建议或帮助吗?谢谢。publicclassJSONParser{staticInputStreamis=null;staticJSONObjectjObj=null;staticStringjson="";Stringurl=null;Listnvp=null;//constructorpublicJSONParser(){}//functiongetjsonfromurl//bymaking

java - 如何解决 Execution failed for task transformClassesWithDexForArmv7Debug on Cordova

当我尝试构建一个APK宽度的Cordova时,这向我显示了一个错误异常。要创建我的APK,我使用cordova构建android在安装Windows10之前,我使用相同的配置,但运行良好。我的脚步使用cordovacreateExamplecom.example.appExample创建项目使用cordovaplatformaddandroid添加平台支持使用cordovapluginaddXYZ添加插件支持使用cordovaprepareandroid准备cordova项目使用cordovabuildandroid构建cordovaAPK(我不使用--release'因为我需要调试A