草庐IT

any_instance

全部标签

安卓 Espresso : ViewPager does not have adapter instance

我在我的Android(4.0+)应用fragment(在Activity中)中使用标签栏。我想创建Espresso测试,但如果我创建主Activity并打开fragment。我得到这个异常:java.lang.IllegalStateException:ViewPagerdoesnothaveadapterinstance.atcom.astuetz.PagerSlidingTabStrip.setViewPager(PagerSlidingTabStrip.java:177)atcz.villamemories.detoxme.staticcontent.StaticContent

android - 应用小部件 : instance don't be shown after config activity is finished on some devices

在主屏幕上添加新的appwidget实例时,我在某些设备上遇到了奇怪的行为。我有带有配置Activity的AppWidget应用程序。正如我必须自己做的appwidget教程更新中所说的。publicstaticvoidupdateWidgetAndSendIntent(Activityactivity,intmAppWidgetId,booleanisUpdate){updateWidgets(activity);if(!isUpdate){IntentresultIntent=newIntent();resultIntent.putExtra(AppWidgetManager.EX

android - react native -Redux : Multiple instances of same state in app

我是ReactNative的新手。我正在为我的reactnative应用程序使用redux架构,但是由于redux的全局存储状态,我遇到了问题。假设,例如,在应用程序中前进时,我正在如下导航。返回导航时,根据redux架构,它正在将导航堆栈中存在的每个页面实例的状态更改为商店中的最新状态。这里是上面例子的代码,Page.js[组件]classPageextendsComponent{componentWillMount(){}render(){var{image,apiCall}=this.props;return()}componentDidMount(){this.props.ap

android - java.lang.NoSuchFieldError : org. apache.http.message.BasicLineFormatter.INSTANCE 错误

美好的一天!我需要帮助!我通过集成IIS(SharePoint)为Android开发应用程序。当我运行此代码(代码2)时,出现错误java.lang.NoSuchFieldError:org.apache.http.message.BasicLineFormatter.INSTANCE我在firstActivity的onCreate(Code1)方法中运行这段代码版本httpclient-4.3;代码1newThread(newRunnable(){@Overridepublicvoidrun(){newHttpsClietn();}}).run();代码2packagecom.exa

git push错误->Error: src refspec master does not match any

参考:https://blog.csdn.net/weixin_40908748/article/details/128574907问题描述:在执行命令gitpushoriginmaster时报错->Error:srcrefspecmasterdoesnotmatchany问题分析:在网上查找解决方法,大部分人说是暂存区没有文件,未执行gitadd导致出错。但是此时已经执行了gitadd操作,暂存区非空,依然报错。那么需要检查远程主机名和分支名是否正确。问题原因:经过检查,发现是分支名有误。将分支名由master改为main即可。(详细)解决方法:1.列出当前所有本地分支名gitbranch-

android studio引入OpenCV报错Plugin [id: ‘com.android.application‘, ...]was not found in any of the ...

​​​​​​​​​​​​​https://blog.csdn.net/qq_41104439/article/details/132479459https://blog.csdn.net/qq_41104439/article/details/132479459    按照上面的教程引入opencv模块,但是build就报错Plugin[id:'com.android.application',version:'8.1.1',apply:false]wasnotfoundinanyofthefollowingsources    搜索无果后,发现项目目录下有两个settings.gradle 

android - 谷歌应用商店 : App does not require any additional special permissions

如果权限没有变化,PlayStore会自动更新应用程序。但是Skype要求我更新应用程序,当我点击更新按钮时,我发现了这个弹出窗口。因此,如果没有更改权限,那么为什么play-store会显示此对话框。实际上我开发了一个应用程序,在那个应用程序中我没有更改任何权限并得到相同的对话框,检查了他们与自动更新相关的文档但没有找到任何东西。 最佳答案 这也发生在我身上,并且需要一些调试才能弄清楚。如果您转到应用程序页面(在单击更新之前),然后滚动到最底部,则会有一个指向“权限详细信息”的链接。在我的例子中,它显示“在设备上使用帐户”,对应于

Cannot deserialize instance of `java.util.ArrayList` out of START_OBJECT token错误解决

Postman调试时报错:Cannotdeserializeinstanceof`java.util.ArrayList`outofSTART_OBJECTtoken。原因:需要的是集合,但是传入的参数外面包装了一个对象。publicMapaddAddress(@RequestBodyListrecords){​​​​​​​}解决方式:把对象用数组的格式进行传递。[{"id":"606863377499837444","createdBy":"601157755265372302","created":"2023-06-0214:59:14","lastUpdated":"2023-06-02

android - 在 genymotion/Any other good android emulator 中启用 MIC

我正在制作一个使用麦克风录制音频的应用。如何在genymotion模拟器中启用麦克风?或有没有其他好的androidappdev模拟器?需要帮助谢谢! 最佳答案 Genymotion实际上可以使用您计算机的麦克风。由于VirtualBox硬件支持,它有时无法工作,具体取决于您的计算机。这是关于这个话题的对话Genymotion'sGoogleGroup.您应该尝试在VirtualBox上使用声音配置:打开VirtualBox选择一个虚拟机并打开它的设置转到声音选项卡并更改音频Controller或音频导频请告诉我您的配置(操作系统、

android - Chrome ://inspect displaying device though not displaying any opened tabs

我正在尝试利用chrome远程调试androidweb应用程序。我无法从设备中获取任何打开的选项卡以显示在chrome://inspect列表下以进行远程调试。我做了以下事情:确保我的设备驱动程序安装正确。通过开发者菜单在我的设备上打开开发者模式和USB调试。通过从命令行发出“adbdevices”检查并确保我的设备列在adb列表中。我的设备通过(chrome://inspect)显示在设备列表下,似乎无法列出任何打开的选项卡任何帮助将不胜感激。谢谢设备:三星Galaxy平板电脑10.1安卓4.2.2 最佳答案 使用chrome:/