Firstly,the most important step is that you need to get more detail information about the error.
You can use one of the the following Gradle commands to get more details.
gradlew assembleDebug
gradlew assembleDebug --info
gradlew assembleDebug --debug
gradlew assembleDebug --scan
gradlew assembleDebug --stacktrace
I have met the similar situation with the environment:
macOS 10.14.2
Android Studio 3.3
The more detail information is:
ifeegoo:AIDLClient ifeegoo$ ./gradlew assembleDebug
Welcome to Gradle 4.10.1!
Here are the highlights of this release:
- Incremental Java compilation by default
- Periodic Gradle caches cleanup
- Gradle Kotlin DSL 1.0-RC6
- Nested included builds
- SNAPSHOT plugin versions in the `plugins {}` block
For more details see https://docs.gradle.org/4.10.1/release-notes.html
Starting a Gradle Daemon, 1 incompatible Daemon could not be reused, use --status for details
> Configure project :app
WARNING: The specified Android SDK Build Tools version (28.0.1) is ignored, as it is below the minimum supported version (28.0.3) for Android Gradle Plugin 3.3.0.
Android SDK Build Tools 28.0.3 will be used.
To suppress this warning, remove "buildToolsVersion '28.0.1'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.
> Task :app:compileDebugAidl FAILED
/Users/ifeegoo/Desktop/AIDL/AIDLClient/app/src/main/aidl/com/xb/test/IRomteAidlInterface.aidl:6: couldn't find import for class com.xb.test.IClientAidlInterface
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compileDebugAidl'.
> java.io.IOException: com.android.ide.common.process.ProcessException: Error while executing process /Users/ifeegoo/Library/Android/sdk/build-tools/28.0.3/aidl with arguments {-p/Users/ifeegoo/Library/Android/sdk/platforms/android-27/framework.aidl -o/Users/ifeegoo/Desktop/AIDL/AIDLClient/app/build/generated/aidl_source_output_dir/debug/compileDebugAidl/out -I/Users/ifeegoo/Desktop/AIDL/AIDLClient/app/src/main/aidl -I/Users/ifeegoo/Desktop/AIDL/AIDLClient/app/src/debug/aidl -I/Users/ifeegoo/.gradle/caches/transforms-1/files-1.1/support-compat-27.1.1.aar/5625261fa2f53d5e15ed7248754bde52/aidl -d/var/folders/vl/nvypcrfj25n20fhnmtl0t5p40000gn/T/aidl37267774351421868.d /Users/ifeegoo/Desktop/AIDL/AIDLClient/app/src/main/aidl/com/xb/test/IRomteAidlInterface.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.
* Get more help at https://help.gradle.org
BUILD FAILED in 6s
2 actionable tasks: 1 executed, 1 up-to-date
So the most important detail information is after FAILED
/Users/ifeegoo/Desktop/AIDL/AIDLClient/app/src/main/aidl/com/xb/test/IRomteAidlInterface.aidl:6: couldn't find import for class com.xb.test.IClientAidlInterface
Finally,I found that there is somethings wrong with my AIDL file location.