Giter Site home page Giter Site logo

android-basics-kotlin-forage-app's People

Contributors

owenscott-gds avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar

android-basics-kotlin-forage-app's Issues

Android Basics: Forage app

When I start Testing my app I face this problem:
"Run Android instrumented tests using Gradle" option was ignored because this module type is not supported yet.

I tried to change the versions of the implementations and still not fixed and when I disabled "Run android instrumented tests using gradle" the error doesn't show again because the tests are not passing at all

Any solution !! ( I tried the app by my self and it's working)
Screenshot_20220929_144156

Android Basics: Forage app

page: link

typo in step 1:

private val viewModel: ForageableViewModel by activityViewModels {
   ForageableViewModelFactory(
       (activity?.application as BaseApplication).database.foragableDao()
   )
}

foragableDao should be forageableDao

Android Basics: Forage app

Dear Madam or Sir,

I am writing regarding the Quiz of this pathway (Use Room for data persistence), not the Project.
The reason I am using the Project Mistake Reporting System is because I could not find an option to report a mistake through the Quiz UI.

Question 3 in the Quiz asks why we need to use 'synchronized' when creating a database.
According to the attached screenshot from the codelab, the correct answers would be the first 2 options:

  1. synchronized() is used to avoid race conditions.
  2. synchronized() ensures only one thread can enter the block of code at once.

However, this is not the case in the Quiz.
According to the Quiz, the correct answers are:

  1. Doing so allows multiple copies of the database to be created.
  2. Calling synchronized() allows this code to be safely accessed from multiple threads at once.

I triple-checked the question, and I am pretty sure I am not required to select the FALSE answers.

What am I missing here?

Your help would be very much appreciated.

Thank you,
Ray T.

5Quiz3WhySyncronized

Android Basics: Forage app

Dear Experts,
In step 4 at codelab, It's said that " tableName = 'forageable_database' " . Could it be typo here ? Maybe table name can be "forageable" only.
1-Annotate the class using @Entity with the table name "forageable_database".

Codelab link: https://developer.android.com/codelabs/basic-android-kotlin-training-project-forage?continue=https%3A%2F%2Fdeveloper.android.com%2Fcourses%2Fpathways%2Fandroid-basics-kotlin-unit-5-pathway-2%23codelab-https%3A%2F%2Fdeveloper.android.com%2Fcodelabs%2Fbasic-android-kotlin-training-project-forage#3

In fact, the comment in Forageable.kt explains it.

/**
 * Forageable entity to be stored in the forageable_database.
 */

Android Basics: Forage app

private val viewModel: ForageableViewModel by activityViewModels {
ForageableViewModelFactory(
(activity?.application as BaseApplication).database.foragableDao()
)
}

->

private val viewModel: ForageableViewModel by activityViewModels {
ForageableViewModelFactory(
(activity?.application as BaseApplication).database.forageableDao()
)
}

Tutorial Instructions Not Clear

URL of codelab

In which task and step of the codelab can this issue be found?

Describe the problem
Tutorial instruction is not clear.

Steps to reproduce?

  1. Go to...
  2. Click on...
  3. See error...

Versions
Android Studio version:
API version of the emulator:

Additional information
Include screenshots if they would be useful in clarifying the problem.

Android Basics: Forage app

After lunching the app in Android Studio, I got a suggested Upgrades:
. Upgrade Gradle version to 7.3.3
. Upgrade Gradle plugins
. Upgrade AGP dependency from 4.1.1 to 7.2.1

I have Done that, then when I tried to Build the project I got an error.

1- After the recommended updates

then I searched for a solution I found this:

2 1- suggested solutions

Then I got another Error:

2 2- error 2

My SDK versions:

SDK versions

This is the Manifest File Error:
Screenshot 2022-06-07 145731

InstrumentationTests not working

URL of codelab
https://developer.android.com/codelabs/basic-android-kotlin-training-project-forage

In which task and step of the codelab can this issue be found?
Step 5

Describe the problem
Tests do not run. Test Results show

"Run Android instrumented tests using Gradle" option was ignored because this module type is not supported yet.

Steps to reproduce?
Run any test from PersistenceInstrumentationTests

Versions
Android Studio version: Chipmunk 2021.2.1 Patch 2
API version of the emulator: 31

Additional information
Include screenshots if they would be useful in clarifying the problem.
Screen Shot 2022-09-05 at 5 58 13 PM

Delete button causes app to crash

URL of codelab
https://developer.android.com/codelabs/basic-android-kotlin-training-project-forage#0

In which task and step of the codelab can this issue be found?
Step 5

Describe the problem
The delete button on AddForageableFragment causes the app to crash. Immediately after deleting the forageable (and navigating back to ForageableListFragment, the onViewCreated method of AddForageableFragment gets called again returning a null object for the observed data ( "selectedForageable" becomes null)

viewModel.getForageable(id).observe(viewLifecycleOwner, Observer {
forageable = selectedForageable
bindForageable(forageable)
})

Thus, unless you check for the null

if (selectedForageable != null) {
forageable = selectedForageable
bindForageable(forageable)
}

the app will crash. This behaviour is different from the Inventory App of a prior code lab:

https://developer.android.com/codelabs/basic-android-kotlin-training-update-data-room

In the Inventory App, the onViewCreated method of ItemDetailFragment does not get called after deleting the item so there's no need to check for null on selectedItem. I suspect it has to do with the differences in navigation code between the two apps and I would like to know why.

Steps to reproduce?
delete any forageable

Versions
Android Studio version: Chipmunk 2021.2.1 Patch 2
API version of the emulator: 31

Additional information
Include screenshots if they would be useful in clarifying the problem.

Screen Shot 2022-09-05 at 5 42 34 PM

Android Basics: Forage app

Hi

I've completed Forage project step1 -5, but strugging to run the tests in step 6 of the Forage app project on both emulator (Pixel 5 API30) and physical device (pixel 6 pro API33).

Whenever I try to right click and run the PersistenceInstrumentationTests, the existing app that had been running on the device would crash and when I try to re-open the app, I'd get a blank screen. No error message thrown in Android Studio. See screenshot attached

This is the same regardless of whether I'm running the test in the original starter app with no modifications or running in my own version of the completed project. Not sure what I'm doing wrong, but any help is appreciated. Thanks

image

This is what I see before running the test:
Forage App after completing module project
This is what I get after running the test:
After running persistence test and then opening app

Test result pasted here

01/13 18:59:30: Launching 'PersistenceInstrumen... (1)' on Pixel 4 API 29.
Running tests

Configure project :app
WARNING:The option setting 'android.experimental.testOptions.emulatorSnapshots.maxSnapshotsForTestFailures=0' is experimental.

Task :app:preBuild UP-TO-DATE
Task :app:preDebugBuild UP-TO-DATE
Task :app:compileDebugAidl NO-SOURCE
Task :app:compileDebugRenderscript NO-SOURCE
Task :app:dataBindingMergeDependencyArtifactsDebug UP-TO-DATE
Task :app:dataBindingMergeGenClassesDebug UP-TO-DATE
Task :app:generateDebugResValues UP-TO-DATE
Task :app:generateDebugResources UP-TO-DATE
Task :app:mergeDebugResources UP-TO-DATE
Task :app:dataBindingGenBaseClassesDebug UP-TO-DATE
Task :app:dataBindingTriggerDebug UP-TO-DATE
Task :app:generateDebugBuildConfig UP-TO-DATE
Task :app:generateSafeArgsDebug UP-TO-DATE
Task :app:checkDebugAarMetadata UP-TO-DATE
Task :app:mapDebugSourceSetPaths UP-TO-DATE
Task :app:createDebugCompatibleScreenManifests UP-TO-DATE
Task :app:extractDeepLinksDebug UP-TO-DATE
Task :app:processDebugMainManifest UP-TO-DATE
Task :app:processDebugManifest UP-TO-DATE
Task :app:processDebugManifestForPackage UP-TO-DATE
Task :app:javaPreCompileDebug UP-TO-DATE
Task :app:preDebugAndroidTestBuild SKIPPED
Task :app:compileDebugAndroidTestAidl NO-SOURCE
Task :app:dataBindingMergeDependencyArtifactsDebugAndroidTest UP-TO-DATE
Task :app:dataBindingMergeGenClassesDebugAndroidTest UP-TO-DATE
Task :app:processDebugAndroidTestManifest UP-TO-DATE
Task :app:compileDebugAndroidTestRenderscript NO-SOURCE
Task :app:generateDebugAndroidTestResValues UP-TO-DATE
Task :app:generateDebugAndroidTestResources UP-TO-DATE
Task :app:mergeDebugAndroidTestResources UP-TO-DATE
Task :app:dataBindingGenBaseClassesDebugAndroidTest UP-TO-DATE
Task :app:generateDebugAndroidTestBuildConfig UP-TO-DATE
Task :app:checkDebugAndroidTestAarMetadata UP-TO-DATE
Task :app:mapDebugAndroidTestSourceSetPaths UP-TO-DATE
Task :app:processDebugAndroidTestResources UP-TO-DATE
Task :app:mergeDebugShaders UP-TO-DATE
Task :app:compileDebugShaders NO-SOURCE
Task :app:generateDebugAssets UP-TO-DATE
Task :app:mergeDebugAssets UP-TO-DATE
Task :app:compressDebugAssets UP-TO-DATE
Task :app:processDebugJavaRes NO-SOURCE
Task :app:checkDebugDuplicateClasses UP-TO-DATE
Task :app:desugarDebugFileDependencies UP-TO-DATE
Task :app:mergeExtDexDebug UP-TO-DATE
Task :app:mergeLibDexDebug UP-TO-DATE
Task :app:mergeDebugJniLibFolders UP-TO-DATE
Task :app:mergeDebugNativeLibs NO-SOURCE
Task :app:stripDebugDebugSymbols NO-SOURCE
Task :app:validateSigningDebug UP-TO-DATE
Task :app:writeDebugAppMetadata UP-TO-DATE
Task :app:writeDebugSigningConfigVersions UP-TO-DATE
Task :app:mergeDebugAndroidTestShaders UP-TO-DATE
Task :app:compileDebugAndroidTestShaders NO-SOURCE
Task :app:generateDebugAndroidTestAssets UP-TO-DATE
Task :app:mergeDebugAndroidTestAssets UP-TO-DATE
Task :app:compressDebugAndroidTestAssets UP-TO-DATE
Task :app:processDebugAndroidTestJavaRes NO-SOURCE
Task :app:mergeDebugAndroidTestJniLibFolders UP-TO-DATE
Task :app:mergeDebugAndroidTestNativeLibs NO-SOURCE
Task :app:javaPreCompileDebugAndroidTest
Task :app:checkDebugAndroidTestDuplicateClasses UP-TO-DATE
Task :app:desugarDebugAndroidTestFileDependencies UP-TO-DATE
Task :app:mergeExtDexDebugAndroidTest UP-TO-DATE
Task :app:mergeLibDexDebugAndroidTest UP-TO-DATE
Task :app:validateSigningDebugAndroidTest UP-TO-DATE
Task :app:writeDebugAndroidTestSigningConfigVersions UP-TO-DATE
Task :app:processDebugResources
Task :app:kaptGenerateStubsDebugKotlin UP-TO-DATE
Task :app:kaptDebugKotlin UP-TO-DATE
Task :app:compileDebugKotlin UP-TO-DATE
Task :app:compileDebugJavaWithJavac UP-TO-DATE
Task :app:mergeDebugJavaResource UP-TO-DATE
Task :app:bundleDebugClassesToCompileJar
Task :app:dexBuilderDebug
Task :app:mergeProjectDexDebug UP-TO-DATE
Task :app:packageDebug
Task :app:createDebugApkListingFileRedirect UP-TO-DATE
Task :app:kaptGenerateStubsDebugAndroidTestKotlin
Task :app:kaptDebugAndroidTestKotlin
Task :app:compileDebugAndroidTestKotlin
Task :app:compileDebugAndroidTestJavaWithJavac
Task :app:mergeDebugAndroidTestJavaResource UP-TO-DATE
Task :app:dexBuilderDebugAndroidTest UP-TO-DATE
Task :app:mergeProjectDexDebugAndroidTest UP-TO-DATE
Task :app:packageDebugAndroidTest UP-TO-DATE
Task :app:createDebugAndroidTestApkListingFileRedirect UP-TO-DATE
Connected to process 8397 on device 'emulator-5554'.
Task :app:connectedDebugAndroidTest

------------------------code in project has a error

URL of codelab
https://developer.android.com/codelabs/basic-android-kotlin-training-project-forage?hl=en#3

In which task and step of the codelab can this issue be found?

the code Google Development team has a error on the viewModelScope out of nowhere when I downloaded the project and I can't clear it

Describe the problem

See screenshot....

Screen Shot 2022-06-03 at 2 59 47 PM

Steps to reproduce?

  1. Go to...
  2. Click on...
  3. See error...

Versions
Android Studio version:
API version of the emulator:

Additional information
Include screenshots if they would be useful in clarifying the problem.

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.