android Studio调试异常
来源:互联网 发布:mac地址查询设备 编辑:程序博客网 时间:2024/06/08 02:43
1.今天调试发现运行直接退出,后来发现,是控件没有声明ID
2.今天使用android Studio 时,提示有新版本,手贱点了升级,然后就各种下载各种更新,浪费了好多时间。最后运行时,发现很多程序的gradle的更新。烦不胜烦。很多项目要更新。最后直接点击不更新。省事了。但是后来发现一个问题,studio中的 工具 Android Device monitor 不能用了,提示异常,让看日志。在网上搜索了各种解决方案,比如用管理员模式运行。最后都解决不了我的问题。最后发现一片文章,提示可能是jdk版本问题。 我的是1.7的。改成9.0.1,不行。最后下载了个1.8的,终于解决了问题。
3.今天在研究Android Studio 的 Service时发现一个问题,使用本地服务没有问题,但是调用远程服务时,需要引入aidl文件,这个时候编译该文件出现了问题
刚开始以为时环境问题,结果百度查询了半天都没有解决。后来想想也许是代码本身的问题,然后换个方向搜索,找到了相关答案。原来编译时缺少一个aidl文件,这个文件很特殊,必须和你定义的
parcelable 类名称一致,而且必须在同一个包下面,并且内部需要写明定义的包名,导入的类名,和 parcelable 名,如下:
定义好了这个文件,编译顺利通过了。// IStudentService.aidlpackage com.study.study_service;// Declare any non-default types here with import statementsimport com.study.study_service.Student;//定义打包名称parcelable Student;
4.aidl客户端调用方法时提示 service intent must be explicit
原代码:
Intent intet = new Intent("com.study.study_service.RemoteService.Action");
出现标题所述错误。解决方式:
Intent intet = new Intent();intet.setAction("com.study.study_service.RemoteService.Action");intet.setPackage("com.study.study_service");bindService(intet, remoteConn, Context.BIND_AUTO_CREATE);显示指定Action和Package(被调用应用的包名)。
阅读全文
0 0
- android Studio调试异常
- android studio logcat异常调试信息解析错误方法
- 在Android Studio下使用异常断点调试程序
- android-studio常见异常
- Android Studio启动异常
- android studio异常
- Android Studio捕获异常
- android studio 编译异常
- Android Studio编译异常
- Android studio 异常记录
- Android Studio 开发异常
- Android Studio 启动异常
- android studio--调试---断点调试
- Android异常跟踪调试
- Android Studio代码调试
- android studio 断点调试
- Android Studio debug调试
- android studio调试
- linux篇之安装MySQL及远程连接
- 关于PHP获取服务器地址的方法
- Android 横竖屏切换
- 点击头像 侧滑菜单出现 仿QQ界面
- shell 文本替换 ---出现--- sed:-e 表达式 #1,字符 8:“s”的未知选项
- android Studio调试异常
- Consistent Hashing
- Swift
- tensorflow集群搭建
- spring in action_4 资源整理
- HBASE-搭建实验
- Spring————基础回顾
- 高等数学复习之二(导数与微分)
- LihgtOJ-1214