Sergio C.
12/02/2021, 6:50 PMAshu
12/03/2021, 7:05 AMStateFlow<T>.map(.....) : StateFlow<R>
Since the mapping flow is a state flow it should already have an initial value right? Then why not just map it directly to a state flow? And if I wish to define such an extension function, how should I do that?marlonlom
12/06/2021, 2:21 AMuptoyou
12/06/2021, 5:18 PMktor-client-auth
in KMM ? Is it suppose to work for Authentication Code Flow + PKCE on Android and iOS ?Colton Idle
12/07/2021, 8:48 PMRyan Flynn
12/08/2021, 8:19 AMskwalking
12/08/2021, 11:18 AMLucca Beurmann
12/08/2021, 11:59 PMArpan Sarkar
12/09/2021, 11:32 AMava.lang.IllegalAccessError: class org.jetbrains.kotlin.kapt3.base.KaptContext (in unnamed module @0x75446cc6) cannot access class com.sun.tools.javac.util.Context (in module jdk.compiler) because module jdk.compiler does not export com.sun.tools.javac.util to unnamed module @0x75446cc6
at org.jetbrains.kotlin.kapt3.base.KaptContext.<init>(KaptContext.kt:28)
at org.jetbrains.kotlin.kapt3.KaptContextForStubGeneration.<init>(KaptContextForStubGeneration.kt:40)
at org.jetbrains.kotlin.kapt3.AbstractKapt3Extension.contextForStubGeneration(Kapt3Extension.kt:287)
at org.jetbrains.kotlin.kapt3.AbstractKapt3Extension.analysisCompleted(Kapt3Extension.kt:171)
at org.jetbrains.kotlin.kapt3.ClasspathBasedKapt3Extension.analysisCompleted(Kapt3Extension.kt:102)
at org.jetbrains.kotlin.cli.jvm.compiler.TopDownAnalyzerFacadeForJVM.analyzeFilesWithJavaIntegration$invokeExtensionsOnAnalysisComplete(TopDownAnalyzerFacadeForJVM.kt:112)
at org.jetbrains.kotlin.cli.jvm.compiler.TopDownAnalyzerFacadeForJVM.analyzeFilesWithJavaIntegration(TopDownAnalyzerFacadeForJVM.kt:122)
at org.jetbrains.kotlin.cli.jvm.compiler.TopDownAnalyzerFacadeForJVM.analyzeFilesWithJavaIntegration$default(TopDownAnalyzerFacadeForJVM.kt:86)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler$analyze$1.invoke(KotlinToJVMBytecodeCompiler.kt:252)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler$analyze$1.invoke(KotlinToJVMBytecodeCompiler.kt:243)
at org.jetbrains.kotlin.cli.common.messages.AnalyzerWithCompilerReport.analyzeAndReport(AnalyzerWithCompilerReport.kt:113)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.analyze(KotlinToJVMBytecodeCompiler.kt:243)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.compileModules$cli(KotlinToJVMBytecodeCompiler.kt:90)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.compileModules$cli$default(KotlinToJVMBytecodeCompiler.kt:56)
at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:169)
at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:52)
at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:92)
at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:44)
at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:98)
at org.jetbrains.kotlin.incremental.IncrementalJvmCompilerRunner.runCompiler(IncrementalJvmCompilerRunner.kt:412)
at org.jetbrains.kotlin.incremental.IncrementalJvmCompilerRunner.runCompiler(IncrementalJvmCompilerRunner.kt:112)
at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compileIncrementally(IncrementalCompilerRunner.kt:358)
at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compileIncrementally$default(IncrementalCompilerRunner.kt:300)
at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compileImpl$rebuild(IncrementalCompilerRunner.kt:119)
at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compileImpl(IncrementalCompilerRunner.kt:170)
at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compile(IncrementalCompilerRunner.kt:81)
at org.jetbrains.kotlin.daemon.CompileServiceImplBase.execIncrementalCompiler(CompileServiceImpl.kt:607)
at org.jetbrains.kotlin.daemon.CompileServiceImplBase.access$execIncrementalCompiler(CompileServiceImpl.kt:96)
at org.jetbrains.kotlin.daemon.CompileServiceImpl.compile(CompileServiceImpl.kt:1658)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:567)
at java.rmi/sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:357)
at java.rmi/sun.rmi.transport.Transport$1.run(Transport.java:200)
at java.rmi/sun.rmi.transport.Transport$1.run(Transport.java:197)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:691)
at java.rmi/sun.rmi.transport.Transport.serviceCall(Transport.java:196)
at java.rmi/sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:587)
at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:828)
at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:705)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:704)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
at java.base/java.lang.Thread.run(Thread.java:831)
dave08
12/09/2021, 1:56 PMMicko Cabacungan
12/09/2021, 6:08 PMJoshua Akinsola
12/09/2021, 7:23 PMDariusz Rusin
12/10/2021, 8:59 AMCaused by: java.lang.ClassNotFoundException: Didn't find class "androidx.compose.ui.platform.InfiniteAnimationPolicy$DefaultImpls" on path: DexPathList[[zip file "/system/framework/android.test.mock.jar", zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/system/framework/android.test.runner.jar", zip file "/data/app/com.xxx.test--U04pIcan0sKvbMH_f3aCQ==/base.apk", zip file "/data/app/com.xxx-MvGPQxMJ3GAEvifVyCdW8w==/base.apk"],nativeLibraryDirectories=[/data/app/com.xxx.test--U04pIcan0sKvbMH_f3aCQ==/lib/x86, /data/app/com.esky-MvGPQxMJ3GAEvifVyCdW8w==/lib/x86, /data/app/com.xxx.test--U04pIcan0sKvbMH_f3aCQ==/base.apk!/lib/x86, /data/app/com.xxx-MvGPQxMJ3GAEvifVyCdW8w==/base.apk!/lib/x86, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
... 39 more
I’m using latest versions of compose libs: 1.1.0-beta04
Any ideas?Illustrator
12/11/2021, 8:46 AMuptoyou
12/14/2021, 10:37 AMAlmPazel
12/15/2021, 3:50 AMTower Guidev2
12/15/2021, 9:42 AMloadStateFlow
to manage my android activity load states and do not understand how to achieve the desired effect
heres my code...ahmed qaisi
12/15/2021, 12:25 PMAsad Mukhtar
12/15/2021, 9:26 PMErik
12/15/2021, 11:17 PMStateFlow<State>
) in two fragments in the same activity.
As can be seen in the logcat at runtime, only one of the two fragments receives new state values. I don't understand why, because a StateFlow
should emit to all collectors, not just one. Why is that? What am I doing incorrectly?Honey Sandy
12/17/2021, 8:28 AMahmed qaisi
12/18/2021, 9:21 PMOrhan Tozan
12/19/2021, 2:00 PMPablo
12/20/2021, 8:12 AMMilan Vadhel
12/21/2021, 12:47 PMclass CustomRule : Rule("FunctionNamingConvention") {
override fun visit(
node: ASTNode,
autoCorrect: Boolean,
emit: (offset: Int, errorMessage: String, canBeAutoCorrected: Boolean) -> Unit
) {
if (node.elementType == VAR_KEYWORD) {
emit(node.startOffset, "Unexpected var, use val instead", false)
}
}
}
Here is i have register that class.
class CustomRuleSetProvider : RuleSetProvider {
override fun get(): RuleSet {
return RuleSet("FunctionNamingConvention", CustomRule())
}
}
Any one have idea about this?Lucca Beurmann
12/22/2021, 3:00 PM@Test
fun `Should get images and add to list`() = runBlockingTest {
coEvery { getPhotosUseCase(any()) } returns flow { emit(Source.Success(GetImagesTestData.DOMAIN_RESPONSE)) }
//viewModel.getImages()
coVerify(exactly = 1) { getPhotosUseCase(any()) }
confirmVerified(getPhotosUseCase)
assertEquals(GetImagesTestData.DOMAIN_RESPONSE, viewModel.photos.toList())
}
This test keeps failing because it says that viewModel.photos.ToList() is empty, therefore not equal to the expected result. The test will only pass if call the viewModel.getImages() method inside the test block, but this method is already being called in the init{} block of the viewModel.
Can anyone help me understand why this is happening?Fırat
12/23/2021, 5:33 AMRene Win
12/23/2021, 8:01 AMfun foo(val a: Int = 0)
is it possible to have some conditional calling of "foo" like?
val dummyBoolean = true
foo(if(dummyBoolean) 1 else <use default value>)
Niharika Arora
12/23/2021, 9:51 AMAndré Thiele
12/23/2021, 1:44 PMAndré Thiele
12/23/2021, 1:44 PMCaused by: java.lang.InstantiationException: java.lang.Class<app.example.ui.screens.ExampleViewModel> has no zero argument constructor at java.lang.Class.newInstance(Native Method) at androidx.lifecycle.ViewModelProvider$NewInstanceFactory.create(ViewModelProvider.java:219) ... 199 more
@HiltViewModel
class ExampleViewModel @Inject constructor(
private val exampleRepository: ExampleRepository
) : BaseViewModel<Action, State>() {
@Composable
fun ExampleScreen(viewModel: ExampleViewModel = viewModel()) {
Marek Defeciński
12/23/2021, 2:04 PMAndré Thiele
12/23/2021, 2:43 PM