草庐IT

check-leaked-classloader

全部标签

android - Simple List Item Checked 在点击时检查多个项目

好吧,我正在制作一个简单的待办事项列表应用程序,它从一组字符串数组中读取项目,并将它们显示在ListView中作为simple_list_item_checked。一切正常,我已经设置了onClickListener,所以它会检查我正在点击的内容,但是,当我点击一个项目时,它还会检查项目8项,重复。(即我点击最上面的项目,它得到一个检查,第8个项目被检查,然后8个被检查,等等)这是主要Activity的代码:packagecom.disneyland;importandroid.app.ListActivity;importandroid.os.Bundle;importandroid

javascript - react native : Is there any way to check if the file exists in android_asset folder or not?

我需要像这样检查文件夹中的文件是否存在:file:///android_asset/contents/my.html我试过使用react-native-filesystem插件componentWillMount(){asyncfunctioncheckIfFileExists(){constfileExists=awaitFileSystem.fileExists('file:///android_asset/contents/my.html')console.log(`fileexists:${fileExists}`)}}我确信my.html文件在那里,但我在fileExists

android - 如何在 android 中使用 Google Place Check-Ins

我使用GooglePlacesAPI检索特定位置及其周围的地点。通过解析xml文件,我得到了所需的位置及其详细信息。我需要签到一个特定的地方。我不知道如何通过HttpPOST方法请求。这是我必须提出的要求。place_reference——我从place请求中得到的引用。api_key--我的apikey。POSThttps://maps.googleapis.com/maps/api/place/check-in/xml?sensor=true_or_false&key=api_keyHTTP/1.1Host:maps.googleapis.complace_reference我使用

java - "Activity has leaked window... that was originally added."视频加载失败导致

我正在编写一个Android应用程序,它有一个介绍视频,该视频是一个首先播放的mp4文件。用户可以触摸屏幕跳过它。当我尝试在Android模拟器上运行我的应用程序时,我收到“Activity已泄漏窗口..最初添加的”异常。在stackoverflow上有一篇关于它的大文章说如果我的东西在完成后试图启动一个对话框。也许在我的情况下,播放器试图启动一个对话框,提示播放器不支持我的视频格式。好的..所以我只想跳过视频。而不会抛出错误和异常。这是我的介绍Activity:packagecom.tuxin.findasmile;importandroid.media.MediaPlayer;im

android - git - 使用 Gradle 构建将远程 git 代码 check out 到 Android Studio 导入的项目中

我有一些代码已导入到AndroidStudio中。它现在有一个Gradle构建(以前没有)。我现在需要执行gitpull。但是,鉴于目录结构略有变化,我不确定如何继续进行。app/src/main下的AndroidStudio目录结构与原来的类似,例如:安卓工作室[main]$lsAndroidManifest.xmlassetsjavares[main]$lsjava/LICENSE.txtREADME.mdcom原创$lsAndroidManifest.xmlREADME.mdresLICENSE.txtassetssrc$lssrc/com在com下它非常相似,除了反向域路径略有

android - 安装 Android Studio 3.1 后,我得到 "AAPT2 error: check logs for details"

我尝试关闭AAPT2,但没有用。以下是日志。Build:buildfailed5s44msRunbuild4s889msLoadbuild47msRuninitscripts43msEvaluatesettings2msConfigurebuild776msCalculatetaskgraph2s211msRuntasks1s839msnull/Users/dt/AndroidStudioProjects/HappyBirthdayapp/src/main/res/layout/activity_main.xmlerror:resourcedimen/activity_vertical

android - 为什么 ACTION_CHECK_TTS_DATA Intent "awkward to use"?

officialAndroid中文本转语音的介绍说,“在创建Activity时,第一步是检查是否存在具有相应Intent的TTS资源:”IntentcheckIntent=newIntent();checkIntent.setAction(TextToSpeech.Engine.ACTION_CHECK_TTS_DATA);startActivityForResult(checkIntent,MY_DATA_CHECK_CODE);但是@gregm在thisthread否则建议:Also,don'tusetheACTION_CHECK_TTS_DATAIntent,that'sawkw

android - ionic 2 : How to check current page is root page in Ionic 2?

我只想检查Ionic2中的当前页面名称,因为我在app.component.ts中使用了NavController,但这给出了一个错误,即NoproviderforNavController。请建议我一些解决方案,在此先感谢。下面是我的代码:constructor(platform:Platform,publicalertCtrl:AlertController,publicnavControll:NavController){this.platform=platform;//this.nav=nav;platform.ready().then(()=>{if(navControll.

android - 在 ListView : Activity has leaked ServiceConnection <youtube. player.internal> 原来绑定(bind)在这里

更新:我刚刚在另一台设备上测试了我的应用程序,发现我在运行Android4.4.2的Nexus4上确实遇到了错误,但在运行Android4.0.4的DesireS上没有。他们都安装了当前的YouTube应用程序(5.3.32),这是使用API所必需的。问题:为什么我会收到这些ServiceConnectionLeaked消息?(请参阅下面的Logcat)描述:我正在使用YouTubeAndroidPlayerAPI1.0.0(https://developers.google.com/youtube/android/player/)通过以下适配器代码在ListView中加载视频缩略图:

安卓 Espresso : How to check that Toast message is NOT shown?

我现在正在进行我的功能测试,在其中一个测试中,我必须测试未显示toast消息。考虑到这是我用来检查是否显示toast消息的代码(此代码有效):onView(withText(R.string.my_toast_message)).inRoot(withDecorView(not(getActivity().getWindow().getDecorView()))).check(matches(isDisplayed()));您可以在下面找到我用来检查是否未显示toast消息的代码(它们都不起作用):方法一:onView(withText(R.string.error_invalid_l