nytimes / Store

Android Library for Async Data Loading and Caching

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error compilation

dbof10 opened this issue · comments

I get an error while building
Error:com.android.builder.dexing.DexArchiveBuilderException: Failed to process /Users/*/.gradle/caches/modules-2/files-2.1/com.nytimes.android/filesystem3/3.0.1/3345997ba0765730feba9a3a1cc3024125b20013/filesystem3-3.0.1.jar
Error:com.android.builder.dexing.DexArchiveBuilderException: Error while dexing com/nytimes/android/external/fs3/ObjectToSourceTransformer.class
Error:com.android.dx.cf.code.SimException: invalid opcode ba (invokedynamic requires --min-sdk-version >= 26)

What version of Store are you trying to build?
Also what version of Gradle and build-tools are you using?

I'm using Store 3.0.1 and gradle 3.0.1

I'am also get this error:

FSReader#read()

android studio: 3.1 stable release
Store 3.0.0 or 3.0.1
gralde 4.4
gradle plugin 3.1.0

Could you kindly include a sample project or a failing test to help us reproduce

Thank you for providing more info.
Just wanted to update that I've been able to reproduce the problem locally.

Will hopefully have more info soon

I fixed by

 compileOptions {
        sourceCompatibility 1.8
        targetCompatibility 1.8
    }

You beat me to it!

That seems to be the fix. In store 3.0.0+ we removed retrolambda and since we use lambdas and most of the modules such as filesytem, this may cause the error you see if you are not setting the the source/target compatibility to 1.8.

Going forward it will be required that you set this in your android configuration. I will update the README accordingly

android {
    compileOptions {
        sourceCompatibility 1.8
        targetCompatibility 1.8
    }
...

Should we close this?