轻松解决夜神逍遥模拟器模拟器等模拟器无法连接问题
简书链接:轻松解决夜神逍遥模拟器模拟器等模拟器无法连接问题文章字数:587,阅读全文大约需要2分钟其实这些技巧我早就知道了,只是我一直没有什么分享精神,也很少去记忆,有时候发现这个问题了我竟然没想到用这些技巧解决. 有些问题当时解决了,长时间不操作,慢慢忘记了,当时巩固吧!也为自己有时候的愚蠢做解释吧,有时候不是自己不懂,曾经拥有某些技术,但是因为时间的推移。 夜神模拟器通常端口是62001那么输入adb connect 127.0.0.1:62001即可,那么有时候输入这个还是提示 12adb connect 127.0.0.1:62001unable to connect to 127.0.0.1:62001: cannot connect to 127.0.0.1:62001: 由于目标计算机积极拒绝,无法连接。 (10061) 那么说明你这个模拟器不是第一个模拟器,端口已经不是62001了,那么你把这个模拟器关闭了,以后这个模拟器永远不是 62001 那么到底是哪个端口了,有些朋友可能是打算一个一个实验了,比如62025 62027...
gradle的几个实用技巧让你爽歪歪
简书链接:gradle的几个实用技巧让你爽歪歪文章字数:868,阅读全文大约需要3分钟本文章由情随事迁收集编写,转载请说明出处 混淆文件收集技巧 自动备份 mapping 混淆发布后对应的真实代码比对文件123456789101112131415applicationVariants.all { variant -> variant.outputs.each { output -> if (variant.getBuildType().isMinifyEnabled()) { variant.assemble.doLast{ copy { from variant.mappingFile into "${projectDir}/mappings" rename { String...
CanvastryingtousearecycledbitmapandroidgraphicsBitmap
简书链接:CanvastryingtousearecycledbitmapandroidgraphicsBitmap文章字数:146,阅读全文大约需要1分钟 123456789101112java.lang.RuntimeException: Canvas: trying to use a recycled bitmap android.graphics.Bitmap@b66e6ff at android.graphics.Canvas.throwIfCannotDraw(Canvas.java:1271) at android.view.DisplayListCanvas.throwIfCannotDraw(DisplayListCanvas.java:257) ...
Activity中的方法findViewByIdint和AppCompatActivity中的方法TfindViewBy
简书链接:Activity中的方法findViewByIdint和AppCompatActivity中的方法TfindViewBy文章字数:129,阅读全文大约需要1分钟错误原因是androdi ambiguous method callError:(67, 36) 错误: 对findViewById的引用不明确Activity 中的方法 findViewById(int) 和 AppCompatActivity 中的方法 findViewById(int) 都匹配其中, T是类型变量:T扩展已在方法 findViewById(int)中声明的View 解决方法修改compile sdk和build tool sdk升级到27 ,或者不要两则都导入,但是我的不得不导入,没办法 https://stackoverflow.com/questions/46900261/error-ambiguous-method-call-both-findviewbyid-int-in-appcompactactivity-and 我这是lib库报错,所以我升级lib库的compile...
Failedtofindbytecodeforxxx解决方法
简书链接:Failedtofindbytecodeforxxx解决方法文章字数:305,阅读全文大约需要1分钟 123456789101112131415161718192021222324252627Error:警告: 未知的枚举常量 Scope.LIBRARY 原因: 找不到android.support.annotation.RestrictTo$Scope的类文件警告: 未知的枚举常量 Scope.LIBRARY 原因: 找不到android.support.annotation.RestrictTo$Scope的类文件警告: 未知的枚举常量 Scope.LIBRARY 原因: 找不到android.support.annotation.RestrictTo$Scope的类文件警告: 未知的枚举常量 Scope.LIBRARY警告: 未知的枚举常量 Scope.LIBRARY注: 某些输入文件使用或覆盖了已过时的 API。注: 有关详细信息, 请使用 -Xlint:deprecation 重新编译。注: 某些输入文件使用了未经检查或不安全的操作。注:...
SoftReferenceWeakReference区别避免混淆软引用和弱引用的不同从源码注释入手以及手写测试避免记错混淆使用谐音记忆法
简书链接:SoftReferenceWeakReference区别避免混淆软引用和弱引用的不同从源码注释入手以及手写测试避免记错混淆使用谐音记忆法文章字数:1831,阅读全文大约需要7分钟我的app很头疼,有时候很容易记混淆,搞不懂哪个是内存不足才会回收,哪个随时可能被回收 哪个调用gc之后一定会回收,哪个是安卓推荐使用的.. 那么先从安卓的源码开始,打开源码发现有一段注释证明软引用不推荐使用, SoftReference12 Soft reference objects, which are cleared at the discretion of the garbage collector in response to memory demand. Suppose that the garbage collector determines at a certain point in time that an object is softly reachable. At that time it may choose to clear atomically all...
视频合成加不规则图片实现方式
简书链接:视频合成加不规则图片实现方式文章字数:257,阅读全文大约需要1分钟不规则图片挖空区域放一个视频。 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 Bitmap bitmapDrawComb = Bitmap.createBitmap(bgBitmap.getWidth(), bgBitmap.getHeight(), bgBitmap.getConfig()); Canvas canvas = new Canvas(bitmapDrawComb); Paint paint = new Paint(); //绘制背景图层 if (bgBitmap != null) { canvas.drawBitmap(bgBitmap, new Matrix(), paint); ...
Programtypealreadypresentandroidsupportv4appActionBarDrawerTo
简书链接:Programtypealreadypresentandroidsupportv4appActionBarDrawerTo文章字数:252,阅读全文大约需要1分钟 //Error:Program type already present: android.support.v4.app.ActionBarDrawerToggle$DelegateProvider java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v4/animation/AnimatorCompatHelper;java.lang.NoSuchFieldError: No field notification_template_lines of type趣拍的sdk比较奇葩了。 //不设置24.2.1但是设置到了25就找不到布局,全部不管好像又冲突设置24.2.1 那么 要么冲突 要么 ...
ErrorCauseorggradleapiartifactsProjectDependencygetProjectConf
简书链接:ErrorCauseorggradleapiartifactsProjectDependencygetProjectConf文章字数:18,阅读全文大约需要1分钟Error:Cause: org.gradle.api.artifacts.ProjectDependency.getProjectConfiguration()Lorg/gradle/api/artifacts/Configuration; Consult IDE log for more details (Help | Show Log)解决方法。修改gradle,android gradle版本 distributionUrl=https://services.gradle.org/distributions/gradle-4.4-all.zip com.android.tools.build:gradle:3.1.0-alpha09
AndroidStudio中级问题之ErrorFailedtocompleteGradleexecutionCause
简书链接:AndroidStudio中级问题之ErrorFailedtocompleteGradleexecutionCause文章字数:130,阅读全文大约需要1分钟这个问题新建一个项目就能给你出现。解决方法?版本问题?可是我特么改版本随便build就直接这个错误,根本不会走编译流程, Error:Unable to load class ‘org.slf4j.LoggerFactory’.Possible causes for this unexpected error include:Gradle’s dependency cache may be corrupt (this sometimes occurs after a network connection timeout.)Re-download dependencies and sync project (requires network)The state of a Gradle build process (daemon) may be corrupt. Stopping all Gradle daemons...