rg
03/12/2019, 8:31 AMdave
03/12/2019, 11:46 AMerror: cannot find symbol
@Generated()
error: package javax.annotation.processing does not exist
import javax.annotation.processing.Generated
It seems to be related to dagger2, happens when I try to run my Espresso tests in my ec2 instance. I'm using Open JDK11, Gradle 4.10. Any Ideas?Paulius Ruminas
03/12/2019, 12:22 PMBilagi
03/13/2019, 12:14 PMmap
and switchMap
in transformation
and when to use it ?Lou Morda
03/13/2019, 3:30 PMrkeazor
03/13/2019, 8:17 PMchristian.steffensen
03/14/2019, 8:52 AMclass StartViewModel() : BaseViewModel() {
sealed class Input : IInput {
object ButtonClicked : Input()
}
override fun handleInput(input: IInput) { //I want this to be of the type Input, instead of the interface
}
}
abstract class BaseViewModel {
interface IInput
protected abstract fun handleInput(input: IInput)
init {
handleInput(something that implements IInput)
}
}
zokipirlo
03/14/2019, 8:57 AMvectorDrawables.useSupportLibrary = true
in gradle and srcCompat
on ImageView
for vector images or is it ok to use just android:src
? Are there any fixes for older Android versions in compat version like for Fragments
? Maybe @jw can help me with background info on that? Thanks!katz
03/14/2019, 9:44 AMFredrik Larsen
03/14/2019, 11:07 AMvictor herasme perez
03/14/2019, 11:26 AMvictor herasme perez
03/15/2019, 9:35 AMghosalmartin
03/15/2019, 11:19 AMT
is unchecked?ubu
03/15/2019, 3:04 PMUbi
03/15/2019, 5:49 PM> Task :app:compileDebugKotlin FAILED
e: Supertypes of the following classes cannot be resolved. Please make sure you have the required dependencies in the classpath:
class com.om.nx.di.DaggerAppComponent, unresolved supertypes: AppComponent
Only occurs when running unit tests .Bruno_
03/16/2019, 1:58 PM> The 'java' plugin has been applied, but it is not compatible with the Android plugins.
My guess is that kotlin-dsl
plugin includes java plugin which interferes with android plugin. Anyway, I have literally no idea how to repair itgalex
03/18/2019, 11:47 AMAlex
03/18/2019, 12:52 PM@JsonClass(generateAdapter = true)
data class NetPost(
val id: Int,
@RenderedText val title: String,
@RenderedText val excerpt: String,
@RenderedText val content: String,
val images: NetPostImages,
@UtcDateTime @Json(name = "date_gmt") val date: ZonedDateTime,
@UtcDateTime @Json(name = "modified_gmt") val modified: ZonedDateTime
)
Setting up my moshi instance like so
Moshi.Builder()
.add(RenderedTextAdapter())
.add(UtcDateTimeAdapter())
.build()
And am using all of this inside Retrofit
When accessing the api, i get the following error:
java.lang.IllegalArgumentException: Unable to create converter for java.util.List<(...).NetPost>
Seems like I missed something with my setup? The NetPostJsonAdapter
class is generated correctly, but it does not seem to work inside of a List.. ?katz
03/18/2019, 1:36 PMribesg
03/19/2019, 3:50 PMFredrik Larsen
03/19/2019, 8:43 PMlazy
or lateinit
which will retain the instances. The same goes for views, unless you use synthetics which in itself is a bit "hacky" imo.Justin
03/22/2019, 1:46 AMstackoverflow
and have not been able to find an example of the following:
Has anyone ever created an android library that can receive push notifications, without any sort of coordination with the app that is hosting it?rishabhsinghbisht
03/22/2019, 8:07 AMFredrik Larsen
03/25/2019, 9:52 AMif (BuildConfig.DEBUG) Timber.d(...)
Is the compiler smart enough to do the same if I make an inline function for that check?gsala
03/25/2019, 10:27 AMJakub Blaha
03/25/2019, 10:46 AMStatusBarNotification
?Adam Kirk
03/25/2019, 2:37 PMorg.threeten.bp.zone.ZoneRulesException: No time-zone data files registered
and if I leave it enabled I get this:
[Robolectric] com.mycomp.,yapp.utilities.log.LogTest.on Calling function w it returns an Int: sdk=28; resources=BINARY
I have tried using testImplementation ‘com.jakewharton.threetenabp:threetenabp:1.1.0’
made no difference. I have AndroidThreeTen.init(this) called in my application and testApplication. any ideas?
this is my test
@Test
fun `on Calling function i it returns an Int`() {
assertThat("Returned class is not an Int", Log.i("Test", "Test"), isA(Int::class.java))
assertThat("Returned Int is not 0", Log.i("Test", "Test"), `is`(0))
}
Or do I have to use robolectric because of this?
(Side note: Log is not the util.log from android but my own class) (edited)Diefferson
03/25/2019, 4:59 PMAkash Agarwal
03/26/2019, 4:06 PMMichael Bernier
03/26/2019, 4:07 PMMichael Bernier
03/26/2019, 4:07 PMAkash Agarwal
03/26/2019, 4:10 PM