udacity / andfun-kotlin-guess-it Goto Github PK
View Code? Open in Web Editor NEWLicense: Other
License: Other
Error message is:
<snip>andfun-kotlin-guess-it-starter-code/app/build/generated/source/kapt/debug/androidx/databinding/library/baseAdapters/BR.java:3: error: package javax.annotation does not exist
import javax.annotation.Generated;
^
I'm using intellij rather than android studio because autocomplete and other functionality works!
IntelliJ IDEA 2021.1.3 (Community Edition)
Build #IC-211.7628.21, built on June 29, 2021
Runtime version: 11.0.11+9-b1341.60 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Linux 5.13.0-1-default
GC: ParNew, ConcurrentMarkSweep
Memory: 1923M
Cores: 12
Non-Bundled Plugins: Batch Scripts Support (1.0.12), CMD Support (1.0.5), com.intellij.javafx (1.0.3), org.jetbrains.kotlin (211-1.5.10-release-909-IJ7142.45)
Kotlin: 211-1.5.10-release-909-IJ7142.45
Current Desktop: KDE
ViewModelProviders is deprecated
@SudKul
Hello, firstly, thank you for writing the solutions. Following each commit has helped me to write cleaner code and understand the pertinent concepts better e.g. encapsulation.
For solution 08 I was wondering the reasoning behind 1) the onPlayAgainComplete() method and 2) storing the score as a LiveData.
It seems, to me, that once we navigate away from the scoreFragment, the scoreViewModel will be cleared anyway so changing the value of _eventPlayAgain to false is not meaningful i.e. the next viewModel being referenced won't be the same viewModel as before.
The score seems neither transient nor live, it is a value that is being passed from the previous fragment. Hence, why is it a good idea to store this value in the viewModel?
If there is a particular reason for this then I would love to be enlightened. If it's good coding practice then I will take it in good faith. Thanks once again for your help so far.
Hi,
After the optional lesson's (haptic feedback) code is installed, the application terminates abruptly after "Play" is clicked. No logcat details reported. Please help.
Thanks.
Vasan S T
The starter-code branch is totally out of date.
The main issue is that it's build.gradle
files still has references to the old android.arch.navigation
packages instead of the new androidx.navigation
ones and thus the app crashes a lot.
I suggest upgrading it with the versions from the master branch.
steps to recreate Bug:
andfun-kotlin-guess-it/app/build.gradle
Line 66 in c3f56e3
// Navigation
// implementation "android.arch.navigation:navigation-fragment-ktx:1.0.0-rc02"
// implementation "android.arch.navigation:navigation-ui-ktx:1.0.0-rc02"
implementation "androidx.navigation:navigation-fragment-ktx:2.3.5"
implementation "androidx.navigation:navigation-ui-ktx:2.3.5"
Hello,
it seems that I cant' use GameFragmentBinding, ScoreFragmentBinding, and TitleFragmentBinding.
I can't find the packages com.example.android.guesstheword.databinding in the code that I downloaded, neither on github.
How to get this right?
Thank you
Hi Team,
the steps are as follows to reproduce the issue,
Can anybody please tell me why it showing a red error. i have downloaded the zip file from udacity and i didn't change the any code but it's showing error.
private fun gameFinished() { val action = GameFragmentDirections.actionGameToScore(score) findNavController(this).navigate(action) }
so, when:
java.lang.IllegalStateException: no current navigation node
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.