Yadda za a rubuta takardar farko ga Android. Tsararren kyamara

Samar da aikace-aikacenka ta hannu don Android ba sauki, ba shakka ba, idan ba ka yi amfani da ayyukan layi daban-daban da ke ba da damar ƙirƙirar wani abu a cikin yanayin tsarawa ba, za ka iya samun kudi don wannan "ta'aziyya" ko yarda da shirinka. za su saka talla.

Saboda haka, ya fi dacewa don ciyar da ɗan lokaci kaɗan, ƙoƙari kuma ƙirƙirar aikace-aikacenka ta Android ta amfani da tsarin software na musamman. Bari muyi ƙoƙarin yin shi a cikin matakai, ta amfani da ɗaya daga cikin matakan software mai mahimmanci a halin yanzu don yin amfani da aikace-aikacen Ayyukan Gidan Ma'adanai.

Download Android Studio

Samar da aikace-aikacen hannu ta amfani da Android aikin hurumin

  • Sauke samfurin software daga shafin yanar gizon kuma ya shigar da shi a kan PC naka. Idan ba ku da JDK ba, kuna buƙatar shigar da shi ma. Yi saitunan aikace-aikace daidai
  • Kaddamar da aikin kyamara
  • Zaɓi "Fara sabon aikin Gidan Ayyuka na Duniya" don ƙirƙirar sabon aikace-aikacen.

  • A cikin "Gyara sabon aikin", saita sunan aikin da ake so (Sunan aikace-aikacen)

  • Danna "Gaba"
  • A cikin taga "Zaɓi abubuwan da app naka zai gudana a kan" zaɓi dandamali wanda za ku rubuta aikin. Danna Wayar da Tablet. Sa'an nan kuma zaɓi ƙananan version na SDK (wannan yana nufin cewa shirin da aka rubuta zai yi aiki a kan na'urorin kamar wayar tafi da gidanka da kuma Allunan, idan suna da wata sigar Android, kamar yadda aka zaɓa Ministan SDK ko daga baya). Alal misali, zabi version 4.0.3 na IceCreamSandwich

  • Danna "Gaba"
  • A cikin "Ƙara wani aiki zuwa Mobile" bangare, zaɓi Ayyuka don aikace-aikacenku, wakiltar ɗayan wannan suna da alama kamar fayil na XML. Wannan shi ne nau'in samfuri wanda ya ƙunshi ginshiƙai na ka'idojin daidaitaccen yanayi. Zaɓi Ayyukan Ayyuka, kamar yadda ya dace don aikace-aikacen gwaji na farko.

    • Danna "Gaba"
    • Sa'an nan kuma "Finish" button
    • Jira aikin Studio na Android don ƙirƙirar aikin da dukan tsarin da ya dace.

Ya kamata ku lura da farko cewa kuna buƙatar sanin abubuwan da ke cikin kundayen adireshi da kuma Scripts, don haka sun ƙunshi fayiloli mafi muhimmanci na aikace-aikacenku (albarkatun aikin, rubutu da aka rubuta, saitunan). Biyan hankali sosai ga babban fayil na app. Abu mafi mahimmanci da ya ƙunshi shi ne fayil ɗin (ya lissafin duk ayyukan aikace-aikacen da damar samun damar), da kuma kundayen adireshi java (fayiloli na aji), res (fayiloli na kayan aiki).

  • Haɗa na'urar don debugging ko yin shi emulator

  • Danna maɓallin "Run" don kaddamar da aikace-aikacen. Zai yiwu a yi haka ba tare da rubuta wani layi na lambar ba, tun lokacin Ayyukan da aka ƙaddara a baya sun riga sun ƙunshi lambar don nuna saƙon "Hello, duniya" zuwa na'urar.

Duba kuma: shirye-shirye don ƙirƙirar aikace-aikacen Android

Wannan shi ne yadda za ka iya ƙirƙirar wayarka ta farko ta wayar salula. Bugu da ari, nazarin ayyukan Ayyuka daban-daban da kuma ɗakunan abubuwa masu daidaituwa a cikin aikin kwaikwayo na Android, za ku iya rubuta wani tsari na kowane mahimmanci.