Thanks for  your reply,Dan
my-services.jar contains .dex files,Is there any way to include .dex files?

在 2020年3月20日星期五 UTC+8上午1:54:15,Dan Willemsen写道:
>
> Does my-services.jar contain .class files, or .dex files? 
> java_import&static_libs is expecting .class files.
>
> - Dan
>
> On Thu, Mar 19, 2020 at 9:07 AM bersaty wu <[email protected] 
> <javascript:>> wrote:
>
>> I want to add my own jar to the wmtest apk, so I modify the .bp file like 
>> this:
>>
>> static_libs: [
>>     "frameworks-base-testutils",
>>     "services.core",
>>     "androidx.test.runner",
>>     "androidx.test.rules",
>>     "mockito-target-extended-minus-junit4",
>>     "platform-test-annotations",
>>     "servicestests-utils",
>>     "truth-prebuilt",
>>     "testables",
>>     "ub-uiautomator",
>>     "hamcrest-library",
>>     "my-services", //add for debug
>> ],
>>
>>
>> //add for debug
>> java_import {
>>      name: "my-services",
>>     jars: ["libs/my-services.jar"],
>>   }
>>
>>
>>
>>
>> I got this error when I build:
>>
>>
>> Error: Cannot create android app from an archive 
>> 'out/soong/.intermediates/frameworks/base/services/tests/wmtests/WmTests/android_common/combined/WmTests.jar'
>>  
>> containing both DEX and Java-bytecode content
>> Compilation failed
>> 15:55:32 ninja failed with: exit status 1
>>
>>
>> Is there any solution?
>>
>>
>> -- 
>> -- 
>> You received this message because you are subscribed to the "Android 
>> Building" mailing list.
>> To post to this group, send email to [email protected] 
>> <javascript:>
>> To unsubscribe from this group, send email to
>> [email protected] <javascript:>
>> For more options, visit this group at
>> http://groups.google.com/group/android-building?hl=en
>>
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Android Building" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/android-building/ba80d301-a617-41e6-b0c3-ec7c67fecbf7%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/android-building/ba80d301-a617-41e6-b0c3-ec7c67fecbf7%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-building/34fa0e74-b32f-47ef-8a65-59a6ecca932a%40googlegroups.com.

Reply via email to