google-developer-training / android-basics-kotlin-dessert-clicker-app Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
In which task and step of the codelab can this issue be found?
Task: Stages of the activity lifecycle
Step: 2) App overview
Describe the problem
The starter code given is actually the completed code.
In which task and step of the codelab can this issue be found?
Please check the above url, it will open the exact step of the codelab.
Describe the problem
The following statement seems wrong:-
"onCreate() to create the app"
onCreate of activity class will create an object of the activity class.
URL of codelab
https://developer.android.com/codelabs/basic-android-kotlin-training-activity-lifecycle
In which task and step of the codelab can this issue be found?
3 (Explore the lifecycle methods and add basic logging)
Describe the problem
When overriding onDestroy()
, the call to super.onDestroy()
has to be at the very end of the method; otherwise, we don't see any logging.
So, the correct code would be:
override fun onDestroy() {
Log.d(TAG_LIFECYCLE, "onDestroy called")
super.onDestroy()
}
Steps to reproduce?
onDestroy()
as stated in the codelabonDestroy()
can be found in LogcatVersions
Android Studio version: Android Studio Bumblebee | 2021.1.1 RC 1
API version of the emulator: tested on a physical device (Pixel 5, Android 12)
URL of codelab
https://developer.android.com/codelabs/basic-android-kotlin-training-activity-lifecycle
In which task and step of the codelab can this issue be found?
2. App Overview
3.
Describe the problem
MainActivity.kt, the first line of onShare() is:
val shareIntent = ShareCompat.IntentBuilder.from(this)
The word "from" is shown with a strikethrough and there is a "Problem" that says
"'from(Activity): ShareCompat.IntentBuilder' is deprecated. Deprecated in Java"
This does not prevent the app from running, but should be updated.
Steps to reproduce?
In which task and step of the codelab can this issue be found?
It says "Note: A good convention is to declare a TAG constant in your class:
const val TAG = "MainActivity""
Describe the problem
Android Studio complains that it is only allowed to use const modifier in companion object or top level. So the declaration should not be IN the class but before (or using a companion object).
Steps to reproduce?
none
Versions
_Android Studio version:Build #AI-213.7172.25.2113.9014738, built on August 31, 2022
_API version of the emulator:31.3.11-9058569
Android Studio Dolphin | 2021.3.1
Build #AI-213.7172.25.2113.9014738, built on August 31, 2022
Runtime version: 11.0.13+0-b1751.21-8125866 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Windows 10 10.0
GC: G1 Young Generation, G1 Old Generation
Memory: 1280M
Cores: 8
Registry:
external.system.auto.import.disabled=true
ide.text.editor.with.preview.show.floating.toolbar=false
Additional information
Include screenshots if they would be useful in clarifying the problem.
In which task and step of the codelab can this issue be found?
Explore the lifecycle methods and add basic logging
Step 2: Implement the onStart() method
Describe the problem
The shortcut to open Override Members in Android Studio on Mac is Control+o, not Command+o.
In which task and step of the codelab can this issue be found?
In the question #2 :
Given the following code, what is the result of oneWordCities[1]?
val cities = listOf(“Jeddah”, “Bengaluru” “Shenzhen”, “Abu Dhabi”, “Mountain View”, “Tripoli”, “Bengaluru”, “Lima”, “Mandalay”, “Tripoli”)
val oneWordCities = cities.toSet().toList().filter { !it.contains(“ “)}.sorted()
Describe the problem
Steps to reproduce?
Error on my end, fixed!
In which task and step of the codelab can this issue be found?
Usecase 1, step 3
Describe the problem
Destroy method isn't called after I press back button in app.
Steps to reproduce?
Versions
Android Studio version: Runtime version: 11.0.13+0-b1751.21-8125866 amd64
API version of the emulator: Pixel_3a_API_33_x86_64
Additional information
Include screenshots if they would be useful in clarifying the problem.
In which task and step of the codelab can this issue be found?
7. In onCreate(), in the block that restores the state from the bundle, call showCurrentDessert()
Describe the problem
if call showCurrentDessert() in onCreate(), app will crash when change orientation. the correct place to add this line of code should be onStart(), or onResume()
Steps to reproduce?
Versions
Android Studio version: Bumblebee
API version of the emulator: API 29
Additional information
Include screenshots if they would be useful in clarifying the problem.
URL of codelab
https://developer.android.com/codelabs/basic-android-kotlin-training-activity-lifecycle?continue=https%3A%2F%2Fdeveloper.android.com%2Fcourses%2Fpathways%2Fandroid-basics-kotlin-unit-3-pathway-1%3Fauthuser%3D1%23codelab-https%3A%2F%2Fdeveloper.android.com%2Fcodelabs%2Fbasic-android-kotlin-training-activity-lifecycle&authuser=1#4
In which task and step of the codelab can this issue be found?
rotation of the app : no change in the app
Describe the problem
the problem is that the training says that the output in Logcat. Filter the output on MainActivity is not changing .
Steps to reproduce?
Versions
Android Studio version:
API version of the emulator:
Additional information
Include screenshots if they would be useful in clarifying the problem.
Inside Use case 3: Partially hide the activity section, last paragraphs to be specific.
The codelab doesn't clearly explain how and why the execution of onPause()
lasts for short period of time as it only states, as I quote:
The interruption with only onPause() usually lasts a short time before returning to your activity or navigating to another activity or app.
It is also not clear how the codes inside onPause()
blocks other things from displaying as it also states:
Whatever code runs in onPause() blocks other things from displaying, so keep the code in onPause() lightweight. For example, if a phone call comes in, the code in onPause() may delay the incoming-call notification.
URL of codelab
https://github.com/google-developer-training/android-basics-kotlin-dessert-clicker-app.git
In which task and step of the codelab can this issue be found?
NAVIGATION/NAVIGATE BETWEEN SCREENS/Stages of the activity lifecycle/a starter app called DessertClicker
Describe the problem
It doesn't work if I solve problem another problem come in
Invoke-customs are only supported starting with Android O (--min-api 26) that is first one
Steps to reproduce?
Versions
Android Studio version: 4.1.2
API version of the emulator: Android 10
Additional information
Include screenshots if they would be useful in clarifying the problem.
URL of codelab
Stages of App lifecycle - App overview
In which task and step of the codelab can this issue be found?
I found a compatibility issue when try to build and run the project.
Describe the problem
When I downloaded the project and tried to run it, the app would work. Instead, the Android Studio prompt an error in the "Build" dialog.
Steps to reproduce?
Versions
Android Studio version: 4.2
API version of the emulator: 30
Addressing the problem
Solution A: download Android SDK Build-Tools 29.0.2
1.1 Step I: Open File > Settings
1.2 Step II: Select Appearance & Behavior > System Settings > Android SDK
1.3 Step III: Follow the steps in picture and make sure that check "29.0.2"
1.4 Step IV: the app should be running without any problem.
Solution B: Specified in the file build.gradle (switch to Android from Project and File path: "Gradle Scripts > build.gradle(Module: Dessert_Clicker_app)")
2.1 Step I: find andorid {...}
2.2 Step II: add "buildToolsVersion ${current build tool version}" under the line of "compileSdkVersion 30"
2.3. Step III: Tab "Sync" on top of the editor as the line finished
2.4. Step VI: run the app, it sould be working
In which task and step of the codelab can this issue be found?
In 4th step of codelab
Describe the problem
In these sentences, instead of onCreate(), onStart() method should be used.
So what about onRestart()? The onRestart() method is much like onCreate(). Either onCreate() or onRestart() is called before the activity becomes visible. The onCreate() method is called only the first time, and onRestart() is called after that. The onRestart() method is a place to put code that you only want to call if your activity is not being started for the first time.
Steps to reproduce?
Versions
Android Studio version:
API version of the emulator:
Additional information
Include screenshots if they would be useful in clarifying the problem.
In which task and step of the codelab can this issue be found?
Use onSaveInstanceState() to save bundle data
Step 5 needs indentation.
Describe the problem
The instructions are all indented, except for #5.
Steps to reproduce?
Versions
Android Studio version:
API version of the emulator:
Additional information
Include screenshots if they would be useful in clarifying the problem.
URL of codelab
https://developer.android.com/codelabs/basic-android-kotlin-training-activity-lifecycle#2
In which task and step of the codelab can this issue be found?
Task 3 - Explore the lifecycle methods and add basic logging
Step 2 > In Android Studio, with MainActivity.kt open and the cursor within the MainActivity class, select Code > Override Methods or press Control+o (Command+o on Mac). A dialog appears with a huge list of all the
Describe the problem
In the mentioned step it mentions that the "Override Methods" can be opened via Command+O on Mac but the shortcut is Control+O on Mac as well.
Steps to reproduce?
Versions
Android Studio version: Android Studio 4.2.1
API version of the emulator:
Additional information
Include screenshots if they would be useful in clarifying the problem.
In which task and step of the codelab can this issue be found?
Task 5
Describe the problem
It says : "Data loss on device rotation", but I tried this and there were no log entries or data loss on device rotation. I tried this using emulator
Steps to reproduce?
Versions
Android Studio version:
API version of the emulator:
Additional information
Include screenshots if they would be useful in clarifying the problem.
In which task and step of the codelab can this issue be found?
3
Describe the problem
onStop and onDestroy is actually not called in my android studio
Steps to reproduce?
Versions
_Android Studio version: Android Studio Bumblebee 2021.1.1 Canary 2
_API version of the emulator: Pixel XL API Sv
Additional information
Include screenshots if they would be useful in clarifying the problem.
URL of codelab
https://github.com/google-developer-training/android-basics-kotlin-dessert-clicker-app
In which task and step of the codelab can this issue be found?
Describe the problem
Doesn't work with jdk-15.0.1, only with jdk-13.0.2.
It's important to inform the user,
Versions
Android Studio version: 4.1.2
In which task and step of the codelab can this issue be found?
In 4th task : Explore lifecycle usecases
Describe the problem
It says "using the Back button causes the activity (and the app) to be entirely closed" but it's not really happening when we use back button and again go to the activity using overview screen (recent apps) then it calls restart (onRestart()) method but not onCreate() method as specified in codelab.
Steps to reproduce?
Versions
Android Studio version: Dolphin 2021.3.1 Patch 1
API version of the emulator: API 31
Additional information
Include screenshots if they would be useful in clarifying the problem.
In which task and step of the codelab can this issue be found?
App overview
Describe the problem
Build error:
Failed to install the following Android SDK packages as some licences have not been accepted.
build-tools;29.0.2 Android SDK Build-Tools 29.0.2
To build this project, accept the SDK license agreements and install the missing components using the Android Studio SDK Manager.
Alternatively, to transfer the license agreements from one workstation to another, see http://d.android.com/r/studio-ui/export-licenses.html
Using Android SDK: /Users/thaz/Library/Android/sdk
Steps to reproduce?
Android Studio 4.1.1
Build #AI-201.8743.12.41.6953283, built on November 5, 2020
Runtime version: 1.8.0_242-release-1644-b3-6915495 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.13.6
GC: ParNew, ConcurrentMarkSweep
Memory: 2014M
Cores: 4
Registry: ide.new.welcome.screen.force=true, external.system.auto.import.disabled=true
Non-Bundled Plugins: com.thoughtworks.gauge, com.vladsch.idea.multimarkdown, com.intellij.marketplace, org.jetbrains.kotlin
android-basics-kotlin-dessert-clicker-app
Press on "Run App" creates a build error.
Versions
Android Studio version: 4.1.1
API version of the emulator: ? App sent to physical device: Xiomi Redimi Note 7
I don't know why but following steps fixes it:
Go to: build.gradle (Module: Dessert_Clicker.app)
Add: buildToolsVersion "30.0.3"
inside android {}
android {
compileSdkVersion 30
buildToolsVersion "30.0.3"
defaultConfig {
applicationId "com.example.android.dessertclicker"
minSdkVersion 19
targetSdkVersion 30
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
buildFeatures {
dataBinding true
}
}
The issue can be found on step 4 of the codelab.
Basically the codelab must be updated to new Android 12 behavior. In fact when the back button is pressed the onDestroy() method is no longer called.
Android Studio version: Android Studio Chipmunk
API version of the emulator: Android 12 (API 31)
URL of codelab
https://developer.android.com/codelabs/basic-android-kotlin-training-activity-lifecycle?continue=https%3A%2F%2Fdeveloper.android.com%2Fcourses%2Fpathways%2Fandroid-basics-kotlin-unit-3-pathway-1%23codelab-https%3A%2F%2Fdeveloper.android.com%2Fcodelabs%2Fbasic-android-kotlin-training-activity-lifecycle#4
In which task and step of the codelab can this issue be found?
Part 5 explore configuration changes
Describe the problem
Data loss on device rotation
The app works fine from 0 to 5 but when the image change, from 6 or more the app stop working
Steps to reproduce?
Versions
Android Studio version:
API version of the emulator:
Additional information
Include screenshots if they would be useful in clarifying the problem.
In which task and step of the codelab can this issue be found?
Explore configuration changes
Describe the problem
App does not support rotating screen. Stays in protrait mode.
Steps to reproduce?
Go to...
override fun onSaveInstanceState(outState: Bundle) {
super.onSaveInstanceState(outState)
Log.d(TAG, "onSaveInstanceState Called")
}
Run the app
Click on... cupcake a few times
Rotate the device (emulator, Pixel 6 API 30)
Nothing happens
Versions
Android Studio version: Electric Eel|2022.1.1
Build #AI-221.6008.13.2211.9477386, built on January 10, 2023
Runtime version: 11.0.15+0-b2043.56-8887301 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
API version of the emulator: (emulator, Pixel 6 API 30)
Additional information
Include screenshots if they would be useful in clarifying the problem.
In which task and step of the codelab can this issue be found?
bulding the app
Describe the problem
i sownlaod the app normaly from GitHub then opened it in android studio arctic fox
then the app won't build cause the gradel version is old so every time i have toc change to the newer version
Steps to reproduce?
Versions
Android Studio version: arctic fox 2020.3
API version of the emulator:
Additional information
Include screenshots if they would be useful in clarifying the problem.
In which task and step of the codelab can this issue be found?
Step 2: Implement the onStart() method > Step 1.
Describe the problem
While the steps suggest we open the Override Members screen and find the onStart() member, I cannot find it in the list.
Versions
Android Studio Bumblebee | 2021.1.1 Patch 2
Build #AI-211.7628.21.2111.8193401, built on February 16, 2022
Runtime version: 11.0.11+9-b60-7590822 amd64
VM: OpenJDK 64-Bit Server VM by Oracle Corporation
Windows 10 10.0
GC: G1 Young Generation, G1 Old Generation
Memory: 1280M
Cores: 8
Registry: external.system.auto.import.disabled=true
Non-Bundled Plugins: org.jetbrains.kotlin (211-1.6.10-release-923-AS7442.40), org.intellij.plugins.markdown (211.7142.37)
In which task and step of the codelab can this issue be found?
4. Explore lifecycle use cases, Use case 1, Step 4
Describe the problem
emulator shows no apps in the Overview. Restarting Dessert app from Home does nothing.
Steps to reproduce?
Follow web page instructions for steps 1,2,3.
Versions
Android Studio version: 4.1.2
API version of the emulator: ???
Pixel 2 API30 device
Additional information
Include screenshots if they would be useful in clarifying the problem.
In which task and step of the codelab can this issue be found?
module 4 Stages of the activity lifecycle
step 4/5 of the codelab
Describe the problem
formatting issues.
the start of step 5 is part of step 4's end , just after transaction too large error.
URL of codelab
https://developer.android.com/codelabs/basic-android-kotlin-training-activity-lifecycle
In which task and step of the codelab can this issue be found?
Step 4
Describe the problem
The onDestroy()
event handler never got triggered when clicking the "Back" icon in the emulator, and even when removing the app from the recent apps,
Steps to reproduce?
Versions
Android Studio version: Chipmunk | 2021.2.1
API version of the emulator: 31.2.10-8420304
About Android Studio
Android Studio Chipmunk | 2021.2.1
Build #AI-212.5712.43.2112.8512546, built on April 28, 2022
Runtime version: 11.0.12+7-b1504.28-7817840 amd64
VM: OpenJDK 64-Bit Server VM by Oracle Corporation
Windows 10 10.0
GC: G1 Young Generation, G1 Old Generation
Memory: 1280M
Cores: 16
Registry: external.system.auto.import.disabled=true
Non-Bundled Plugins: org.jetbrains.kotlin (212-1.7.0-release-281-AS5457.46)
Additional information
Include screenshots if they would be useful in clarifying the problem.
In which task and step of the codelab can this issue be found?
Step 4
Describe the problem
In Use case 1, in step 4, it says: "Notice that none of the DessertClicker logs from the previous activity has been retained."
But I found out that these Logs are retained on logcat.
Also it says: "Note: The key point here is that onCreate() and onDestroy() are only called once during the lifetime of a single activity instance: onCreate() to initialize the app for the very first time, and onDestroy() to clean up the resources used by your app."
But onCreate and onDestroy were called many times as shown in the screenshot
only the information is reset: desserts sold and price
Steps to reproduce?
Versions
Android Studio version:
API version of the emulator:
Additional information
Include screenshots if they would be useful in clarifying the problem.
In which task and step of the codelab can this issue be found?
In step 3 of the Stages of the activity lifecycle.
Describe the problem
There is a note to create a const val called TAG and assign it a value of MainActivity in the class.
This needs to be done outside of the MainActivity Class. When you create this in the class you produce the error,
"Const 'val' are only allowed on top level or in objects"
Steps to reproduce?
Versions
Android Studio version: 2020,31 Patch 4
API version of the emulator: does not matter.
Additional information
To resole: just move the statement below the import statements and above the class declaration
In which task and step of the codelab can this issue be found?
Step 1, Task 6
Describe the problem
Logcat isn't same in tutorial and in Android Studio Dolphin | 2021.3.1 Patch 1
image: https://prnt.sc/Au6v6DeDgcH3
Steps to reproduce?
Versions
Android Studio version: 2021.3.1 Patch 1
API version of the emulator:
Additional information
Include screenshots if they would be useful in clarifying the problem.
Step 5
Website is missing a line break before '5.' so it is at the end of the last paragraph of step 4.
In which task and step of the codelab can this issue be found?
Explore Configuration Changes
Describe the problem
While calling showCurrentDessert() method form onCreate() method when I rotate device's screen it only updates the image.
So I tried calling onDessertClicked() method instead of showCurrentDessert() it both updates the image, Desserts Sold and
the price but it increments the Dessert Sold and price each time I rotate the device screen.
Steps to reproduce?
Versions
Android Studio version:
Android Studio 4.1.1
API version of the emulator:
Using the actual device running on android pie
Additional information
Include screenshots if they would be useful in clarifying the problem.
In which task and step of the codelab can this issue be found?
[5. Explore configuration changes]
Compile and run the app, and click the Home button to put it into the background. Notice that the onSaveInstanceState() callback occurs just after onPause() and onStop():
Describe the problem
my log shows the onSaveInstanceState() callback occurs between onPause and onStop, not after them as the codelab say
Steps to reproduce?
Versions
Android Studio version: Chipmunk | 2021.2.1 Patch 1
API version of the emulator: real device API 26
Additional information
Include screenshots if they would be useful in clarifying the problem.
URL of codelab
https://developer.android.com/codelabs/basic-android-kotlin-training-activity-lifecycle#4
In which task and step of the codelab can this issue be found?
"5. Explore configuration changes"
Describe the problem
Under section "Data loss on device rotation", step 2, we're instructed to rotate the device or emulator into landscape mode to observe a configuration change.
On my emulator, screen rotation was locked by default, preventing a true screen rotation (configuration change) from occurring, and resulting in no log messages. Since the device itself did rotate, I was momentarily confused.
Suggested:
Steps to reproduce?
Expected
Actual
Additional information
The device itself does rotate, so I believed I had followed the instructions correctly:
3 Step2.1 onStart()
onStart isn't in the list of override members. Has been deprecated. You should probably update this with the replacement.
In which task and step of the codelab can this issue be found?
Describe the problem
In Android Studio Flamingo, LogCat interface has completly changed for filtering logs
Steps to reproduce?
Versions
Android Studio version:
API version of the emulator:
Additional information
Include screenshots if they would be useful in clarifying the problem.
In which task and step of the codelab can this issue be found?
5. Explore configuration changes
Use onCreate() to restore bundle data
Step 7
Describe the problem
The if clause:
if (savedInstanceState != null) {
revenue = savedInstanceState.getInt(KEY_REVENUE, 0)
dessertsSold = savedInstanceState.getInt(KEY_DESSERT_SOLD, 0)
showCurrentDessert()
}
have to be after the binding:
binding = DataBindingUtil.setContentView(this, R.layout.activity_main)
otherwise the App will break, if you rotate it.
In which task and step of the codelab can this issue be found?
Use onCreate() to restore bundle data
Describe the problem
Instruction code is missing nullable declaration. Should be:
override fun onCreate(savedInstanceState: Bundle?) {
Steps to reproduce?
N/A
Versions
N/A
It seems little difficult to understand the meaning of the following sentence even after reading 2-3 times:
"As a user navigates between activities in your app (and into and out of your app), those activities each transition between different states in the activity lifecycle."
As a reference, I am mentioning that, I have scored 8 in IELTS Reading, and I read English everyday.
Version: Last updated Jan 29, 2022
I believe, like other sentences, more clarity is possible to achieve in the above mentioned sentence.
Thank you.
URL of codelab
https://developer.android.com/codelabs/basic-android-kotlin-training-activity-lifecycle#4
In which task and step of the codelab can this issue be found?
Data loss on device rotation
Describe the problem
After changes to device orientation on the AVD, the lifecycle methods are not called. On the other hand, when the app is run on an actual device, the lifecycle methods are called, as stated in the webpage.
Steps to reproduce?
As stated above.
Versions
Android Studio version: 4.2.1
API version of the emulator: 30
Additional information
Nil.
In which task and step of the codelab can this issue be found?
4
Describe the problem
back button doesn't call onDestroy() function as said in the codelab
Steps to reproduce?
Versions
Android Studio version:
API version of the emulator:
Additional information
Include screenshots if they would be useful in clarifying the problem.
In which task and step of the codelab can this issue be found?
3. Explore the lifecycle methods and add basic logging
Describe the problem
NOT A REAL PROBLEM!! But I wasted some time on this and had to google for the answer I would like to save others from same issue. Basically my emulator (pixel 5) doesn't have auto rotation on by default. So when the lab says
"Note: As you experiment with your device and observe the lifecycle callbacks, you might notice unusual behavior when you rotate your device. You'll learn about that behavior later in this codelab."
That is misleading. No matter how many times you click the rotate left or rotate right buttons in the emulator, nothing happens!! The only fix is to go into settings on the emulator in display and turn on auto-rotating. Then yes, the lab makes more sense #42
Steps to reproduce?
Versions
Android Studio Chipmunk | 2021.2.1 Patch 1
Build #AI-212.5712.43.2112.8609683, built on May 18, 2022
Runtime version: 11.0.12+0-b1504.28-7817840 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 10.15.7
GC: G1 Young Generation, G1 Old Generation
Memory: 2048M
Cores: 4
Registry: external.system.auto.import.disabled=true
Non-Bundled Plugins: Dart (212.5744), org.intellij.plugins.markdown (212.5457.16), org.jetbrains.kotlin (212-1.7.10-release-333-AS5457.46), io.flutter (69.0.2)
Additional information
Include screenshots if they would be useful in clarifying the problem.
In which task and step of the codelab can this issue be found?
Under "Stages of the activity lifecycle" => "Explore the lifecycle methods and add basic logging" => "Step 1: Examine the onCreate() method and add logging" => "6. In the Logcat window, type D/MainActivity into the search field."
Describe the problem
Given Logcat has changed (New Logcat), the instructions on using Logcat are out-of-date and no longer work.
Steps to reproduce?
Versions
Android Studio Dolphin | 2021.3.1 Patch 1
Additional information
Here's the filter command I used to see the expected output
In which task and step of the codelab can this issue be found?
7. In onCreate(), in the block that restores the state from the bundle, call showCurrentDessert():
Describe the problem
the application crashes when you flip the screen after changing the picture
Steps to reproduce?
Versions
Android Studio version:
API version of the emulator:
Additional information
Include screenshots if they would be useful in clarifying the problem.
In which task and step of the codelab can this issue be found?
"Stages of the activity lifecycle" -> Step #3 (Explore the lifecycle methods and add basic logging)
Describe the problem
The onDestroy log is never emitted -- should be logged before calling super class (similarly of all "close" activities for more correctness)
These should be as follows (in particular, onDestroy() otherwise the log isn't emitted)
override fun onPause() {
Log.d(TAG, "onPause Called")
super.onPause()
}
override fun onStop() {
Log.d(TAG, "onStop Called")
super.onStop()
}
override fun onDestroy() {
Log.d(TAG, "onDestroy Called")
super.onDestroy()
}
Steps to reproduce?
Follow the lab -- note that onDestroy log is never emitted to Logcat
Versions
Android Studio version: 2021.2.1 Patch 1
API version of the emulator: (n/a -- running on real device, Android 12, Pixel 6)
Additional information
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.