我不能建艾德尔图书馆。
错误:
错误:任务执行失败“:app:compileDebugAidl”。com.android.ide.common.process.ProcessException: java.lang.RuntimeException:执行时出错 带参数的'D:\mysdk\Android\android-sdk\build-tools\22.0.1\aidl.exe‘ {-pD:\mysdk\Android\android-sdk\platforms\android-21\framework.aidl -...dC:\Users\admin\AppData\Local\Temp\aidl6013369886374174489.d ...\dev\myaidllibrary\ICoffeeMakerRemoteService.aidl}
build.gradle:
apply plugin: 'com.android.library'
apply plugin: 'com.neenbedankt.android-apt'
android {
compileSdkVersion 21
buildToolsVersion '22.0.1'
defaultConfig {
minSdkVersion 15
targetSdkVersion 21
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:21.0.0'
testCompile 'junit:junit:4.12'
provided 'com.google.auto.value:auto-value:1.2-rc1'
// needed for Android Studio
apt 'com.google.auto.value:auto-value:1.2-rc1'
apt 'com.ryanharter.auto.value:auto-value-parcel:0.2.0'
}目录结构:
艾德尔-> ICoffeeMakerRemoteService.aidl Ingredient.aidl java-> Ingredient.java
我被这些困住了,尝试了可能的解决方案。
发布于 2017-04-28 09:30:20
我也犯了同样的错误,但我修好了。我猜你想“通过IPC传递对象”,我也是。
我的问题是,我错过了对象aidl中的包定义,比如Rect.aidl,所以请尝试将包添加到您的aidl文件中。
例如:
Rect.aidl
package android.graphics; // important
// Declare Rect so AIDL can find it and knows that it implements
// the parcelable protocol.
parcelable Rect;发布于 2017-09-29 10:17:23
对我来说,当我在aidl中定义具有不同签名的重载方法时,就会发生这种情况。似乎不支持重载方法。
不允许:
public void methodA(int a);
public void methodA(int a, String b);允许:
public void methodA(int a);
public void methodB(int a, String b);找到更多是不允许的,不能在签名中定义字符串数组不允许:
public void methodA(String[] a);发布于 2017-12-25 12:34:13
我将重命名为,上的aidl的包离开导航栏,并且与***.aidl中的代码一致。
https://stackoverflow.com/questions/41461954
复制相似问题