joshdaquino
09/22/2017, 4:27 AMgit clone <https://github.com/googlesamples/android-architecture/>
codeslubber
09/22/2017, 4:40 AMcodeslubber
09/22/2017, 4:40 AMcodeslubber
09/22/2017, 4:40 AMdknapp
10/18/2018, 4:25 PMMatt Rea
10/18/2018, 9:13 PMviewAdapter
nullable insteadRiccardo Montagnin
10/18/2018, 9:19 PMRiccardo Montagnin
10/18/2018, 9:20 PM> Task :app:kaptGenerateStubsDebugKotlin
e: error: cannot access Retrofit
class file for retrofit2.Retrofit not found
Consult the following stack trace for details.
com.sun.tools.javac.code.Symbol$CompletionFailure: class file for retrofit2.Retrofit not found
The problem is that that class is present inside the following dependency:
implementation "com.squareup.retrofit2:retrofit:$retrofit_version"
When I switch from implementation
to compile
, the error disappears. What could it be?trevjones
10/18/2018, 9:21 PMRiccardo Montagnin
10/18/2018, 9:21 PMcompile
, the error moves to another dependencytrevjones
10/18/2018, 9:22 PMjw
10/18/2018, 9:22 PMRiccardo Montagnin
10/18/2018, 9:25 PMjw
10/18/2018, 9:26 PMursus
10/19/2018, 3:22 AMMcEna
10/19/2018, 5:51 AMjuliocbcotta
10/19/2018, 3:56 PMjuliocbcotta
10/19/2018, 4:02 PMsealed class ValidationStrategy(val onEnable: Boolean, val onDisable: Boolean) {
...
/**
* Flag to start validating the form only after the first submit event.
*/
class AfterSubmit(onEnable: Boolean, onDisable: Boolean) : ValidationStrategy(onEnable, onDisable)
...
companion object {
val ALL_TIME = AllTime(true, true)
val AFTER_SUBMIT = AfterSubmit(true, true)
val ON_SUBMIT = OnSubmit(false, false)
}
}
skennedy
10/19/2018, 5:34 PMContext.getDrawable(int)
is annotated @Nullable
, but the documentation doesn’t really explain how that could happen. It returns an object, or throws an exception. Is the annotation wrong, or what conditions would it return null?McEna
10/19/2018, 6:09 PMskennedy
10/19/2018, 6:10 PMMcEna
10/19/2018, 6:13 PMskennedy
10/19/2018, 6:13 PMskennedy
10/19/2018, 6:13 PMHong
10/19/2018, 6:16 PM?.let { }
and be done with it?skennedy
10/19/2018, 6:17 PMskennedy
10/19/2018, 6:17 PM?.let {}
when things can’t actually be null (which is my suspicion) isn’t great kotlinHong
10/19/2018, 6:19 PM?.let {} ?: run {}
or try/catch
🙂McEna
10/19/2018, 6:20 PMMcEna
10/19/2018, 6:22 PM