Dex: com.android.dx.cf.code.SimException: ERROR in Swift.SwiftString$UTF8View.GetSequence:()Ljava/lang/Iterable;: return type mismatch: prototype indicates java.lang.Iterable, but encountered type byte[]

IDE: Version 10.0.0.2397 (develop) built on bajor, 20190419-153353. Commit 6f2fbf4.
Version: Version 10.0.0.2397 (develop) built on bajor, 20190419-153353. Commit 6f2fbf4.
Target (If relevant): Android
Description:
An compiler error is raised when using my example application:

dex: com.android.dx.cf.code.SimException: ERROR in Swift.SwiftString$UTF8View.GetSequence:()Ljava/lang/Iterable;: return type mismatch: prototype indicates java.lang.Iterable, but encountered type byte[]

Part of compiler logs:

                     dex> ignored resource org/
                     dex> ignored resource org/me/
                     dex> ignored resource org/me/matrixsenseandroid/
                     dex> processing org/me/matrixsenseandroid/LocationActivity.class...
                     dex> processing org/me/matrixsenseandroid/LoginActivity.class...
                     dex> processing org/me/matrixsenseandroid/MainActivity.class...
                     dex> processing org/me/matrixsenseandroid/R.class...
                     dex> processing org/me/matrixsenseandroid/R$attr.class...
                     dex> processing org/me/matrixsenseandroid/R$dimen.class...
                     dex> processing org/me/matrixsenseandroid/R$drawable.class...
                     dex> processing org/me/matrixsenseandroid/R$layout.class...
                     dex> processing org/me/matrixsenseandroid/R$string.class...
                     dex> processing org/me/matrixsenseandroid/R$style.class...
E:                   dex: com.android.dx.cf.code.SimException: ERROR in Swift.SwiftString$UTF8View.GetSequence:()Ljava/lang/Iterable;: return type mismatch: prototype indicates java.lang.Iterable, but encountered type byte[]
                     dex> 1 error; aborting

Expected Behavior:
The Android application should compile and runnable

Actual Behavior:
The above mentioned error is being raised during compile time

Steps:

  1. Compile mailed project

Can we (always) see a test case, please?

Thanks, logged as bugs://82436

1 Like

Any workarounds?

No idea until someone had a look at what the problem is. But maybe try avoiding looping over Swift.SwiftString.UTF8View.

1 Like

I am not aware of doing that but I will double check my code

Nope, seems to be a general regression. Any Android project that references swift.jar fails with this :frowning:

Yikes, if this bug is fixed. Any chance you could upload a build with the fix included for me?

will do, but it’s in Carlo’s hands now, so that means not today…

1 Like

bugs://82436 got closed with status fixed.

1 Like