I am a new AOSP developer. I modified some files in AOSP with target sdk_car_x86_64-userdebug, and then I made the framework again using below command:
m framework -j32
After the build was successful, I got the javalib.jar from path
~/path_to/aosp/out/target/product/emulator_car64_x86_64/obj/JAVA_LIBRARIES/framework-sdkextensions.com.android.sdkext_intermediates.
I created a simple Android application then put javalib.jar into app/libs then added the below line into the build.gradle
dependencies {
implementation(files("libs/javalib.jar"))
}
I run the emulator built from AOSP by command
source build/evnsetup.sh
lunch sdk_car_x86_64-userdebug
emulator
After the emulator starts up successfully, I run the application in it. But I encountered an error
FATAL EXCEPTION: pool-2-thread-1
Process: ai.umos.homescreen, PID: 2889 java.lang.IncompatibleClassChangeError: Class 'android.app.PendingIntent$$ExternalSyntheticLambda0' does not implement interface 'java.util.concurrent.Executor' in call to 'void java.util.concurrent.Executor.execute(java.lang.Runnable)' (declaration of 'androidx.profileinstaller.DeviceProfileWriter' appears in /data/app/~~ZGDppP5xMSrCMkinJtMDMQ==/ai.umos.homescreen-asn8RdWTnUGeZXOezq_-iA==/base.apk!classes14.dex)
at androidx.profileinstaller.DeviceProfileWriter.result(DeviceProfileWriter.java:87)
at androidx.profileinstaller.DeviceProfileWriter.deviceAllowsProfileInstallerAotWrites(DeviceProfileWriter.java:140)
at androidx.profileinstaller.ProfileInstaller.transcodeAndWrite(ProfileInstaller.java:440)
at androidx.profileinstaller.ProfileInstaller.writeProfile(ProfileInstaller.java:575)
at androidx.profileinstaller.ProfileInstaller.writeProfile(ProfileInstaller.java:515)
at androidx.profileinstaller.ProfileInstaller.writeProfile(ProfileInstaller.java:479)
at androidx.profileinstaller.ProfileInstallerInitializer.lambda$writeInBackground$2(ProfileInstallerInitializer.java:145)
at androidx.profileinstaller.ProfileInstallerInitializer$$ExternalSyntheticLambda2.run(D8$$SyntheticClass:0)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
at java.lang.Thread.run(Thread.java:1012)
How can I resolve this issue?