Skip to content

Android test crashes with space characters in 'test 3rd element' - spaces are not allowed in DEX #62

@gt4dev

Description

@gt4dev

Hi

When starting tests in Android KMP library template crashes.

To reproduce call:
gradlew :library:assembleAndroidDeviceTest

Build crashes with error: D8: com.android.tools.r8.internal.ax: Space characters in SimpleName 'test 3rd element' are not allowed prior to DEX version 040

C:\..\multiplatform-library-template-main\library\build\classes\kotlin\android\deviceTest\io\github\kotlin\fibonacci\FibiTest.class: D8: com.android.tools.r8.internal.ax: Space characters in SimpleName 'test 3rd element' are not allowed prior to DEX version 040
org.gradle.workers.WorkerExecutionException: There was a failure while executing work items
        at org.gradle.workers.internal.DefaultWorkerExecutor.workerExecutionException(DefaultWorkerExecutor.java:223)
        at org.gradle.workers.internal.DefaultWorkerExecutor.await(DefaultWorkerExecutor.java:205)
...

I'm wondering how to workaround it.
Seems the simplest solution is to avoid spaces in sources: commonTest, androidMain + Test.
And wait for a moment when DEX will allow 'spaces in names'
Do you have other ideas?

Cheers
GT

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions