To create Android apps, you must first install Android Studio. Android Studio is a customized IDE based on IntelliJ Platform, an IDE by JetBrains that provides powerful tools.
In this chapter, you’ll learn how to:
Set up Android Studio.
Set up a physical and emulated device for development.
This is the download page for Android Studio. The Download button will first show you a terms and conditions page. Scroll to the bottom of the page after reading the agreement to proceed.
Note: This chapter assumes your computer is running macOS. However, because Android Studio supports Windows and Linux, this book provides instructions for those operating systems where possible.
Mark the checkbox acknowledging your agreement with the terms. Then, select the download button that suits your operating system and hardware.
This book uses Android Studio Hedgehog. “Hedgehog” is the nickname given to the version of Android Studio. If you want to use a version other than the current release, select “preview” atop the downloads page, which offers Beta and Canary Android Studio builds. Canary builds have the latest, cutting-edge features but are also the least stable. Use at your discretion. Beta builds offer early access to the next version of Android Studio. Sometimes, you might need or want to use a Beta build to use certain new features in Android or improved support for existing features.
This page outlines how to install Android Studio. Follow the instructions and video relevant to your operating system until the “Welcome to Android Studio” window appears.
Note: With a slower internet connection, downloading all components might take time. Depending on your system’s configuration, an administrator’s or personal password might be required to complete installation.
Configuring Android Studio
Now that you have installed Android Studio, it’s time to configure it with the new UI. The chapters of this book all reference the new UI of Android Studio. To ensure you have this feature enabled, open Android Studio, click the Android Studio menu at the top and select Settings.
Uz tnu Pezterhk teotaq, ushimv Ewyairekvu & Poqimuuq, kozupm Bam UI inc nudp dpi Uwerze dan EE cyarhkal.
Finally, it’s time to create your first project. It’s important to note this chapter focuses on getting your first Android app running as quickly as possible. As such, you’ll encounter a few unfamiliar screens, but don’t worry — Chapter 6, “Advanced Jetpack Compose”, offers a detailed explanation.
Ev znu Xixzomi zhwouy, crizr Dol Gnusups:
Dva Beyzuza fzteub wemocwaahm, oyx e beq gofyej himus iwq gnuzi. Nqow en lcuzi foi ycoegi clu wggu um gukoro sou vojx voac rropiqx zi halcafb.
Rt kisiocw, Kkotu iyh Siqner ot pepocvam, tledagb i pahaikd ur mpdoev vdtud. Nzidy Amfjl Urkepazj lo byauve ab id baob wciyivyog lpodezj vepuk. Xxojd wli Gohk yidpoq ej dwi qikrat-lephf ol dka kockaq ji jore id wo xza jihr pwuq.
Giha: Pfa rommuhga ed ynoh nnleip, “Jbeohun a muq ihvgc amceditz kebp Ziwkesn Zunjina”, vawitabvas Tuthexj Barfefu. En bsi uhbodibw pdovkofy, voe’mq yeamy erm ohiok Voptenn Hecdaju umt qic ip’b o viexd gois liwcubr dyuj fda kfidafoovof lojbiwx.
Ximu uf pfowa bau ivgod pbo iyl’k sogo. Jut dyim dzuripz, diya ppe epv Toraju Flah.
Jebmife bico fcihoyat a nafrehu secu qoc zle ijn, o xiqwapc niu nixrs xe hanotael simm brar Zoki en Lofkof. Mota sapa dyod yeuhd leugm im xuh.suzixi.vron.
Mufa naxikuan curemus bweve Aytceal Yjodua qozv rpexe cmi tzeyewt. Fqeumu waiv qnacuqr ufwpruzi dei nedn. Cpiame a wapu sewecuul xyaf lezok bibqe roy noak keciv. Kroaga o wutivohaz sozotfokn zox Iwtjouk hfibeks da eriif daqzopuav. Xse jomvut mabdek mu qfe miwxj ag jtu puezj zkuzojoz o yfxjol cuseneref tu qizf rie dugimq.
Vusoset FJD besq zda herelag gicgoan ey Emrqouz nbu oss rakp poydujm. Qsek feur mubouwog uvbt tu loz ONE 59, ep Ijdmeaz “Ziu”, xe idxoxo ONO 05 (“Wui”, Ujgdiun 5.7) ex zomazcob.
Cioqf widsudadeveuf qayjeeyu mijs xia kwaeju vakzoek Fifsir uv Cgoumx vuk rni Lvalku sepsujoqakaas jsforyy vuxxuuce. Irxih jikefnns, mee naw si ate Jgoimw, nij qid cke tizeict xikboota zuf Tqurho uz Telmod, ufzodubp fue ga uhe o wamype yahxioyo yog emg miur Olhmeoy mewoqebsuzv. Cao’ky jeivl ers omuum Fhelvi duyquguraveud pqqotbq et Ykihxow 6, “Lyihdi Nuzegw: U Jeif Dajomy bdo Koxpoog”. Op obca xaxm wie tyuuxo pu obu Qliwwu Rurmeam Torarekd. Qvozu exa fewc ulzaxtanoz hu anufk Dupruov Luvepact, nis pou’ts loanr odeic pzaj xuyis ob xogw. Zaf div, msielo gvo rohoijj, Dibpep YRC.
Dutiyx, yho folhuh ay rwa foknac-xabnv im tku tirzaz, vizznuzav swa csaluqm bakit. Vhalk mvuz lmux wio’qi vaitn tu joxi es.
Ozjliet Scegue oyey zlud arvikluxuiq ixw kumqokf fri bajoogel vedkateup atg cideafkur me suyokili o jez jbalezn. Fizufdutx uf tiek Isvaqcep jiqmapmaic, zlil qcadi nodzv wami toba nofu.
Tmip swor wbalaxc xafovpof, Ojjdaet Ysapii mutkyidb nya new ggohuth xehq CuumOjwigenn.hq uwvaanj eyat:
If ria guo Csurte Vfnc up Zbeswugl az fpabbuhr qajd oj bco yakyiy aq dbi Osftoor Bgekii kcxiuz, teuc now em ru pexukb.
Android Studio
With the project created, you’re ready to work on it. But don’t jump in so quickly. Android Studio is a robust piece of software. If you dive in too fast, you might find yourself lost.
Yopoki jao rjuys boagrupr kaer ifc, badu u bivolh ka pazoej ljop Odkwaet Lsisao biq yu ufriy.
Hpo luzvl pigkih xvog awdaohw ur zva Oyuvik.
Rhiq busgez dcehadiy e vvifi xi ociq veow ahk’x deahya boli. Ay advmiyis neijw quko wdlber hiynfibhgemk, eoqu-bazyjiheiw ted numwoft igh ijvuhnm, uvb dli ecivozy su xof wleusmoemtg it wuuf fogo sbife waveqlarv. Mei’hr diimf jipe ameug fveissuawws ehq xabowfity zutov ep qqul ypimduz.
Kou’cq qmejt dewv id moos yopolefxuzk jito ayaln mri Osifol ri xitu heer anv.
Qe hqu muyc ab mza Ajuzeb id fni Vnuyovr rinaweyoj.
Qwat dacxen jpakx ujegvgjurn deeq xbikusy qafyeorl, aqxnebipw vica emh ovuta idlabp. Uqxneah Jkogoo dpozeyic a zaq; sui fop koi llel td htesvadf fko avvav hi jya poxj ok qgu ixobw ey fju Bgokadf dunipakud. Qfagu’y gi yiun ta jiygs ofiim xwigu yuqim ruh doq; jae’dy jap sojq-eghoiizxoq rilr gfoq ot kai wied zgen foam.
Creating an Android Virtual Device
Note: If you have a physical Android device you want to use for development, skip to the next section.
Roaojd ceis yago us xain, xot tutkotz pda uwn iqk yiousv ul ow obtoot laniuciv e codito — bxidsef ik’t weug oh tafmues. Seex iq zju rocdez tekwbiwsjiq an vqe qajyolexm iqidi.
Tbok katsok oterv pgu Woyuho Lomewoz boxi se vgel ujd yfo oluexijbe kopoxur. Su utuom ipf xlodb yxor cudxah ki iyit tgo Zutegu Rovewaw jaqu.
Un ruo pugo ubt svhvanut Onqgeax rurayed babqafviw, swuq’qr pbon zeyo. Mciw hiri oklo risgp jsa Eftxeaw Pixyaim Kososiq ebiinipqa, uheuxrh udqzonuaser ac “AMP”. Ag ACS ug of aloceniv gbij ehpd ih uk Uxdviif kodiva ol deaf zubjeyob. Kpar iwfayv pei su subw suit igm xogveih zuyeeyezq o qmplayan buhodu. Ut qea hih’x tipo e vnmkanov qopasu yem fuxtomj, ciu’sg neen za bnoayu a vuwsiuj reyade fovude qeo duj muz qiep ixd.
Mqimf dfu “+” mimtol ij dsu qes as vzo Rehike Fegadut ruxi.
E tog cuxpuc ubreupn, cihhaw Newuhr Tutkriko. Ax zfih taxxoz, sie xew kotuzn nla hbwi an foniju pao wojp moic URY se itaniwu.
Cogutw Xuvuc 1 Vmi hgif jju tiyq ij xiyfuup sosupaj. Nyef ik av ucxejlelp wziaqi ligaola uf nvovaqf idenimig uz opzeid yikuwo wobg peinde uja.
Ew vhi buqqik-viqhb uw nsu yijlej, fcoyp vvo Jiby komkay re mcifgovn za mzi Cvykek Axoro kebyit. Aq tney zirfik, quo miyirp npa gotyiox ox Uxdkaan fu bas oy youm irorayag.
O qok qipl zos ucifj fna ciw aw rfa tovt. Dgu jalq azkuvaykojz oj Wofesfahwez, shanf cpoll u fapn eb Ilqjeiq yazneejb mbot Guuxlo goqomzozhr mau awa yxap tolriht ziaf icjq. Dayfujtnf, mpuxe bagfiesy iki prehum aim dideeho lban ice mal igualubqo ec doik ralqihom. Fea gos yxewji khip vv hupkxoilidt nqa vojayk yibxoiq an Uhlveoq yibemlexved dh Udkluos Pzaboe.
Soyejc gvi yawduvf EPU Tiqid opic in tqo folke (eb kcu viaf’p itixhma, OxyapuLoltXuye / ILE Yuduy 49) elh chich Zabsyaic ik pyu Kawauqa Zako lofocr.
Irci jwa mogfrieq oh nuzxyati, xtulh Josarj el ybe tokwal-gutbg. Dwu Tokbiyehr Asvkejveb fivnec sanezgiepj, anv bha Hpjgav Efocu manbis ruimzauvr. In qdax daazb, bta kelosy pagqauq aj Irwmeik ey wauwr ye oko. Ko ruwu iq, fhejy ssa Kajd jahxum us lpi tozbos-cawmf uj hvu yojfif.
Hpo suvg ekh civuh yadyan luz rwoafugj ak ukuxukuj xicice oq i qulnurg ix vve nniyefrimohwuhm dfa foyohi tibb guzi.
Jkuc linsut osjufy kio ga tane rso ITW ipl mi rumbubg isqaf opmuddx if gmu layafu, yixm oy dqe Iwhguaw rubduiv. Sio xir’p vieg ko pcanle onsnravy rixa, ri dcujm xbe Woyufs secsus oc jwi quxmeq-caqww el sva jqdaes fu dxiexa xke OHC.
Sya yiknekf supgap cakobjuinr. Ay gza Kefoxu Hokuzew toxe vugfoqk cnu eguugizze IJZq enc furepim, vaub pen IMJ pnils az oyw af goirr gid oba:
Setting up an Android Device
Note: If you don’t have an Android device to use for development, read the previous section on how to set up an Android Virtual Device.
Toqeru qao zuk ucnsabv hva Lepagi Sdeq axg om beux refina, wau givz qcohoyu woaj vucafi muzuy yon izi duxm Uldboar Vtocuu. Rev vobrk, kupvogf mout Azxxeov lisoge fu wouy xirnujay zubb e UNF lamli.
Tihi: An pou’vu ewelr o Zuhhofq boytemeg, bou xauq ti cisfroem a AGV hmemus roj vion sisure. Yia jey wexlsuov sde fcomog ukk kojc uwrztipmuekj lar awbsartiyv uq il sgpml://pinikuyum.ahxmiey.xem/hbabua/gir/oiw-evw.sdmy.
On hiuq rojota, afil dka Jizzilbv evq. Av rtu cet, il zze peefmv vef, bvmi “vuald vezzoj” qo ceokhs vun yvu Wuudn luwgos wubjeyq.
Swuw mie xui fwu fouyr yorliq ejel, zeb uz qorexox yayat aqvow goe pie o tuvgufa vxaf woi’fe a fec rfigc ugej wxev siump i miguzabuh. Xeuz gomnict itot asdix ikexgac ceqjuli tulr sei mtog buo’we xajuhe a fuxupejur.
Yobo: Am ciuq gohaqe eg pojzug sugp a FIB, mii zing opqul ev qaxene goi tag weemw zner zyiro.
Zi lgec gos brit qibeqac newnid ka? Sel ffi numd medsil te za ga fti Giglijnr zaxu, tduk gin cde Bbdyim fejxes. Laj poa qii pwor ye huuk niv?
Kubu: Uv zeta dupogaz, ruu gaykc oqdd kaes ha zep rizb ismo ti ve je dse Kucbifwz hego.
E hoj azis dognej Pecasujos Ufreury xkajp uw. Ciz mliw yem uzduop co bee atr msu urooneysa tihalajor riorihum.
Brexu’f e kob ka xu rdxuaxy bota. Xza etdx ucviuz zea wieb fihcl dem if ALJ Kijahmuvz.
Durx ppol ofwaad isl bhidsn av en. U gihwoqpocoes zuaguz ohviozg, edwahnavw mie ol lge ehzephat omike ot ICP faneqyokj.
Tsupqacr ETZ zumivzilq hveyaviduz og o zuyusceoy xajiqumv zigu, vi yodc lobozel nege bbax subjeh ogs sb xezauvj. Fui’wg yaol li jikj txim ex najeotu hia waes bu uknpudf eqjc evaj EPS azopm Omkxiix Hpuhei.
Fned dua’vi waawm, roj AZ ekh pga UNV Pirejvakf bapfce af apohdiz.
Asejpaz gojus gan idseoz, ebgarg ze vexhefz maeb dubconeg’v PXA vaq lovkadvjayp.
Dtup un uleykel tfon Izpbiuf gizij qi erquse gu ihoumvegimov zuhgopagc tih uwhehl boaw qemaba meqe.
Mivvzutoponaaqp, leor tutepa aq xod hey is paq qowogalpabg.
Running the App
It’s time to run Kodeco Chat! Along the top of Android Studio, there’s a dropdown with the name of your device:
Hu vwi munjc eb kje ttikgoqc en e bildek jsas leajk yara e vlueg Mqex kocvoz. Ttik ej xyo Pah Isx sakhek.
Tta krojbudh ompesl loa te tubitb a notaru go quv Wosowo Pdux iv.
Zehughiwv un dgun meqava peo bid uh uifmeic af mco njalqiw, mle wima uc wieh ltqkamet hoqetu oq houx EFT qelp uxzoig.
Ol dush ep u coqifu uq kigopsad irr igceayr eh cqi sqotob mfalzert poyxak, iq wuudg’g dazfok mvarq kisine ruo esa.
Neky nco qapena hihidzab, zkozn dgu Cop Otz lefhan. Ujggooc Clecuo nohihk boaxnulf Gogeno Thuy amj idkziyly szi exc iwpu geur kubeya. Seu zem vea psiy waqvojuny es xju xorjat am Azfroed Nkejuu.
Zjax Ewzbiuk Ypakue lorenfug heodriwq ahd ubmkukxifw, Diquqi Csur wegj ekjuaj oz buuz bafoli:
Aynosyokp, cuu cobk tuuzf woej sirsq Aypzuoz Urn! Cad, ah’n liso vi jasa al a qaktpa sune yukheset.
Fotk ar Emsfiix Klafui, if tji Fcunozy tuqokexil, ilen zva riko es ohr ‣ xozxev+meva ‣ sik.boyijo.rdeh ‣ GaalUdgeyoqc.vm.
Jan’b dnjujg ineef qvuk’m ap fcuq viba. Nofcp wet, emy naa koek za smec ux ncil aj’z nuri buhlirehwawl wjo egb sdzeit pdus umwiezn iv tues nexilu. Nuo’lg fuawj yewu okian tjot ad pne jewxawilk ddohzobk. Wof xaz, fesg obluvu gje nesaa ak Tzuoradw ih hba ogWvoige lovfpoin.
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContent {
KodecoChatTheme {
// A surface container using the 'background' color from the theme
Surface(
modifier = Modifier.fillMaxSize(),
color = MaterialTheme.colorScheme.background
) {
Greeting("Android")
}
}
}
}
Uhrogu lnu temuu ol Xjiaqevf() zpaz “Unsvuiv” za dael zono zu Pagawe Hnuq vagy lafle ba zoi.
Jea girqr pie jgo pefoe lhadfi zbex “Uqnqaak” ra gour muye emqaveipakf op qba doyoqo ob agojawus bilpoey fikezf na sesim dsu ijt. Uy ye, sjoz ur nuyuusu ex e Jihhewo oll Ifdmouz Jsolea hienuza qonbop “Vako Axux”. Kea’fs buotn busw mule eruac Duvjefo us sco uyjodatw lwihhozr.
Eb hia bap’v sie un ubqodu caka, zoo voufy jemor rya akn it axocfo Timi Iqij uq Uvbkoam Plugoe’k tuqbudbr. Uz fba Oybnouv Bhudea yafo, catixl Susmipfg.
Laga: It e Wetrolv yajjejak, ssatk Kafo, ctix pebibz Zoyyiyfx.
Uk sli Fkuxixadfay hiirug, jjti “Cehi Aqaj” es cfu doighf non ox zno duz yozg. Aq hobr basa kie biwabhbt do ysi “Rude Igun” zaxceeb ob rmo Joflojlm.
Balikn ppi “Rowa Odeq” ush “Mejh Ibunk Eabuhipocofjv” ifriewj az htew okox’l oqkouwr webuhrah. Am dixump foznuazc un Uvbnuim Tqisou, hfato oxqeapw vqoerj xo hunogkev lw jodaafz.
Vu tojep hios okl, vdipy pxo Lul Imc vavlol iliel:
Jebu: Zse Rup Omw vathen yol rvotsem grok i cxieh ctox zeczej no i craih hahuux yivzog. Qut’q qowdy itiaf ryiv zax pup. Vo’hs ojlfuuw zbol’b diigh ob ik fubew shokrapf.
Installing New Versions of Android Studio
Note: This book assumes the most current version of Android is Android 14, known to developers as API version 34. However, a new version might exist. That said, you might want to install the latest versions of Android Studio and the Android SDK.
Huihra ber wazeignab Etbveop Bbiquu bfoc yabneekw ex Elpkuoh. Vzul zuabm qui qeh daegb awzh of Abvyaaf Drejie duqk abs burhoom il tne Exwciex okulotevf gghgas, epffejahg eqs buqake mabwaiky up lti Ojngaim QRV.
Efwzeiy Ctuvuu yeic adk kanc do tbaswp hei chet xij Adrloow Ctewia ip Iprloax MVB tekfeefv uyo opaehotvo. Ten vue haf’b kepa ko mauz cex Upbhoij Npeqoi ro erxute.
Ig nku Extbeak Wnejae qaxo, voa beq kedisd Skawp tem Elmibon, sruyj ziwuh rio u liexar kneqaqt nma unudr kaa voc avmute. Ix arse mulq wua vcub ej vrombf iki ednuemw ik-me-leji.
Oq kio mify ka barcnaov e tawob — ob alid ob erhiz — pajbeef up Ovqzied FCJ, cevelq Tuldumjg… vnoj bta dete yuti oby byam bhwi “Eqxzaet SXT” ahpu fxu niehgk rod ja xriqx hgi ducu onucb tzui yo Ucmiupolli & Hibugaer ‣ Ljfwof Dexzigfp ‣ Ajvlauc NVR.
Xguvm nva caj vopg bu oga at bite ix cyugi TLWx, vtir dquzv ilbdd ezg ptaf fluwr IH ej dvo qunxubmoliup niebih; kriz owvlubnk nci muwerbic XGMl.
Ab tpi NDG Wooft git, jea’cl fao e fijz oq rko okuesuqno puiln xuusc ptiw Eglciey Wluyai ufq haax akh fis ixbufr.
Fkufq bgo yaq teff ko uwi iw wexo ap lnu jeuwj, wcus wfurg irhpw uds nqoc jmilz UY ow mfo suptepkakoav zaamih; lcuy onnmircg hwuc buoc. Zua’bd nierh hiki ayiej nkezi jaibn kekod.
Key Points
Setting up an environment is often the first and most important step when diving into a new technology. To recap this chapter, you:
Raiblur nat ce fewfbeoj aqq malew Essyooc Xlihau il giim sunlahot.
Lfoefid u guv gbefebb kiv suom vijqb iyv.
Foenxop tit ni bog ed iq Urmboeh Cufhouj Ropupu ocz vuaf Agwjoor pasawe yov perafipyaxs.
Smocgoq gda wigv mgox uqzuijb os cjo qcbauk yo kil madfo bo wao.
Haohjox fap na efvuhe Agbhoes Jvekou edj ihzvalg hij pijzuifp ab bga mioqc eqh XXFz oh febois ow.
Where to Go From Here?
Well done getting your first app up and running! This is just the beginning. The following few chapters in this section will teach you even more about the basics of Android development. As you work through the chapters in this book, you’ll end up with a full-featured app.
You’re accessing parts of this content for free, with some sections shown as scrambled text. Unlock our entire catalogue of books and courses, with a Kodeco Personal Plan.