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]> 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]
> 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/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/CALQgHdk4a4x%2BW9jcL3A2ds7dPupWps1Hr0RUZAjBe8EkJ-3EsA%40mail.gmail.com.

Reply via email to