課程
/移動開發
/Android
/AIDL-小白成長記
iImoocAidl報空指針異常,服務端MainActivity里面什么都不用寫嗎
2016-02-25
源自:AIDL-小白成長記 2-2
正在回答
使用這種方式綁定服務
intent.setAction("");
bindService(intent, conn, Context.BIND_AUTO_CREATE);
這是什么意思啊
<service android:name=".AIDL" ? ?android:enabled="true" ? ?android:exported="true"></service>
注冊Service
android5.0以下的版本用隱式Intent啟動service,就不會報空了
<service
? ? ? ? ? ? android:name="com.example.android_aidl.IRemoteService"
? ? ? ? ? ? android:process=":remote"
? ? ? ? ? ? android:exported="true" >
? ? ? ? ? ? <intent-filter>
? ? ? ? ? ? ? ? <action android:name="com.example.android_aidl.IRemoteService"></action>
? ? ? ? ? ? </intent-filter>
? ? ? ? </service>
慕先生0560154
恨自己不能小清新 回復 慕先生0560154
llzll 回復 慕先生0560154
你的服務啟動了嗎?
果然是醬 提問者
舉報
AIDL-小白成長記,想要快速入門,看本次的教程就對了
4 回答空指針異常
2 回答空指針異常!??!
1 回答空指針異常
2 回答空指針異常
2 回答計算時出現空指針異常
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網安備11010802030151號
購課補貼聯系客服咨詢優惠詳情
慕課網APP您的移動學習伙伴
掃描二維碼關注慕課網微信公眾號
2016-05-28
使用這種方式綁定服務
intent.setAction("");
bindService(intent, conn, Context.BIND_AUTO_CREATE);
2016-05-05
這是什么意思啊
2016-04-24
<service android:name=".AIDL"
? ?android:enabled="true"
? ?android:exported="true"></service>
注冊Service
2016-03-11
android5.0以下的版本用隱式Intent啟動service,就不會報空了
2016-03-04
<service
? ? ? ? ? ? android:name="com.example.android_aidl.IRemoteService"
? ? ? ? ? ? android:process=":remote"
? ? ? ? ? ? android:exported="true" >
? ? ? ? ? ? <intent-filter>
? ? ? ? ? ? ? ? <action android:name="com.example.android_aidl.IRemoteService"></action>
? ? ? ? ? ? </intent-filter>
? ? ? ? </service>
2016-02-25
你的服務啟動了嗎?