calorietracker's People
Forkers
gael-android ndiritumichael mulieriq raystatic rashadtanjim uwi0 jpsanmiguel ab-morphious johny-kym amirdaryabak deepakgupta881 dimalukas javadsheikhsagha tortasmcfly anubhav100rao raamcosta miranmustafa mridul-gupta danielto vigli-lee virendersran01 baharudin78 michelbitsavva markhor1999 thebatu tankafide neerav006 jasurbeka rodrigogivisiez dwatling antoniosj arthurdamous cjae thireng187 ymaniz09 dimas-prasetya ahmadbanikamali danizz97 commandiron anbioc chanjun-park eltegani gutoxp wiryadev armandoclaudio nikh-06 bondidos fergaschas comye1 criscotero subtextaps birojow ricardorochateixeira abikayusri androiddevs1 kyawsoew1n leonardosibela tyler-lopez vladr7 victoroluwaseun ocnunez sahianmol1 iamhero25 mostafaanter brandonquintanilla aeroxr1 donahuejw alex-a-fit tolmachevroman hunterkf pocketobjects lucasemboava kamdaou valdeveloper-com youri007full tolgaprm mjjacobs01 ancientmethods aminelhag omarhussin99 dahabjr error96num kotasjan yaroslavnurtdinov souinawi insertyexe algoflows mussrabah prabhavsharma valeriibielik hamurcuabi andreivladpaul jacksonfdam deepak103 moatazhamada aliprogammerali adi-codes hearan-won acdwisu arioch666calorietracker's Issues
onBackPress returns on the unexpected page
Context:
- after first launch the user passes through Onboarding to MainPage
- by onBackPress on MainPage user returns to Onboarding
Issue:
this part of code working only for the next launches after first
NavHost( navController = navController, startDestination = if(shouldShowOnboarding) { Route.WELCOME } else Route.TRACKER_OVERVIEW )
Step to reproduce:
- branches: master / Part25/ImproovingNavigation+BugFix
- fully delete app from device
- install app
- pass onboarding
- call onBackPress on the main page
the app works, it is correctly installed on the device, but gives this error inherent to build.gradle.kts files
java.lang.AssertionError: Number of arguments should not be less than number of parameters, but: parameters=5, args=4
at org.jetbrains.kotlin.types.IndexedParametersSubstitution.<init>(TypeSubstitution.kt:119)
at org.jetbrains.kotlin.types.IndexedParametersSubstitution.<init>(TypeSubstitution.kt:113)
at org.jetbrains.kotlin.types.IndexedParametersSubstitution.<init>(TypeSubstitution.kt:127)
at org.jetbrains.kotlin.types.TypeConstructorSubstitution$Companion.create(TypeSubstitution.kt:99)
at org.jetbrains.kotlin.types.KotlinTypeFactory.computeMemberScope(KotlinTypeFactory.kt:57)
at org.jetbrains.kotlin.types.KotlinTypeFactory.simpleType(KotlinTypeFactory.kt:90)
at org.jetbrains.kotlin.types.KotlinTypeFactory.simpleType$default(KotlinTypeFactory.kt:77)
at org.jetbrains.kotlin.serialization.deserialization.TypeDeserializer.simpleType(TypeDeserializer.kt:126)
at org.jetbrains.kotlin.serialization.deserialization.TypeDeserializer.type(TypeDeserializer.kt:68)
at org.jetbrains.kotlin.serialization.deserialization.descriptors.DeserializedClassDescriptor$DeserializedClassTypeConstructor.computeSupertypes(DeserializedClassDescriptor.kt:240)
at org.jetbrains.kotlin.types.AbstractTypeConstructor$supertypes$1.invoke(AbstractTypeConstructor.kt:78)
at org.jetbrains.kotlin.types.AbstractTypeConstructor$supertypes$1.invoke(AbstractTypeConstructor.kt:77)
at org.jetbrains.kotlin.storage.LockBasedStorageManager$LockBasedLazyValue.invoke(LockBasedStorageManager.java:408)
at org.jetbrains.kotlin.storage.LockBasedStorageManager$LockBasedLazyValueWithPostCompute.invoke(LockBasedStorageManager.java:481)
at org.jetbrains.kotlin.storage.LockBasedStorageManager$LockBasedNotNullLazyValueWithPostCompute.invoke(LockBasedStorageManager.java:512)
at org.jetbrains.kotlin.types.AbstractTypeConstructor.getSupertypes(AbstractTypeConstructor.kt:27)
at org.jetbrains.kotlin.serialization.deserialization.descriptors.DeserializedClassDescriptor$DeserializedClassMemberScope.getNonDeclaredFunctionNames(DeserializedClassDes...
For some reason, no matter what I do the resources placed in core never becomes available to me.
- I create the resource folder
- I create a values folder
- I move strings.xml in there
- Never become available to me
after bugfix-part1(final lesson) All tracked foods are shown in the breakfast category
Even if I added food to lunch, dinner, and snacks through the add button, all the tracked foods go in the breakfast's expanded meal and the total calories are added in the breakfast too,
Make use of compose destinations?
You recently mentioned compose destinations:
https://github.com/raamcosta/compose-destinations
Is it possible to refactor this project to use it?
Are there any limitations to using it in a multi module project?
[UnitTest] Unsupported class file major version 62
To fix this It was necessary upgrade mockk version:
mockkVersion = "1.13.8"
that's it.
From version 1.13.0 MockK supports Kotlin 1.4 and higher
End to End tests fail in the more recent compose versions
Hello Philipp,
I've really enjoyed this course, congrats.
I've been upgrading the dependencies on this project to test something, and when I upgrade:
Gradle to 7.2.1
Kotlin to 1.6.21
Compose to 1.2.0-beta03
When running the TrackerOverviewE2E tests I get the following error:
com.plcoding.calorytracker.MainActivity@24abf32 has already set content. If you have populated the Activity with a ComposeView, make sure to call setContent on that ComposeView instead of on the test rule; and make sure that that call to
setContent {} is done after the ComposeTestRule has run at androidx.compose.ui.test.AndroidComposeUiTestEnvironment$AndroidComposeUiTestImpl.setContent(ComposeUiTest.android.kt:470) at androidx.compose.ui.test.junit4.AndroidComposeTestRule.setContent(AndroidComposeTestRule.android.kt:200) at com.plcoding.calorytracker.TrackerOverviewE2E.setUp(TrackerOverviewE2E.kt:101)
Cause: org.gradle.api.internal.initialization.DefaultClassLoaderScope@3f774d2b must be locked before it can be used to compute a classpath
Hi,
Does anyone experience this issue with Gradle when trying to run the project and have a solution?
Could not determine the dependencies of task ':app:mergeDebugAssets'.
> Could not resolve all dependencies for configuration ':app:debugRuntimeClasspath'.
> A problem occurred configuring project ':onboarding:onboarding_presentation'.
> org.gradle.api.internal.initialization.DefaultClassLoaderScope@3f774d2b must be locked before it can be used to compute a classpath!
I haven't tried other branches but I experience it so far with https://github.com/philipplackner/CalorieTracker/tree/Part2/Migrating_to_Gradle_Kotlin_DSL and with Android Studio 2020.3.1 and 2021.1.1. Any idea?
Requires: com.linkedin.dexmaker:dexmaker or MockK could not self-attach on E2E test
The first issue was that the current version of mockk private const val mockkVersion = "1.10.0"
was throwing this error when running the E2E Test which was solved using a newer version of mockk as stated in here
Requires: com.linkedin.dexmaker:dexmaker
mockk/mockk#1000
Mine selected version was
private const val mockkVersion = "1.11.0"
Then after this the next error was this one
_
java.lang.ExceptionInInitializerError
at com.example.calorietracker.TrackerOverviewE2E.setUp(TrackerOverviewE2E.kt:319)
... 56 trimmed
Caused by: io.mockk.proxy.MockKAgentException: MockK could not self-attach a jvmti agent to the current VM. This feature is required for inline mocking.
This error occured due to an I/O error during the creation of this agent: java.io.IOException: Unable to dlopen libmockkjvmtiagent.so: dlopen failed: library "libmockkjvmtiagent.so" not foundPotentially, the current VM does not support the jvmti API correctly
_
which was fixed doing this as stated in here
mockk/mockk#297
mine was fixed adding this to the app module dependency only
implementation("com.github.wseemann:FFmpegMediaMetadataRetriever-core:1.0.15")
implementation("com.github.wseemann:FFmpegMediaMetadataRetriever-native:1.0.15")
feel free to add it to buildSrc as a more clean approach
End-to-End Test .isTrue() code is missed
TrackerOverviewE2E.kt
line 213
assertThat(
navController
.currentDestination
?.route
?.startsWith(Route.TRACKER_OVERVIEW)
).isTrue() // <-- need to add
About Clean Architecture, why does usecase access preferences?
First of all, no offense.
Really great lecture over all!
How about rather creating datasources, and inject into repositories?
so usecases only have dependency on repository interfaces, and repositories use datasources to get data from preferences.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.