jw
01/13/2018, 1:36 AMAyden
01/13/2018, 8:50 AMprintln
when I execute the Android?Ayden
01/13/2018, 9:44 AMAyden
01/13/2018, 10:52 AMfiliplamparski
01/13/2018, 11:59 AMgildor
01/15/2018, 3:25 AMassertEquals("HI", "hi".toUpperCase())
assertEquals("1", "1".toUpperCase())
It’s easy to test function without side effects.
If a function has side effects you should probably refactor it to make testable. Always depends on your caseStavFX
01/15/2018, 6:43 PMnickk
01/16/2018, 2:39 PMFrameLayout
) in my XML layout and I want to populate it with an unknown number of `TextView`s, programmatically, at runtime.
I tried something like:
placeholder.addView(xxx)
, where xxx is a VerticalLayout created using anko,
but I am getting the Exception:
java.lang.IllegalStateException: The specified child already has a parent
I create the VerticalLayout with this function:
fun createTextViews() : View {
return verticalLayout {
textView {
text = "TextView 1"
}
textView {
text = "TextView 2"
}
}
}
Kvikende
01/16/2018, 2:58 PMext.kotlin_version = '1.2.10'
but still I get the error.
Im not sure what to do now. Any suggestions?
Edit: I got a new error during this start up: Plugin Error: Kotlin threw an uncaught NoSuchMethodError.
before the AbstractMethodError.Kyle
01/16/2018, 3:54 PMkoufa
01/16/2018, 5:34 PMspragg
01/17/2018, 7:21 AMMathbl
01/17/2018, 2:42 PMConversation
and it also contains a list of ConversationMembers
. The thing is, my ConversationMember model has a conversationId
property, that is declared as not null -> In the backend, it doesn’t make sense for a ConversationMember
to have a null conversationId
.
But the thing is, the API doesn’t always send me every fields serialized (it avoids serializing useless fields depending on the situation). So I have this place where I get the Conversation
(containing a list of conversationMembers
) from the backend, but the field conversationId
is not present at this place for the conversationMembers
. So when I try to pass this object to the activity and start it, it throws a java.lang.RuntimeException: Unable to start activity java.lang.IllegalArgumentException: Parameter specified as non-null is null: method kotlin.jvm.internal.Intrinsics.checkParameterIsNotNull, parameter conversationId
How do you deal with that use case? I don’t want to mark this field as nullable, cause at the base it doesn’t make sense, but in the context of api responses with fields restricted to the minimum, the property that I mark as not null could end up being null (not present) in some context.Greg Stepniewski
01/17/2018, 5:09 PMjw
01/17/2018, 5:12 PMKevin Janvier Chinabalire
01/18/2018, 12:50 PMMathbl
01/18/2018, 6:34 PMfilteredMembers = members.filter { memberIds.contains(it.id) }.toMutableList()
But I need to do toMutableList() at the end, which sort of seems wrong to me.
Is it the right/only way to do?themarketka
01/18/2018, 8:54 PMFatal Exception: java.lang.ExceptionInInitializerError
Caused by java.lang.ArrayStoreException: kotlin.jvm.internal.PropertyReference1Impl cannot be stored in an array of type kotlin.reflect.KProperty[]
filiplamparski
01/18/2018, 9:10 PMwaqas
01/19/2018, 10:57 AMunisaurav
01/19/2018, 1:50 PMkenkyee
01/19/2018, 7:57 PMakritrime
01/20/2018, 7:37 AMPaul Woitaschek
01/20/2018, 10:48 PMAyden
01/21/2018, 12:18 PMedwardwongtl
01/22/2018, 9:29 AMFaraz
01/22/2018, 11:01 AMgitanshu
01/22/2018, 7:56 PM1.0.0-beta1
and above. Works fine till 1.0.0-alpha9-1
. Above that, the task always fails with a whole lot of error: cannot find symbol
for databinding classes. However, I can actually see those generated files in app/build/generated/source/kapt/prodDebug/...
. I tried building with --stacktrace and --debug but couldn't figure out what to look for in there. Stuck on this for a few hours now. How do I figure out why kapt keeps failing even though code is being generated?gitanshu
01/22/2018, 8:34 PMgitanshu
01/22/2018, 9:02 PMgitanshu
01/22/2018, 9:02 PMbachhuberdesign
01/22/2018, 9:05 PMandroid.enableD8=false
to your gradle.properties... was having build issues with that a few days ago. I don't know if those will help, there is nothing really specific in those stacktraces to pinpoint the issuegitanshu
01/22/2018, 9:10 PMbachhuberdesign
01/22/2018, 9:10 PMgildor
01/23/2018, 1:40 AM--full-stacktrace
will helpgitanshu
01/23/2018, 4:58 AMCompilation error. See log for more details
. The rest of the stacktrace got truncated with --full-stacktrace too.
What log is this talking about?