sanogueralorenzo / android-kotlin-clean-architecture Goto Github PK
View Code? Open in Web Editor NEWAndroid Sample Clean Architecture App written in Kotlin
Android Sample Clean Architecture App written in Kotlin
I don't understand your package name constant but, how setClassName works for passing postlist to postdetail? When I use your navigation, I have an ActivityNotFoundException with have you declared this activity in your AndroidManifest.xml?
C:\Android-Kotlin-MVI-CleanArchitecture\build\build-attribution\androidGradlePluginAttributionData: The process cannot access the file because it is being used by another process.
I get this error when I try to run the app on the master branch.
Hi! I tried to use Koin library with multi-feature modules, however, I don't know how to load koin modules properly from each features. Finally, I saw your blog post and get how to load koin modules in feature. The differences is "injectFeature"(loadFeature by lazy). I tried to load modules directly
It works as I expected,but I don't know why it is working. So, could you explain for this?
// Application
class App: Application() {
override fun onCreate() {
super.onCreate()
startKoin { androidContext(this) } // it seems deprecated...
}
}
// Modules.kt
fun injectFeature() = loadFeature
private val loadFeature by lazy {
loadKoinModules(
viewModelModule,
useCaseModule,
repositoryModule,
dataSourceModule,
networkModule,
cacheModule
)
}
// in Activity
onCreate() {
super.onCreate()
injectFeature()
}
// Application
class App: Application() {
override fun onCreate() {
super.onCreate()
startKoin(this, listOf(networkModule, analyticsModule))
}
}
// in Activity One
onCreate() {
super.onCreate()
loadKoinModules(listOf(oneViewModelModule))
}
// in Activity Two
onCreate() {
super.onCreate()
loadKoinModules(listOf(twoViewModelModule))
}
it works, however, it throws Exception like this when calling loadKoinModules again...
org.koin.error.BeanOverrideException: Try to override definition with Factory [name='OneViewModel...
After updating gradle.property for the property org.gradle.configureondemand=true
, it generate below error.
Cause: org.gradle.api.internal.initialization.DefaultClassLoaderScope@2c3c5fa9 must be locked before it can be used to compute a classpath!
It works when setting the value to false
. In that case, the purpose for the property for the multimodule project won't get solved right?
I'm using Kotlin DSL with the same gradle wrapper version from the repository.
Also changed the java version from 8, 11 & 16 still it has the same error.
If it works with value true
then how to resolve the above issue?
I didn't understand why you switched thread from Schedulers.io() to Schedulers.io().
You just can omit .observeOn() operator which switch to the same thread and execution will continue in thread that you specify in subscribeOn(). (proof - https://proandroiddev.com/understanding-rxjava-subscribeon-and-observeon-744b0c6a41ea)
how to get code of error response
.subscribe(
{
financialResult.setSuccess(it)
setLoading(false, "financialResult")
},
{
financialResult.setError**(it.code)**
setLoading(false, "financialResult")
}
)
Expected:
@Before
What's happening:
injectFeature()
is crashing the test because of duplicate dependenciesI'm curious if you've faced this issue and how you've solved it. Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.