![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Android
Vecace
这个作者很懒,什么都没留下…
展开
-
涉及RadioButton的类型转换出现错误原因
出现类似java.lang.ClassCastException: android.support.v7.widget.AppCompatTextView cannot be cast to android.widget.RadioButtonRadioButton一般是在RadioGroup中出现的,这种错误都是在RadioGroup放入了别的类型的组件,比如上述的就是放入了TextVi...原创 2019-03-06 19:57:04 · 628 阅读 · 4 评论 -
Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'整合不同工程出错解决方法
Error:Execution failed for task ‘:app:transformDexArchiveWithExternalLibsDexMergerForDebug’.我整合了两个工程,然后由于依赖版本不同产生了上面的问题,不能整合google了一下,stackoverflow上有类似的问题:https://stackoverflow.com/questions/462676...原创 2019-04-25 09:53:27 · 604 阅读 · 0 评论 -
Android开发聊天功能
效果图:具体消息传输参考:https://blog.csdn.net/u011463794/article/details/89482734项目在github上:https://github.com/xiatom/AndroidChatRoom具体用法在:https://github.com/xiatom/AndroidChatRoom/wiki/how-to-use可以实现两人甚至多人...原创 2019-04-24 17:22:47 · 7951 阅读 · 5 评论 -
Android实现聊天室功能,使用XMPP协议
安卓大作业要做一个聊天室,然后查到了XMPP协议,然后搭建了openfire服务器(就是安装一下即可)可是到了XMPP编程的时候发现了问题,Smack是一个开源的已于使用的XMPP客户端类库,我选择这个类库,不过网上的资料很多版本过老,就自己去github查了查。这也是开源好处。首先,要把Smack导入到Android Studio,发现Smack不需要下载,可以在AS配置即可,下面就是重...原创 2019-04-23 22:25:55 · 5063 阅读 · 0 评论 -
Android6.0以后的动态申请权限
由于考虑到安全问题,安卓6.0以后,有些权限是需要动态申请的:if(ContextCompat.checkSelfPermission(this, Manifest.permission.READ_PHONE_STATE) != PackageManager.PERMISSION_GRANTED) ActivityCompat.requestPer...翻译 2019-04-22 17:25:27 · 198 阅读 · 0 评论 -
Android Studio可视化时不能拖动控件至布局解决
我新建了布局xml文件后,把之前的布局删去,并自己写了新的布局后,发现不能在Design模式也就是可视化拖动组件到布局查了很多地方也没有插个结果,然后我就看了一下我新写的布局和之前的布局有什么区别,发现了很重要的代码:xmlns:tools="http://schemas.android.com/tools"tools:context="com.ace.firstapp.MainActivi...原创 2019-03-07 14:00:18 · 10776 阅读 · 3 评论 -
Andriod点击按钮响应方法
点击按钮响应有许多方法,比如下面这种:布局layout.xml中定义一个id为button的按钮<Button android:id="@+id/button" android:layout_width="match_parent" android:layout_height="wrap_content" />在活...原创 2019-03-04 20:52:49 · 245 阅读 · 1 评论 -
利用服务器实现安卓程序远端登、注册
安卓程序实现登陆、注册如果用普通的安卓知识实现登陆,那么登陆、注册信息会存储到本地也就是手机端,别的手机就不能登陆账户,或者在删除app时用户信息也会一并删除,那么我们如果想要避免上面的情况,就需要使用服务器了。前提:Android的IDE装好Tomcat服务器如果有Eclipse等java IDE更好,方便部署服务器安卓部分:可以在我的github上获取:https://git...原创 2019-05-19 16:16:47 · 1723 阅读 · 3 评论