草庐IT

pre-receive

全部标签

android - 调用 onDestroy 函数时 Receiver not registered 错误

当我创建扩展BrodcastReceiver的类并注册它时。错误Unabletodestroyactivity,Receivernotregistered:nullonDestroy()函数在MainActivity时调用unregisterReceiver。onCreate():ConnectionChangeReceiverconnectionChangeReceiver=newConnectionChangeReceiver();IntentFilterfilter=newIntentFilter(ConnectivityManager.CONNECTIVITY_ACTION);

VSCode/SourceTree等GUI界面操作Git时,使用nvm,husky pre-commit中npm等命令command not found的解决方案

#!/usr/bin/envsh."$(dirname--"$0")/_/husky.sh"npmrunlint报错npmcommandnotfoundinPATH:...因为GUI环境中启动husky,没有npm、nvm、node的PATH环境变量,需要跟配置bash、zsh等终端一样进行环境的配置创建~/.huskyrc#~/.huskyrcexportNVM_DIR="$HOME/.nvm"#如果终端是bash[-s"$NVM_DIR/nvm.sh"]&&\."$NVM_DIR/nvm.sh"[-s"$NVM_DIR/bash_completion"]&&\."$NVM_DIR/bash

【Git】解决fatal: unable to access..Failure when receiving data from the peer或者OpenSSL SSL_read: Connect

今天拉取仓库的代码时,报错如下:fatal:unabletoaccess'https://github.com/Itfuture-zifeiYu/ZifeiChat.git/':Failurewhenreceivingdatafromthepeer又或者OpenSSLSSL_read:Connectionwasreset,errno10054再或者:Failedtoconnecttogithub.comport443:Timedout解决办法:因为git在拉取或者提交项目时,中间会有git的http和https代理,但是我们本地环境本身就有SSL协议了,所以取消git的https代理即可,不行

android - Pre-Lollipop 设备上 ImageButton 的提升效果

我正在尝试为ImageButton应用提升效果。它在我运行Android5.0的Nexus平板电脑上运行良好,但提升不适用于Pre-Lollipop设备。尝试了ViewCompat.setElevation(view,evaluationValue)但没有任何改变。我看到一些应用程序,如Swarm或Gmail应用程序,在Pre-Lollipop设备上为其FAB(float操作按钮)使用了提升效果。您知道他们如何使用高程吗? 最佳答案 您不能使用elevationpre5.0,您需要提供带有“阴影”的图像以使其看起来像它的提升

android - 使用 Appcompat 在 pre-Lollipop 上错误的 Button textColor 和 drawablePadding

我在Lollipop之前的设备上有错误的按钮样式。使用appcompat库编译。compile'com.android.support:appcompat-v7:23.0.1'值/styles.xml@android:color/holo_orange_light@android:color/holo_orange_dark@android:color/holo_green_light@android:color/holo_purple@android:color/holo_red_light@android:color/holo_green_light@style/ButtonThe

android - java.lang.NoSuchMethodError : No static method dispatch Unhandled KeyEvent Pre 错误

当迁移到androidx时,我在返回时遇到上述错误。java.lang.NoSuchMethodError:NostaticmethoddispatchUnhandledKeyEventPre(Landroid/view/View;Landroid/view/KeyEvent;)ZinclassLandroidx/core/view/ViewCompat;oritssuperclasses(declarationof'androidx.core.view.ViewCompat'appearsin1/split_lib_dependencies_apk.apk)atandroidx.ap

android - ant 找不到 Android 项目的 pre_setup.xml

我已经开始玩Android编程,几周前我完成了一个基本的项目设置,并遵循了杂志上的教程。我知道我设法让基本的ant编译工作,但现在我回到它,它失败了,并显示了一条有点奇怪的消息:$antdebugBuildfile:/home/taft/android_code/countdown/build.xmlBUILDFAILED/home/taft/android_code/countdown/build.xml:37:Cannotfind/home/pete/android-sdk-linux_x86/tools/ant/pre_setup.xmlimportedfrom/home/taf

android - 我们可以在 Lollipop 设备中显示旧式时间选择器(Pre Lollipop Time Picker)吗

我想在Lollipop设备中显示较旧的时间选择器(如Lollipop设备之前的时间选择器)。可以这是可能的。 最佳答案 您可以通过将timePickerMode属性设置为“spinner”来指定微调器样式的时间选择器。Material的默认值为“时钟”。 关于android-我们可以在Lollipop设备中显示旧式时间选择器(PreLollipopTimePicker)吗,我们在StackOverflow上找到一个类似的问题: https://stackove

android - java.lang.RuntimeException : Unable to instantiate receiver (Didn't find class) 错误

我们正在使用第3方库进行广告中介,在其list中声明不同的Activity、接收器和服务。并非所有这些都会在应用程序中实际实现。我已经开始从我们应用程序的用户那里看到类似这样的异常(exception)情况:java.lang.RuntimeException:Unabletoinstantiatereceivercom.inmobi.commons.core.utilities.uid.ImIdShareBroadCastReceiver:java.lang.ClassNotFoundException:Didn'tfindclass"com.inmobi.commons.core.

android - 在 Angular 环境中运行 npm run start.android 后出现“TypeError : Path must be a string. Received undefined”

因此在使用https://github.com/NathanWalker/angular-seed-advanced时使用npmrunstart.android在android中运行该项目。我使用npminstall安装了所有依赖项并正确准备了项目。不幸的是,在使用命令后我得到一个错误TypeError:Pathmustbeastring。收到未定义的。我尝试在线搜索解决方案,但我无法找到任何解决方案,因为我并不真正理解为什么会这样。运行tnsdoctor--logtail显示移动环境(android和ios)的安装有问题,所以它自动提示我尝试通过安装几个依赖项和包来修复它。在这些更改