草庐IT

phone_matches

全部标签

android - 为什么要添加 READ_PHONE_STATE 权限?

在我刚刚发布到Play商店的最新测试版中,我注意到READ_PHONE_STATE自上一版本以来已添加。我自己没有添加这个。自从以前的版本使用v9.6.0的各种播放服务库(之前是v9.4.0)以来,我记得所做的一切:compile'com.google.android.gms:play-services-location:9.6.0'compile'com.google.android.gms:play-services-places:9.6.0'compile'com.google.android.gms:play-services-auth:9.6.0'这样就可以了吗?我看不到它的

Elasticsearch:Multi-match (multi_match) 及 Disjunction max 查询

多重匹配(multi_match)查询,顾名思义就是跨多个字段搜索查询。例如,如果我们想在title、synopsis和tags三个字段中搜索Java一词,那么multi_matchquery就是答案。另外,很多开发者还不是很清楚multi-match及disjunctionmaxquery的区别和联系。在今天的文章中,我将详述这两个查询。准备数据我们使用bulk指令来创建如下的books索引:POST_bulk{"index":{"_index":"books","_id":"1"}}{"title":"CoreJavaVolumeI–Fundamentals","author":"Ca

android - 检索项目 : No resource found that matches the given name 'android:Theme.Material.Light' 的父项时出错

我在styles.xml中收到此错误:Errorretrievingparentforitem:Noresourcefoundthatmatchesthegivenname'android:Theme.Material.Light'.在list中:AndroidSDK管理器:我更新了所有api21和附加功能。订购和导出:values-v21/styles.xml:@color/primary@color/primary_dark@color/accent@color/text_primary@color/text_secondary@color/primary_dark控制台:E:\w

android - Espresso 测试失败 : Wanted to match 1 intent, 实际上匹配了 2 个 Intent

我在使用Espresso测试Activity启动时遇到此错误。android.support.test.espresso.base.DefaultFailureHandler$AssertionFailedWithCauseError:想要匹配1个Intent。实际上匹配了2个Intent。令人惊讶的是,使用相同代码的其他Activity启动测试正在通过。@RunWith(AndroidJUnit4.class)publicclassHomeActivityTest{@RulepublicfinalIntentsTestRulemHomeActivityRule=newIntentsT

javascript - 火力地堡存储 : String does not match format 'base64' : Invalid character found

我正在开发一个react-native,我需要使用FirebaseStorage将图像上传到Firebase.我正在使用react-native-image-picker从手机中选择提供base64编码数据的图像。当我尝试将图像上传到Firebase时,出现错误FirebaseStorage:Stringdoesnotmatchformat'base64':Invalidcharacterfound但我已经检查过字符串是否是有效的base64带有正则表达式的字符串,它是!我已经从这里阅读了一些答案,但我尝试了所有这些。这是我的代码:functionuploadImage(image){

android - Windows Phone 7 相当于 Android 的 WebView

我开始使用PhoneGap,并看到它使用chromeless浏览器View和手机的url字符串来重用HTML/JS/CSS来构建跨平台应用程序。我知道在Android中,这是一个WebView,而iOS的等价物是UIWebView.当我开始寻找WindowsPhone7以及如何调出WebView的等效项时,我的Google技能让我失望了。什么相当于WindowsPhone7中的AndroidWebView? 最佳答案 WebBrowser是等价的。 关于android-WindowsPh

android - match_parent 不适用于 CoordinatorLayout

我使用Android设计支持库(com.android.support:appcompat-v7:22.2.0),并且我有一个LinearLayout在CoordinatorLayout像这样:在代码中我改变了背景颜色,我希望BG应该填满显示器(因为我在layout_width和layout_height中使用了match_parent)但是我得到了这样的BG颜色:看起来它显示了wrap_content不止使用match_parent.我尝试使用layout_weight在LinearLayout和layout_centerInParent中它也不起作用。我做错了什么?还是API错误?

android - java.lang.SecurityException : Requires READ_PHONE_STATE: Neither user 10210 nor current process. 。仅限 HTC 手机

HTC手机中的错误仅适用于三星、lg等。java.lang.SecurityException:RequiresREAD_PHONE_STATE:Neitheruser10210norcurrentprocesshasandroid.permission.READ_PHONE_STATElist文件中给出的权限下面是我的代码finalTelephonyManagertm=(TelephonyManager)con.getSystemService(Context.TELEPHONY_SERVICE);StringdeviceId=tm.getDeviceId();此代码已经在数百部三星

android - READ_PRIVILEGED_PHONE_STATE 权限错误

我创建了一个应用程序来监控电话(来电和去电),并且在电话响铃期间,它会显示有关号码的详细信息。来电一切正常,但当用户拨出电话时应用程序崩溃并出现此错误:05-1423:14:36.3761427-1475/?W/BroadcastQueue:PermissionDenial:receivingIntent{act=android.intent.action.PHONE_STATEflg=0x10(hasextras)}toir.apptune.antispam/.CallReceiverrequiresandroid.permission.READ_PRIVILEGED_PHONE_S

android - 错误 : Android-XML:Placing a <WebView> in a parent element that uses a wrap_content size can lead to subtle bugs; use match_parent

我是Android初学者,正在构建一个线性布局,但在这样的布局XML文件中出现错误,错误Placingainaparentelementthatusesawrap_contentsizecanleadtosubtlebugs;usematch_parent这部分代码显示错误这是我的XML文件的完整代码谁能告诉我我的代码有什么问题以及如何消除错误?我认为这可能是一个非常基本的问题,但我尝试过但无法弄清楚。详细信息:API级别:API19:Android4.2.2 最佳答案 与大多数答案暗示的相反,这不是Eclipse中的错误。Andr