java.lang.ClassCastException: android.os.BinderProxy cannot be cast to com.test.Test
由于我在第二个Activity中指定了进程名字,但是服务却没有指定进程名(默认跟主入口一个进程)所以报错。
网上找到的是 服务 和绑定服务的客户端必须在同一个application或者进程中,所以Manifest中也要指定服务的进程名且和调用服务的Activity的中客户端在同一进程中。
<service android:name=".TestService" android:process="myprocess.remote"/>
<activity android:name=".SecondActivity" android:process="myprocess.remote"/>
java.lang.ClassCastException: android.os.BinderProxy cannot be cast to com.test.Test的更多相关文章
- java.lang.ClassCastException: android.widget.RelativeLayout cannot be cast to android.widget.TextView
最近在学习drawerLayout时,遇到这个bug.如下示: java.lang.ClassCastException: android.widget.RelativeLayout cannot b ...
- java.lang.ClassCastException: android.widget.TextView cannot be cast to android.widget.EditText
Caused by: Java.lang.ClassCastException: Android.widget.TextView cannot be cast to android.widget.Ed ...
- 安卓出现错误: java.lang.ClassCastException: android.widget.TextView cannot be cast to android.widget.EditText
Caused by: Java.lang.ClassCastException: Android.widget.TextView cannot be cast to android.widget.Ed ...
- java.lang.ClassCastException:android.widget.Button cannot be cast to android.widget.ImageView
今天遇到一个错误也不知道怎么回事,上网搜了一下: 出现的问题是:java.lang.ClassCastException:android.widget.Button cannot be cast to ...
- java.lang.ClassCastException: android.app.Application cannot be cast to
出这个异常的原因是在项目中添加了新lication类(public class Application extends lication)之后,没有在AndroidManifest.xml中添加该类的 ...
- Android: java.lang.ClassCastException: android.widget.imageView cannot be cast to android.widget.textView异常解决
有时在修改xml文件时,全报这种错误,这个应该是缓存没得到及时更新导致的,可以通过以下方法解决: Eclipse tends to mess up your resources every now a ...
- java.lang.ClassCastException: android.view.ViewGroup$LayoutParams cannot be cast to android.widget.L(转)
09-09 10:19:59.979: E/AndroidRuntime(2767): FATAL EXCEPTION: main09-09 10:19:59.979: E/AndroidRuntim ...
- Exception: java.lang.ClassCastException: android.widget.RelativeLayout$LayoutParams
RelativeLayout title_bg = (RelativeLayout)FTU_Bluetooth.this.findViewById(R.id.titlebar); LinearLayo ...
- java.lang.ClassCastException: android.view.AbsSavedState$1 cannot be cast to android.widget.ProgressBar$SavedState
java.lang.ClassCastException: android.view.AbsSavedState$1 cannot be cast to android.widget.Progress ...
随机推荐
- 20180518VSTO多簿单表汇总
using System; using System.Collections.Generic; using System.Linq; using System.Text; using Microsof ...
- Hadoop – The Definitive Guide Examples,,IntelliJ
IntelliJ Project for Building Hadoop – The Definitive Guide Examples http://vichargrave.com/intellij ...
- PHP的几种输出方式
请写出echo.print_r.print.var_dump .die之间的区别 echo 只能输出字符串等单一数据 不能输出数据类型 不能输出数组等多种数据 print() 只能输出字符串等单一 ...
- Misha and Palindrome Degree CodeForces - 501E (回文串计数)
大意: 给定字符串, 求多少个区间重排后能使原串为回文串. 先特判掉特殊情况, 对于两侧已经相等的位置之间可以任意组合, 并且区间两端点至少有一个在两侧相等的位置处, 对左右两种情况分别求出即可. # ...
- HDU 5710 Digit Sum
Let S(N)S(N) be digit-sum of NN, i.e S(109)=10,S(6)=6S(109)=10,S(6)=6. If two positive integers a,ba ...
- 【Oracle】【2】复制表结构及其数据
--复制表结构及其数据 create table table_name_new as select * from table_name_old; --只复制表结构 ; --create table t ...
- 2017-3-30/HTTP协议2
1. http的状态码有哪些? 状态代码由三位数字组成,第一个数字定义了响应的类别,共分五种类别: 1xx:指示信息--表示请求已接收,继续处理 2xx:成功--表示请求已被成功接收.理解.接受 3x ...
- BIO,NIO的区别,使用场景。
一.什么是io? i就是input,输入,o就是output,输出,合起来就是以流为基本的输入输出. 二.传统的io 传统的服务器端同步阻塞I/O处理(也就是BIO,Blocking I/O): 当客 ...
- 推送证书p12文件转换成pem的命令
openssl pkcs12 -in 你的p12文件名称.p12 -out 需要生成的pem文件名称.pem -nodes
- 自建yum源解决Ceph搭建过程中从官网取包慢的问题
最近项目组需要ceph环境,第一次搭建ceph,各种不顺,装了卸,卸了装,一遍又一遍地按照官网的操作进行.最气人的是网速差,从官网取包太慢.一轮尝试就浪费一上午. 因此想到本地新建yum源. 首先,按 ...