[2023 latest] Android Studio + JDK11 installation and configuration one-stop
Article directory
1 JDK11
In fact, regarding the download and installation of JDK, the author has released 8 and 17 before [Original link: https://dingjiaxiong.blog.csdn.net/article/details/128883508 ], here is to cooperate with the installation of Android Studio One dragon, decided to do it again. [The version selected this time is JDK11]
1.1 JDK11 download
Oracle official website: https://www.oracle.com/
slide down
That's it, today is Sunday, February 26, 2023, and the latest version of JDK11 is 11.0.18
Log in to your Oracle account
preserved
OK, the download is complete.
1.2 JDK11 installation
Double-click to run the installer directly
Next step
The installation path is still the same as the author's previous style
Next step
OK, the installation is complete
1.3 Configure environment variables
In fact, you only need to change JAVA_HOME. If you don’t have one, create a new one.
After modifying things, save and verify
No problem, JDK11 installation is complete.
2 Android Studio
Android Studio is the official IDE tool provided by Google for Android, referred to as AS.
Android Studio is an Android development environment based on IntelliJ IDEA. In fact, IntelliJ IDEA has always been a very good IDE tool, just because IntelliJ IDEA is a commercial IDE tool (although there is also a free community exchange version, but the functions are relatively limited), thus affecting its wide application.
2.1 Download Android Studio
Official website download address: https://developer.android.google.cn/studio
download it directly
Today is February 26, 2023, and the latest version on the Android Studio official website is 2022.1.1.20
Wait for the download to complete
OK, the download is complete
2.2 Android Studio installation
Double-click to run the installer directly
next
Keep, the next step by default, [the tick is to install the Android emulator]
Modify the installation location according to actual needs, next
install!!
wait for completion
OK,next
Directly end the startup
Do not import any configuration, OK
Cool, changed the picture again
Do not send
Cancel
next
Custom installation, next
In this step, it uses our installation path, just keep the default, next
Personal preferences, choose a theme, next
In fact, you can do whatever you want here, and you can keep the default. The author prefers to use the real machine directly, next【Pay attention to modify the storage location】
Just OK
Here is to set the memory size for the Android emulator, the default is 2G, anyway, it is recommended not to exceed half of the computer memory, next [I am still used to using a real machine]
next
Accept both permissions, finish
just wait for it to finish
OK, stop here, just end
The installation is probably complete now
2.3 Hello World [Android version]
New Project
One thing to note here is that the Android Studio project is equivalent to the Eclipse workspace, and the Android Studio module Module is equivalent to the Eclipse project.
[So] The Android Studio project is equivalent to a large workspace. A workspace can contain multiple modules, and each module corresponds to an Android project.
[Big mouth] Android Studio projects can contain multiple Android projects (modules)
Select this empty Activity, next
finish
Wait for the download to complete
finish
Shallowly wait for it to load
In fact, we can see in the process that the Gradle version it uses by default is 7.5, which is very new
Good guy, I reported an error, fix it
It is obvious that the download timed out, so this problem is not surprising
Try to synchronize again [this thing is also related to that, if you have a global one, it will be very fast, if you don’t have it, try a few more times]
Persevere, if you pass this time, there will be no next time
If you get stuck on a certain dependency, stop refreshing
In fact, this thing seems complicated, but it is essentially a project created by the Gradle build tool we have learned.
While it is turning, simply modify the configuration of the IDE
modify font
case insensitive
uncommented italics
mouse wheel change font size
Sometimes if it is stuck, I also recommend restarting the IDE
Don't be discouraged by this little difficulty, it will be difficult later
We can change this to the JDK 11 we installed ourselves
Help, there are too many things to download in the new version, it didn’t feel that long before
what is this i don't know
Still got that, much sooner
Here I will not create a virtual device, and friends who need it can refer to my previous article https://dingjiaxiong.blog.csdn.net/article/details/125583782
Connect directly to the real device
Automatically detected here
Briefly explain the author's spare machine specially used for Android development.
developer options status
Android version
OK, run it directly
OK, that's it.