草庐IT

ax_check_compile_flag

全部标签

android - 为什么我得到 "Configuration ' compile' is obsolete”

我已经阅读了有关此问题的SO线程并添加了classpath'com.google.gms:google-services:3.2.1'到build.gradle,但它没有帮助。这是完整的gradle:buildscript{repositories{maven{url'https://maven.fabric.io/public'}mavenCentral()jcenter()google()}dependencies{classpath'io.fabric.tools:gradle:1.26.1'classpath'com.android.tools.build:gradle:3.2

java - mac 上的 Android Studio : cant find System compiler

当我尝试编译“helloworld”时,我在我的一台mac上得到了这个Error:Executionfailedfortask':app:compileDebugJava'.CannotfindSystemJavaCompiler.EnsurethatyouhaveinstalledaJDK(notjustaJRE)andconfiguredyourJAVA_HOMEsystemvariabletopointtotheaccordingdirectory.在我的另一台Mac上,我没有任何问题。据我所知,设置是一样的。只是出于某种原因,在一台机器上,AndroidStudio/Gradl

android - FLAG_DISMISS_KEYGUARD 不再适用于 Android Lollipop?

正如标题所说,我惊讶地发现FLAG_DISMISS_KEYGUARD标志在API21(Lollipop)上不再起作用。在kitkat中,设置此标志会关闭不安全的键盘锁。那么这是功能还是错误?解决方法是什么?通过PowerManager类禁用keyguard是一个选项,但它不能像dismissal样式那样工作。可以吗? 最佳答案 首先:这是一个错误。其次,是否有解决方法?是的。因为我被这个问题绊倒了连谷歌都不知道这个问题,我对如何解决这个问题进行了大量研究。这很容易。该错误大概是键盘锁注册了两个次android实习生。诀窍是开始正手跑

Android - PendingIntent.FLAG_CANCEL_CURRENT - 它真的取消了 alarmManager 之前未决的 Intent 吗?

我有以下代码,它只运行一个警报管理器:publicvoidrunAlarm(){Intentintent=newIntent(context,MyReceiver.class);intent.setAction(ACTION_TIMEOUT);PendingIntentalarmIntent=PendingIntent.getBroadcast(context,0,intent,PendingIntent.FLAG_CANCEL_CURRENT);setTimeOutAlarm(TIMEOUT_MINUTES,alarmIntent);AlarmManageralarmMgr=(Ala

android - 读取 build/intermediates/data-binding-compiler/debug/dependent-lib-artifacts 目录的内容时出错

Error:Executionfailedfortask':syh_library:transformClassesAndResourcesWithPrepareIntermediateJarsForDebug'.failure,seelogsfordetails.Errorreadingcontentsof/Users/Rock/workspace/android_workspase/syh-android/Syh/syh_library/build/intermediates/data-binding-compiler/debug/dependent-lib-artifactsdi

android - Lint 错误 : Suspicious equality check: equals() is not implemented in Object DiffUtilEquals

AndroidStudio/Gradle3.4似乎引入了一个新的lint错误DiffUtilEquals.它由DiffUtil触发然后调用作为后备oldItem==newItem在areContentsTheSame功能。linter抛出的错误是Suspiciousequalitycheck:equals()isnotimplementedinObject示例代码:overridefunareContentsTheSame(oldItem:Any,newItem:Any):Boolean{returnwhen{oldItemisMyKotlinClass&&newItemisMyKot

Kotlin: Module was compiled with an incompatible version of Kotlin

背景:使用intellij-idea工具,springboot项目,使用的maven问题:项目中没有依赖Kotlin,结果报错Kotlin版本问题,如下Kotlin:ModulewascompiledwithanincompatibleversionofKotlin.Thebinaryversionofitsmetadatais1.7.1,expectedversionis1.1.15.解决方案:JustgototheBuildmenuandclickontherebuildproject.只需要去Build菜单点击重建项目即可 参考文章:intellijidea-Error:Kotlin:M

android - SYSTEM_UI_FLAG_LOW_PROFILE 无法解析或不是 google threadsample 的字段

我已经从https://developer.android.com/training/multiple-threads/index.html导入线程示例代码,但是导入后出现错误。他们是:SYSTEM_UI_FLAG_LOW_PROFILE无法解析或不是字段SYSTEM_UI_FLAG_HIDE_NAVIGATION无法解析或不是字段项目minSdkVersion=11和targetSdkVersion=17,我已经用它设置了support.v4。有没有人遇到同样的问题?如何解决?提前致谢。 最佳答案 那是个错误SYSTEM_UI_F

Android PendingIntent FLAG_NO_CREATE 不返回 null

我在使用PendingIntents时遇到了一些麻烦。每次打开我的应用程序时,它都会安排一些广播。我的问题是无法识别已经存在的PendingIntents。我知道必须使用相同的参数创建PendingIntents和底层Intents。她是我的代码...作为异步任务在我的启动器Activity中启动。longnextExecute=getNextExecute(t);if(nextExecute>System.currentTimeMillis()){inttt=12;intent=newIntent(context,BirthExecutor.class);intent.putExtr

java - FLAG_NOT_FOCUSABLE Activity

publicclassMainActivityextendsAppCompatActivity{@OverrideprotectedvoidonCreate(BundlesavedInstanceState){super.onCreate(savedInstanceState);setContentView(R.layout.activity_main);getWindow().addFlags(WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE);}}如果我按下按钮返回,应用程序会停顿10-15秒。在日志中写:D/ANRAppManager:!