现在的位置: 首页 > 综合 > 正文

java.lang.SecurityException: Not allowed to bind to service Intent { act=com.android.testAIDLServic

2019年05月19日 ⁄ 综合 ⁄ 共 649字 ⁄ 字号 评论关闭

在测试AIDL服务的时候,出现

  java.lang.SecurityException: Not allowed to bind to service Intent { act=com.android.testAIDLService.MyService,这个错误,就是绑定不了这个服务

 解决办法:

    添加代码:

    //////////////////////////////////////////////////////////

    android:process=":remote"
    android:exported="true,设置此属性为true,否则出现

    ///////////////////////////////////////////////////////////

<service android:name="com.android.hisense.testaidlService.MyService"  
                 android:exported="true"
                  >
            <intent-filter>
                <!--是客户端用于访问AIDL服务的ID  -->
                <action android:name="com.android.hisense.testaidlService.IMyService" />
            </intent-filter>
</service>

抱歉!评论已关闭.