Android IDE (AIDE) Support Forum

Compiler bug (typecasting & generic types)

Today I was used to compile some pieces of Android source code and unfortunately got very stange typecasting in bytecode produced by your compiler. Ok, there is some unsafe operations with class types in code but this is not a reason to break my app!

There is an exception from Android dex verifier:

Yes, my AIDE has been modified a lot, but when I use official version, I get the same error.

And what can I do now to run the app???

Unfortunately i couldn’t upload more than one screenshot so

Search results from smali:

And then my code that causes issues

P.S.

Just use code from Android repository, file TextUtils.
Method getSpans generic typed.

It seems it doesn’t depend on system environment,
but I’m running stock rooted MIUI, nither Xposed nor custom ROM, Busybox installed correctly…