HanteIsHante / ServiceMessage

Service 相关属性
0 stars 0 forks source link

java.lang.RuntimeException: com.android.ide.common.process.ProcessException: Error while executing process #1

Open HanteIsHante opened 7 years ago

HanteIsHante commented 7 years ago
Error:Execution failed for task ':iservice:compileDebugAidl'.
> java.lang.RuntimeException: com.android.ide.common.process.ProcessException: Error while executing process F:\AndroidStudio\sdk\build-tools\25.0.2\aidl.exe with arguments {-
pF:\AndroidStudio\sdk\platforms\android-25\framework.aidl -
oF:\AndroidStudioProjects\ServiceMessage\iservice\build\generated\source\aidl\debug -
IF:\AndroidStudioProjects\ServiceMessage\iservice\src\main\aidl -
IF:\AndroidStudioProjects\ServiceMessage\iservice\src\debug\aidl -IC:\Users\handan\.android\build-
cache\730e20a7b57a90480d3cca30b0bac4cc2c08fd44\output\aidl -IC:\Users\handan\.android\build-
cache\f14be5cd8d1d195f4b82993df005af2a0e294b1f\output\aidl -IC:\Users\handan\.android\build-
cache\9c9b2aca6c73bde2594ef4a2d3638209e9196f24\output\aidl -IC:\Users\handan\.android\build-
cache\2e449c769b502d70fbea459b5b72589f990c4b1d\output\aidl -IC:\Users\handan\.android\build-
cache\76fb64e66e9a936be02c9cfbf9ad233c4951a23e\output\aidl -IC:\Users\handan\.android\build-
cache\c0e79c78ca60f7a2d11e393751884b46f76daabe\output\aidl -IC:\Users\handan\.android\build-
cache\f069f0a21b6c2b2a461e5c78b04943fbdbba241e\output\aidl -IC:\Users\handan\.android\build-
cache\b7cd91fa87d2903cec1922b73abeeeda0b86c5ba\output\aidl -IC:\Users\handan\.android\build-
cache\c3ad9b0e6cef997592366bdad2999c133c30e1cd\output\aidl -
dE:\temp\aidl6258340880583592347.d 
F:\AndroidStudioProjects\ServiceMessage\iservice\src\main\aidl\com\example\service\iservice\IService_AIDL.aidl}
HanteIsHante commented 7 years ago

AIDL 文件创建错误 导致, 右击- > New -> AIDL -> AIDL file

编译: build -> make project (Module name)

HanteIsHante commented 7 years ago

注意 : 需要自己加上 import

import com.example.service.iservice.IService_CallBack;
HanteIsHante commented 7 years ago

创建实体类时,该实体类要 实现序列化 Parcelable, 而且要创建和它同名的aidl文件 ,才能 编译ok

HanteIsHante commented 7 years ago

Parcelable 执行效率高,将数据临时保存在内存中