草庐IT

EXECUTION_STATE

全部标签

android:state_pressed 不工作

我在res/drawable中有以下XML代码,我将按钮background设置为此drawable。但是,当我按下按钮时,它并没有改变color。感谢帮助 最佳答案 好吧,你需要记住android逐行读取并返回第一个正确的语句。因为您在state_Selected之前启用了false/true项目,所以它将始终选择enabled=false/true项目。只需将您的底部代码移动到“state_enabled”之前,如下所示: 关于android:state_pressed不工作,我们在

c# - 权限拒绝 : requires android. permission.READ_PHONE_STATE

我试图在我的Android应用程序中检测电话,但在接听电话时收到以下消息:08-2315:16:04.685VodafoneVFD600Warning850BroadcastQueuePermissionDenial:receivingIntent{act=android.intent.action.PHONE_STATEflg=0x10(hasextras)}tocom....LogCallsrequiresandroid.permission.READ_PHONE_STATEduetosenderandroid(uid1000)08-2315:16:04.549VodafoneVF

android - 出现错误 --> "Execution failed for task">NDK 未配置

我正在尝试在androidstudio上编译我的代码,但我被困在了这一点上。我没有任何东西可以使用ndk进行编译,但每次编译都会因此错误而失败。当我检查workspace.xml时,它包含用于compileDebugNdk和compileReleaseNdk的ExternalTask​​Pojo。我不需要它们,但无法找到删除它们的方法,因为它是一个自动生成的文件。请提出建议。编辑->build.gradle文件applyplugin:'android-library'android{compileSdkVersion19buildToolsVersion"19.0.3"defaultC

android - MediaPlayer 上的消息 "internal/external state mismatch corrected"是什么意思?

我使用MediaPlayer并经常以编程方式设置播放器的状态,例如:if(mp.isPlaying()){mp.pause();animationPausedMusic();}privatevoidanimationPausedMusic(){//Changingbuttonimagetoplaybuttonbtn_play.setBackgroundResource(R.drawable.play);...//morecode}但有时logcat会给我消息:“已纠正内部/外部状态不匹配”然后播放和暂停功能不再起作用。这条消息是什么意思?我该如何解决? 最佳

android - 错误 :Execution failed for task ':app:dexDebug' error in my project while I added new dependency

我没有在我的项目中添加任何库/jar(在libs中)只有这个依赖项。我的build.gradle文件。android{compileSdkVersion23buildToolsVersion"23.0.1"defaultConfig{applicationId"com.android.example23"minSdkVersion14targetSdkVersion23versionCode1versionName"1.0"}buildTypes{release{minifyEnabledfalseproguardFilesgetDefaultProguardFile('proguar

android - 媒体播放器错误 : start called in state 4

每次我开始播放时,我都会收到两个MediaPlayer错误。01-0312:04:35.738:D/PlayerActivity(10164):play01-0312:04:35.742:D/PlayerService(10164):setAudiotStreamType01-0312:04:35.742:D/PlayerService(10164):setDataSource01-0312:04:35.742:D/PlayerService(10164):prepareAsync01-0312:04:35.742:E/MediaPlayer(10164):startcalledins

安卓工作室 : build project error - Failed to complete Gradle execution

我是androidstudio的新手。我正在尝试在androidstudio中构建项目(makeproject),它向我展示了这个:FailedtocompleteGradleexecution.Cause:Unabletostartthedaemonprocess.Thisproblemmightbecausedbyincorrectconfigurationofthedaemon.Forexample,anunrecognizedjvmoptionisused.Pleaserefertotheuserguidechapteronthedaemonathttp://gradle.or

android - 错误 :Execution failed for task ':app:clean'

我需要你的帮助,当我尝试在不添加任何依赖项和类路径的情况下编译我的新应用程序时,我得到了这个异常android工作室版本21.1ubuntu15.432位任务应用清理错误执行失败。Unabletodeletedirectory:.../app/build/intermediates/exploded-aar/com.android.support/animated-vector-drawable/23.4.0/jars 最佳答案 以管理员身份运行androidstudio为我解决了这个问题。(window10)

安卓 : Save application state on screen orientation change

在发布这个问题之前我已经看到了以下链接http://www.devx.com/wireless/Article/40792/1954SavingAndroidActivitystateusingSaveInstanceStatehttp://www.gitshah.com/2011/03/how-to-handle-screen-orientation_28.htmlHowtosavestateduringorientationchangeinAndroidifthestateismadeofmyclasses?我不知道应该如何覆盖以下函数:@OverridepublicObjecto

机器人 : media player - pause called in state 8

我在我的应用程序中使用媒体播放器播放一些短音。虽然我在我的应用程序中没有发现任何问题/崩溃,但我可以看到以下一些错误消息。请帮助我解决这个问题。03-2322:53:16.229:E/MediaPlayer(19185):pausecalledinstate803-2322:53:16.229:E/MediaPlayer(19185):error(-38,0)03-2322:53:16.449:E/MediaPlayer(19185):Error(-38,0)03-2322:53:16.449:D/OpenGLRenderer(19185):Flushingcaches(mode0)0