随笔分类 -  安卓APP开发

摘要:app开发myapplicaion2 <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.my 阅读全文
posted @ 2026-04-19 22:02 txwtech 阅读(6) 评论(0) 推荐(0)
摘要:java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.myapplication/com.example.myapplication.MainActivity}: java.lang. 阅读全文
posted @ 2026-04-19 14:47 txwtech 阅读(5) 评论(1) 推荐(0)
摘要:DateUtil cannot resolve symbol 'DateUtil' 点击右上角同步 阅读全文
posted @ 2026-04-19 10:39 txwtech 阅读(5) 评论(0) 推荐(0)
摘要:Attempt to invoke virtual method 'boolean java.io.FileDescriptor.isSocket$()' on a null object reference 是一个比较底层的网络相关异常 添加网络授权 阅读全文
posted @ 2026-04-18 21:59 txwtech 阅读(5) 评论(0) 推荐(0)
摘要:方法1,api26 android8.0 // 隐藏标题栏 supportRequestWindowFeature(Window.FEATURE_NO_TITLE); View decorView = getWindow().getDecorView(); int uiOptions = View. 阅读全文
posted @ 2026-04-18 19:00 txwtech 阅读(8) 评论(0) 推荐(0)
摘要:ctrl+/ 阅读全文
posted @ 2026-04-18 17:17 txwtech 阅读(5) 评论(0) 推荐(0)
摘要:安装sdk api28,安卓9.0 配置: build.gradle(module:app) apply plugin: 'com.android.application' android { compileSdkVersion 28 buildToolsVersion "36.1.0" defau 阅读全文
posted @ 2026-03-27 17:25 txwtech 阅读(12) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2026-03-27 16:21 txwtech 阅读(6) 评论(2) 推荐(0)
摘要:https://blog.csdn.net/m0_74197761/article/details/142172178 1. Android Studio官网: https://developer.android.google.cn/ Android Studio官网下载: https://deve 阅读全文
posted @ 2026-03-26 21:52 txwtech 阅读(12) 评论(2) 推荐(0)
摘要:在AndroidManifest.xml配置文件的标签中直接插入 android:usesCleartextTraffic="true" 有以下三种解决方法: (1)APP改用https请求 (2)targetSdkVersion 降到27以下 (3)更改网络安全配置 前面两个方法容易理解和实现,具 阅读全文
posted @ 2023-10-08 13:18 txwtech 阅读(941) 评论(0) 推荐(0)
摘要:安卓app按钮设置样式边角圆弧与颜色 btn_bg_blue.xml文件放在drawable文件夹 <?xml version="1.0" encoding="UTF-8"?> <inset xmlns:android="http://schemas.android.com/apk/res/andr 阅读全文
posted @ 2023-09-28 14:46 txwtech 阅读(93) 评论(0) 推荐(0)
摘要:android:drawableRight="@drawable/end_lot" //布局文件中配置 翻译 搜索 复制 阅读全文
posted @ 2023-09-28 13:57 txwtech 阅读(37) 评论(0) 推荐(0)
摘要:解决Java 获取 getHostAddress 为什么 是 127.0.0.1的具体操作步骤 https://blog.51cto.com/u_16175446/6683264 https://blog.51cto.com/u_16175435/6931367?u_atoken=553aa05b- 阅读全文
posted @ 2023-09-27 22:05 txwtech 阅读(664) 评论(0) 推荐(0)
摘要:final EditText editText_show_msg = (EditText) findViewById(R.id.editText_multi_show_msg); editText_show_msg.setSelection(editText_show_msg.getText().l 阅读全文
posted @ 2023-09-27 16:51 txwtech 阅读(12) 评论(0) 推荐(0)
摘要:让代码自动对齐的快捷键是Ctrl + Alt + L 翻译 搜索 复制 阅读全文
posted @ 2023-09-27 08:03 txwtech 阅读(190) 评论(0) 推荐(0)
摘要:使用isReachable,IP小的可以ping通,xx.xx.11.11可以,xx.xx.100.100不通 InetAddress geek = InetAddress.getByName("192.168.188.105"); System.out.println(geek.isReachab 阅读全文
posted @ 2023-09-26 22:23 txwtech 阅读(360) 评论(0) 推荐(0)
摘要:1. 地址获取 和 编码解码 public class Net { public static void main(String[] args) throws IOException { // TODO Auto-generated method stub InetAddress ip = Inet 阅读全文
posted @ 2023-09-26 21:54 txwtech 阅读(45) 评论(0) 推荐(0)
摘要:安卓通过Spinner实现combo组合框的方法 布局文件添加一个spinner控件,设置名字: spinner_combox_exec_url array_spinner=new String[2]; array_spinner[0]="http://192.168.10.103:9926"; a 阅读全文
posted @ 2023-09-26 14:05 txwtech 阅读(111) 评论(0) 推荐(0)
摘要:Android设置EditText为只读 final EditText editText_msg_show = findViewById(R.id.editText_show_msg); editText_msg_show.setInputType(InputType.TYPE_NULL);// 设 阅读全文
posted @ 2023-09-26 13:36 txwtech 阅读(275) 评论(0) 推荐(0)
摘要:java中split方法为何不能用小数点(.)做参数?会有异常抛出 但"a.b.c".split(".");得不到预期的结果: a b c 所以必须要 "a.b.c".split("\\."); 用\\才行 代码: public class A { public static void main(S 阅读全文
posted @ 2023-09-26 11:50 txwtech 阅读(62) 评论(0) 推荐(0)