Android Studio
往事随风,浮生若梦
这个作者很懒,什么都没留下…
展开
-
Android获取当前系统时间
获取12小时时间long msecond = System.currentTimeMillis();long mmsecond = msecond%1000;SimpleDateFormat simpleDateFormat = new SimpleDateFormat("hh:mm:ss");clock.setText(simpleDateFormat.format(msecond)+"...原创 2019-11-25 19:44:53 · 446 阅读 · 0 评论 -
Android实现Dialog嵌套ListView
1、定义ListViewDialog和xml文件list_view.xml<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" ...原创 2019-10-20 17:10:44 · 1149 阅读 · 0 评论 -
Android6.0以上动态授权实现
1、定义与权限相关的变量AndroidManifest.xml <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> <...原创 2019-10-20 16:52:20 · 237 阅读 · 0 评论 -
Android实现HC-05蓝牙舵机云台控制
蓝牙舵机云台控制花了两天时间实现简单的APP蓝牙舵机云台设置Android蓝牙协议分为两种,SPP协议和BLE(Bluetooth low energy)本项目采用的HC-05蓝牙4.0模块。BLE协议主要适用低功耗,具体其他的概念我暂时也不太明白。而SPP协议时候数据传输,点对点的收发,与串口收发数据很相似。下面介绍下,我主要修改了下数据传输和保存的相关的操作。SPP蓝牙数据传输具体细节就不具体...原创 2019-10-14 10:05:06 · 1709 阅读 · 0 评论 -
AS换阿里云镜像
切换到国内的Maven镜像仓库。修改项目根目录下 build.gradle 文件,将 jcenter() 或者 mavenCentral() 替换掉即可repositories { google() maven{ url 'http://maven.aliyun.com/nexus/content/repositories/central/'}}...原创 2019-10-12 22:02:36 · 1420 阅读 · 0 评论 -
EMQX配置以及Android连接
EMQX配置我用的是Windows,所以配置的是Winows版本;先去官网下载 emqx安装很简单1 通过 emqx.io 或 github 选择 Windows 版本,然后下载要安装的 .zip 包。2 解压压缩包3 打开 Windows 命令行窗口,cd 到程序目录, 启动 EMQ X现在应该没有证书,需要安装证书不然 emqx console会进入失败安装证书如何使用...原创 2019-09-06 10:36:17 · 4091 阅读 · 1 评论 -
Android Studio连接夜神模拟器
新建一个bat文件,命名为NoxConnect.bat将下面的内容复制进去nox_adb connect 127.0.0.1:62001双击bat文件,就能连接上模拟器!!如下图:原创 2019-08-12 16:44:29 · 93 阅读 · 0 评论 -
Error: AndroidManifest.xml doesn't exist or has incorrect root tag
Error: AndroidManifest.xml doesn't exist or has incorrect root tag解决方法:Android Studio加载的路径不对,通常是有拷贝移动工程使文件夹出错导致的原创 2019-08-11 19:23:15 · 14166 阅读 · 1 评论 -
Android与java进行序列化网络传输报错
Android与Java服务端进行数据通信,通信失败,Android报错内容如下:08-13 21:20:39.977 11693-11713/com.example.robotmachine W/System.err: java.io.StreamCorruptedException08-13 21:20:39.977 11693-11713/com.example.robotmachine...原创 2019-08-13 21:34:09 · 567 阅读 · 0 评论 -
GLSurfaceView的Layout布局报空指针问题
08-04 21:50:30.149 6175-6175/com.example.robotmachine E/AndroidRuntime: FATAL EXCEPTION: main Process: com.example.robotmachine, PID: 6175 java.lang.RuntimeException: Unable to resume activity...原创 2019-08-04 21:57:20 · 874 阅读 · 0 评论 -
***Frament导包错误***
方法 FragmentTransaction.add(Fragment,String)不适用(参数不匹配; int无法转换为Fragment)方法 FragmentTransaction.add(int,Fragment)不适用(参数不匹配; FragmentOpenGL无法转换为Fragment)解决方案这是因为Fragment继承时候,导包导错了将import android....原创 2019-08-04 20:21:51 · 183 阅读 · 0 评论 -
Android Studio3.4.2配置NDK
说多了都是累,配置个环境花了一天 时间。看了五湖四海大佬们写的帖子,怎么感觉就是解决不了我的问题。我的错误是:07-22 14:53:06.058 5541-5541/com.example.view E/art: dlopen("JNITest", RTLD_LAZY) failed: dlopen failed: library "JNITest" not found07-22 14:53...原创 2019-07-22 15:37:37 · 12434 阅读 · 2 评论