readdle / swift-anycodable

Utils that help encode/decode abstract types via Swift Codable API
MIT License
4 stars 7 forks source link

Anycodable compile fail #3

Open garsdle opened 5 years ago

garsdle commented 5 years ago

Hey there I'm trying to run your sample android application and the build is failing on this package.

swift-android-architecture-todo-swift-mvvm-live/todoapp/app/src/main/swift/.build/checkouts/swift-anycodable.git-1638150873384936115/Sources/AnyCodable.swift:140:32: error: '[Any]' is not convertible to 'Codable' (aka 'Decodable & Encodable'); did you mean to use 'as!' to force downcast? self.value = array as Codable

I know I'm going down a rabbit hole trying to get this to compile to begin with. Any ideas?

andriydruk commented 5 years ago

Hi, there was version collision problem Now it fixed, please try make pull, clean and rebuild project

garsdle commented 5 years ago

Thanks for the quick response! Now I'm getting a different build error swift-android-architecture-todo-swift-mvvm-live/todoapp/app/src/main/swift/.build/checkouts/swift-java-coder.git--5866769710420445866/Sources/JavaCoderConfig.swift:175:37: error: cannot invoke 'NewByteArray' with an argument list of type '(UnsafeMutablePointer<JNIEnv?>?, Int)' let byteArray = JNI.api.NewByteArray(JNI.env, valueData.count)!