草庐IT

my-application

全部标签

twitter - 为什么这个错误 ' - Read-only application cannot POST '

日志:12-0523:37:01.721:W/System.err(534):401:Authenticationcredentials(https://dev.twitter.com/docs/auth)weremissingorincorrect.Ensurethatyouhavesetvalidconumerkey/secret,accesstoken/secret,andthesystemclockininsync.12-0523:37:01.721:W/System.err(534):401:Authenticationcredentials(https://dev.twit

ubuntu终端美化之zsh/oh-my-zsh

先看效果:(如果你好奇这个和mobaxterm自带的终端极其相像那就对了,我就是按那个样子改的)1.安装1.1先安装zshshell:输入以下命令:sudoapt-getinstallzsh1.2安装oh-my-zsh:1.2.1情况1:你可以流畅的访问github你需要访问这个网址正常来说你会看到这个:你应该复制这个命令,直接输入到终端里,应该就可以安装oh-my-zsh1.2.2情况2:上述情况在你那里不存在Ps:也就是克隆不下来输入以下命令:gitclonehttps://github.com/robbyrussell/oh-my-zsh.git~/.oh-my-zsh#这一步是克隆项目

android - 无法启动快捷方式 : Application is not installed on your phone

我正在尝试为我的AndroidActivity之一创建桌面快捷方式。我使用的代码适用于我读过的每个tuto示例:finalIntentshortcutIntent=newIntent(Intent.ACTION_MAIN);ComponentNamename=newComponentName(getPackageName(),".MyActivity");shortcutIntent.setComponent(name);shortcutIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);shortcutIntent.addFlags(Inte

android-activity - Application 子类中的 startActivity

我有一个小的Android应用程序,我在其中直接指定我的应用程序并在ApplicationSubclass的onCreate中进行一些应用程序范围的设置,但是我收到以下错误(注意,我知道FLAG_ACTIVITY_NEW_TASK):Causedby:android.util.AndroidRuntimeException:CallingstartActivity()fromoutsideofanActivitycontextrequirestheFLAG_ACTIVITY_NEW_TASKflag.Isthisreallywhatyouwant?atandroid.app.Conte

Android:从未收到广播 ACTION_MY_PACKAGE_REPLACED

我的应用程序运行的服务在设备重启或应用程序重新安装(更新)时终止。我添加了两个广播接收器来捕获这些事件-BOOT_COMPLETED和ACTION_MY_PACKAGE_REPLACED。ACTION_MY_PACKAGE_REPLACED接收器似乎不起作用。这是我拥有的:AndroidManifest.xml:重启接收器:publicclassRebootReceiverextendsBroadcastReceiver{@OverridepublicvoidonReceive(Contextcontext,Intentintent){Logg.d("Rebootcompleted.R

android - 如何解决 "Warning: debug info can be unavailable. Please close other application using ADB: Restart ADB integration and try again"

我在尝试通过USB连接到外部设备调试Android应用程序时遇到了一个小问题。我不断收到错误消息“警告:调试信息可能不可用。请使用ADB关闭其他应用程序:Monitor、DDMS、Eclipse重新启动ADB集成并重试等待过程:"我试过在任务管理器中停止adb.exe,关闭androidstudio并重新启动,取出电缆并将其放回原处并转到工具=>android取消选中adb集成,然后重新检查它。一切都无济于事 最佳答案 这是ADB连接的问题,因为有时ADB会在您的真实/虚拟设备上缓存死连接,因此端口繁忙,您无法连接到它。最简单的解决

android - 应用程序崩溃 “android.app.Application cannot be cast to”

我发现了ORMlite。所以,我有这个DAO工厂类publicclassDtoFactoryextendsApplication{privateSharedPreferencespreferences;privateDatabaseHelperdatabaseHelper=null;privateDaoreleveDAO=null;@OverridepublicvoidonCreate(){super.onCreate();preferences=PreferenceManager.getDefaultSharedPreferences(this);databaseHelper=new

android - getDrawingCache while NoTitleBar style set for the application in Android

在我的list中,我指定(针对整个应用程序)样式:android:theme="@android:style/Theme.NoTitleBar"然后在我的应用程序中,我想使用绘图缓存创建应用程序的屏幕截图:ViewactivityView=getActivity().getWindow().getDecorView().findViewById(android.R.id.content);activityView.setDrawingCacheEnabled(true);BitmapcurrentScreen=Bitmap.createBitmap(activityView.getDr

android - 一小部分用户在 Application 类中出现 java.lang.VerifyError

(这不是其他类似问题的重复,因为这只发生在一小部分用户身上,我无法重现)在我最新的生产版本中,我突然看到java.lang.VerifyError类崩溃的巨大峰值来self的Application类中的一行。这行很简单:Settings.init(this);Settings是围绕SharedPreferences的便利包装类。似乎只有不到1%的用户找不到该类。我们无法在我团队的任何设备上重现崩溃,GooglePlay的预发布报告显示0个错误。这是完整的堆栈跟踪:java.lang.VerifyError:atcom.my_package.MyApplication.onCreate(

android - Android 上的蓝牙 : my Socket. connect() 永远阻塞,Socket.close 不会解除阻塞

我一直在为android开发一个蓝牙应用程序,我刚刚发现了这个问题。当我在我的蓝牙服务类中执行mySocket.connect();时,它偶尔会无限期地阻塞。我阅读了BluetoothSocket.close()的文档,它说了以下内容:Immediatelyclosethissocket,andreleaseallassociatedresources.CausesblockedcallsonthissocketinotherthreadstoimmediatelythrowanIOException.但是,这似乎对我不起作用。这是我设置计时器然后尝试连接的代码。//codeforst