Giter Site home page Giter Site logo

calorietracker's People

Contributors

philipplackner avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

calorietracker'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

Internal Error occurred while analyzing this expression:
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...

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 found

Potentially, 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

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 photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.