最近在跨平台移植代码的过程中遇到一个比较奇怪的问题,使用C++11特性实现的一段代码在windows平台跑的好好的,到了Linux平台上就会在特定的条件下卡住。仔细定位了一下发现Linux平台实现condition variable的wait_until接口里面使用了绝对时间,虽然参数是steady ...
分类:
编程语言 时间:
2020-12-14 12:48:34
阅读次数:
4
今天做插件开发遇到一个很奇怪问题,项目build完全正常,clean时报错,莫名其妙,报错信息如下: Information:Gradle tasks [clean, :app:generateDebugSources, :app:generateDebugAndroidTestSources, : ...
分类:
移动开发 时间:
2020-12-11 12:42:03
阅读次数:
28
package com.example.aaa; import com.example.test.R; import android.os.Bundle; import android.app.Activity; import android.view.Menu; public class Main ...
分类:
移动开发 时间:
2020-12-11 12:36:00
阅读次数:
22
系统: Ubuntu18.04 vmware 环境搭建 安装SDK https://dl.google.com/android/repository/platform-tools-latest-linux.zip 执行命令: unzip platform-tools-latest-linux.zip ...
分类:
其他好文 时间:
2020-12-11 12:34:15
阅读次数:
23
场景 Android Studio中在新建项目时勾选了 Use legacy android.support licrary 然后在运行项目时提示: This project uses AndroidX dependencies, but the ‘android.useAndroidX‘ prop ...
分类:
移动开发 时间:
2020-12-11 12:11:50
阅读次数:
9
问题背景:windows 命令窗输入 adb devices -l 或者 adb devices 报error:protocol fault或error:device not found手机驱动有问题 解决方案一: windows:任务管理器, 看到adb的进程, 关闭掉, 然后重新启动 adb s ...
分类:
移动开发 时间:
2020-12-11 11:59:50
阅读次数:
6
0. 前言 最近有个需求,就是需要在QT(C++)中移植lua脚本。达到可以动态更新软件功能。lua是一门脚本语言。常用于各类编程语言,作为脚本。特别是游戏行业,据说很多用lua脚本来写业务逻辑。本次分为两种调用,一种是QT调用Lua,这种比较简单。利用Lua源码编译后,直接就可以使用。另外一种是L ...
分类:
其他好文 时间:
2020-12-11 11:52:18
阅读次数:
4
一:导入如百度地图等的外部类。 步骤:1.首先 将androidstudio项目显示切换到 project 状态显示项目 2.然后添加.jar文件,将所有的.jar文件放入libs文件夹内(libs文件夹就在项目文件夹下),然后在引入的.jar文件上右键然后点击 Add As Library... ...
分类:
移动开发 时间:
2020-12-10 10:41:40
阅读次数:
8
为什么要用线程池 新启线程需要新建——执行任务——销毁这个过程,我们准备一批线程放在那,当需要执行任务的时候就可以直接拿到线程来用,节约了新建和销毁的过程,提高效率。 线程资源是稀缺而昂贵的,所以我们需要利用线程池统一管理,限制线程数。 创建线程池时各个参数的含义 corepoolsize:线程池的 ...
分类:
移动开发 时间:
2020-12-10 10:41:27
阅读次数:
16
在布局根节点加上下面三行 android:id="@+id/view_parent" android:clickable="true" android:focusableInTouchMode="true" 在代码中监听view_parent的FocusChangeListener事件 view_p ...
分类:
移动开发 时间:
2020-12-09 12:22:44
阅读次数:
17