草庐IT

Entrezgene-Set

全部标签

android - 非根设备 (Android L) 上的设备所有者,没有 NFC,使用 adb shell,dpm set-device-owner

这里的最终目的是在“kioskmod”中安装一个设备。Theysay你不需要NFC也不需要生根来实现应用程序成为deviceowner.我还没有看到此方法的完整示例,但让我们试试:adbshelldpmset-device-owner/.应该做...所以我这样做,并得到:java.lang.SecurityException:Neitheruser2000norcurrentprocesshasandroid.permission.BIND_DEVICE_ADMIN.因此,以下代码返回false。((DevicePolicyManager)getSystemService(Contex

安卓 : PSS (Proportional Set Size) Calculation

我想弄清楚Android的PSS是如何计算的。我找到一个article说明如下。The"proportionalsetsize"(PSS)ofaprocessisthecountofpagesithasinmemory,whereeachpageisdividedbythenumberofprocessessharingit.Soifaprocesshas1000pagesalltoitself,and1000sharedwithoneotherprocess,itsPSSwillbe1500我的第一个问题是,以上信息准确吗?如果不是,有人能告诉我它是如何计算出来的吗?此外,这个值是千

android - 异常 : Callbacks must set parent bounds in populateNodeForVirtualViewId()

我的Android应用程序崩溃报告服务报告了很多实例:java.lang.RuntimeException:CallbacksmustsetparentboundsinpopulateNodeForVirtualViewId()ativ.a(SourceFile:56)atiw.a(SourceFile:716)athq.a(SourceFile:112)athw.createAccessibilityNodeInfo(SourceFile:42)atandroid.view.AccessibilityInteractionController$AccessibilityNodePre

安卓进度条 : how to set secondary color programmatically

我需要以编程方式设置辅助进度条颜色。我只看到方法ProgressBar.setProgressDrawable(drawable)用于设置主色,但没有设置副色的方法。我该怎么做? 最佳答案 ProgressBar.getProgressDrawable()返回一个LayerDrawable,其中:LayerDrawableprogressDrawable=(LayerDrawable)getProgressDrawable();DrawablebackgroundColor=progressDrawable.getDrawable(

android - 内部错误 : retry receiver class not set yet

我正在实现一个简单的gcm推送服务器通知到手机,但是当我从服务器推送时,通知不会显示在手机上。日志显示这个错误internalerror:retryreceiverclassnotsetyet谁能告诉我如何解决这个问题,或者给我一个修复这个错误的gcm库的链接。我在网上搜索,谷歌说这个错误在库版本中得到修复,但我在网上找不到。 最佳答案 此问题已由Android-GCM团队解决但尚未发布。检查未发布的更改(仅在源代码存储库中可用)here.源代码可用,您可以将其作为库添加到您的项目中。否则,解决此问题的简单方法是重新启动您的设备。

java - 升级 Android Studio NDK : CMAKE_C_COMPILER and CMAKE_CXX_COMPILER not set 后出错

更新AndroidStudioNDK后,由于与CMAKE相关的错误(我的应用程序使用一个c++文件),我无法构建我的应用程序。以下是错误行:Buildcommandfailed.ErrorwhileexecutingprocessC:\Users\AnimallTag\AppData\Local\Android\sdk\cmake\3.6.4111459\bin\cmake.exewitharguments{-HC:\Projetos\Git\at65\app-BC:\Projetos\Git\at65\app\.externalNativeBuild\cmake\debug\mips

android - java.lang.illegalstateexception : a factory has already been set on this layoutinflater 异常

我试图在我的Android应用程序中更改选项菜单的背景颜色。我正在使用ActionBarSherlock库。我试过这段代码来改变选项菜单的背景颜色https://stackoverflow.com/a/8475357/584095但我最终在行中遇到了一个异常“java.lang.illegalstateexception:afactoryhasalreadybeensetonthislayoutinflater”LayoutInflater.setFactory();我不知道这段代码有什么问题。谁能帮我解决这个问题? 最佳答案 有一

android - AppCompat v22 : Set default textcolor for TextView

我想在我的AppTheme中设置一个默认的文本颜色,它应该是黑色的(不是默认的MaterialDesign深灰色)。应通过在UI元素(例如TextView)上通过android:textAppearance属性设置自定义样式来覆盖textColor。这是我当前的设置:我在我的项目中使用AppCompat-Library:compile'com.android.support:appcompat-v7:22.2.0'我定义了以下主题:@color/primary@color/primary_dark@color/accent@color/black在AndroidManifest.xml

android - setRequestProperty 抛出 java.lang.IllegalStateException : Cannot set request property after connection is made

我收到java.lang.IllegalStateException:java.lang.IllegalStateException:CannotsetrequestpropertyafterconnectionismadeerrorwhensetRequestProperty方法被调用后url.openConnection();这是我正在尝试的:URLurl=newURL("https://49.205.102.182:7070/obsplatform/api/v1/mediadevices/545b801ce37e69cc");urlConnection=(HttpsURLConn

android - Smack "Must have a local (user) JID set"错误

无法理解为什么这个错误经常出现并且应用程序崩溃。低于错误:FatalException:java.lang.RuntimeException:UnabletostartactivityComponentInfo{com.studyboard/com.studyboard.ChatMessageActivity}:java.lang.IllegalArgumentException:Musthavealocal(user)JIDset.Eitheryoudidn'tconfigureoneoryouwherenotconnectedatleastonceatandroid.app.Act