udacity / andfun-kotlin-dessert-pusher Goto Github PK
View Code? Open in Web Editor NEWLicense: Other
License: Other
savedInstanceState
will always remain null after the app is killed. It is not passed on to the bundle.
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
if (savedInstanceState != null) { ... }
}
This bug exists since 5 years and Google has decided not to fix this anymore in 2020:
https://issuetracker.google.com/issues/37020082
As also discussed here on StackOverflow: https://stackoverflow.com/questions/6554317/savedinstancestate-is-always-null
I'm learning Android right now and find that quite a strange decision from Google. I hope there are other ways to persist the data and retrieve it at app start.
kill didn't work for me, only force-stop. What is the difference and why did kill not work?
adb shell am force-stop com.example.android.dessertpusher
Hey folks, I just started with this lesson and I had a lot of issues getting the app build. I initially checked out the starter-code
and went down a rabbit hole trying it to get the build and eventually gave up.
A coworker helped me and got the master
branch to run, but I had to tweak both the compileSdkVersion
and targetSdkVersion
to version 34, up from 31
Android Studio info:
Android Studio Hedgehog | 2023.1.1 Patch 1
Build #AI-231.9392.1.2311.11255304, built on December 26, 2023
Runtime version: 17.0.7+0-17.0.7b1000.6-10550314 aarch64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 14.1.2
GC: G1 Young Generation, G1 Old Generation
Memory: 3072M
Cores: 10
Metal Rendering is ON
Registry:
external.system.auto.import.disabled=true
ide.text.editor.with.preview.show.floating.toolbar=false
Non-Bundled Plugins:
com.github.copilot (1.4.4.3955)
google-java-format (1.17.0.0)
idea.plugin.protoeditor (231.9225.5)
I was using JDK 17, the one bundled with Android Studio.
However the starter-code
branch fails, from the get go, with this error:
Unsupported Java.
Your build is currently configured to use Java 17.0.7 and Gradle 6.1.1.
Possible solution:
- Upgrade Gradle wrapper to 7.2 version and re-import the project
Diffing between master
and this branch helps, but without some Git-foo and my colleague's help it would have been a nightmare to get this to run.
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.