Execution failed for task ':compileDebugAidl'.

Execution failed for task ':compileDebugAidl'.
> java.lang.RuntimeException: com.android.ide.common.process.ProcessException: Error while executing '/opt_dev/android-sdk-linux_new/build-tools/23.0.3/aidl' with arguments {-p/opt_dev/android-sdk-linux_new/platforms/android-26/framework.aidl -o/home/dream/workspace/NewUserHomePage/build/generated/source/aidl/debug}

在android studio 中点开Gradle console,终于找到问题所在:

Executing tasks: [:app:generateDebugSources]

Configuration on demand is an incubating feature.
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
aidl.exe E 08-03 23:11:41 632 10360 aidl.cpp:580] refusing to generate code from aidl file defining parcelable

aidl.exe E 08-03 23:11:41 15108 15164 type_namespace.cpp:107] In file F:\WorkSpace\MyAIDLApplicaion\app\src\main\aidl\com\example\bookserver\IBookManager.aidl line 11 return type List<Book>:
aidl.exe E 08-03 23:11:41 15108 15164 type_namespace.cpp:107] unknown type
aidl.exe E 08-03 23:11:41 15108 15164 type_namespace.cpp:129] In file F:\WorkSpace\MyAIDLApplicaion\app\src\main\aidl\com\example\bookserver\IBookManager.aidl line 12 parameter book (argument 1):
aidl.exe E 08-03 23:11:41 15108 15164 type_namespace.cpp:129] unknown type

 

* What went wrong:
Execution failed for task ':app:compileDebugAidl'.
> java.io.IOException: com.android.ide.common.process.ProcessException: Error while executing process C:\Users\Lxt\AppData\Local\Android\Sdk\build-tools\27.0.3\aidl.exe with arguments {-pC:\Users\Lxt\AppData\Local\Android\Sdk\platforms\android-24\framework.aidl -oF:\WorkSpace\MyAIDLApplicaion\app\build\generated\source\aidl\debug -IF:\WorkSpace\MyAIDLApplicaion\app\src\debug\aidl -IF:\WorkSpace\MyAIDLApplicaion\app\src\main\aidl -IC:\Users\Lxt\.gradle\caches\transforms-1\files-1.1\support-v4-24.0.0.aar\ac7d25dd3c0b8080f2fb8522dd6b5b30\aidl -dC:\Users\Lxt\AppData\Local\Temp\aidl8924051422703672316.d F:\WorkSpace\MyAIDLApplicaion\app\src\main\aidl\com\example\bookserver\IBookManager.aidl}

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

 

 

 

 

 

定位问题后就知道,是在AIDL中未引入

import com.example.bookserver.aidl.Book;


运行还有错误,一般为interface包名是否对应,service中实现的接口方法是否对应,public声明接口方法的实现等。

转载于:https://www.cnblogs.com/tingtasia/p/11296853.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值