首页 > 传奇攻略 AndroidStudio使用指南

AndroidStudio使用指南

AnrdidoStudio使指南用 录目、二、三一、四、五、12.3..4..5六、12...3.45.七、1.、九、简介八........................................................................................................................4视图........................................................................................................................4捷快.键...................................................................................................................6体字........................................................................................................................7配置文件................................................................................................................7概览............................................................................................................................8混淆...........................................................................................................................9.道渠............................................................................................................................9包打..........................................................................................................................11依赖..........................................................................................................................1S1VN......................................................................................................................14.装sv安n...................................................................................................................14配置nAdriodtSdiou................................................................................................15Ignroe文件或文件夹..............................................................................................17更新提和交..............................................................................................................9导出1vsn项目..........................................................................................................19内部自义定件组..................................................................................................2A2ctviti滑y退出动组件.............................................................................................2附2录:aar组件开发............................................................................................23附录:MvaenNxus私服eara上包传...............................................................2.6 修记订时间录20151--01220151-0132-15-0101-5节章全文6.6.55描初稿述完成新增修正入导vs项目卡n死解的决办法 一、简介AnrdiodSudiot于基rGdal,e是Gogloe定的A指dnroid应开发用具,工当前最版本新.4(1215.100。2)0516年月,ooGge l已宣布AdnriodStudio取代将clEipe(包括s对nAt等支的),成持为nArodid官方唯开发一具。其插工开件发使Gr用ooyv脚,语本法与JVAA异不差大。ndrAidoStdiou中的Porjcte定义Ec与ilsep不,同当相于oWkrsace,p而Mduoel才对应Elipcse中的Pojerct对。于Adroidn模的化开发更块方便加。注Ec:iples里现有的nAdoird工具通过会Eclpsi基e金等一会其些组织继续它持下支去。二、视图AdnorditSdiou认视默图为Andriod: 构结与cElipes差较大异可以切换,为Prjeco视t图:切后换,图如下视:注: rse面以下mipmap件文夹代了原替rawdbale文件:m夹imppa技术可以好地更实现图的片渲染,前目本上基用于存La放nuhcercoIn也可,于其用他图片如Bi,map,BitmatpDarawble等有类接支口(A持IPleev较高,l.0+)。4把其单作为纯普图片通使(采用用Rmi.papm.xx引用)时x貌,对似aplieev没有l要。目求前议还是将图建片在放drawbla文件夹下保e不变持。、三捷键快点击如图标下:选择kemapy页签:选择Elcispeopyc可即得获与Ecilps一致的e捷键。快:代注提示默码区认分大小,当首写字母写时,会大动自出弹提。示 四、字体ndAoirdSudiot默编认器(Ed辑tiro)的案方Sche(m)e是法修无改字的,体可以aSvaes,存保为的方新(Sche案me,)后更改然体字小;大置:位ile-F>eStints-gIDE>Sttiegsn->dEtior>C-lors&oFonts->Font五、置配件文上中图选被中的buildgra.ld文件即为endAoirdStudo的配置i文,其中件根录目hllowerold下的是Porject配置文件a,pp目下录是Mo的duel即当前(说的常工程)配置件文一般情,况下我,都是们改修ppa录目下的个这配文置件。1 .概览 2.混淆将inifmEnyabeld设置为ruet,即打开混淆使用。默认配可置满足大分部需求,当会根据xml前文中件没有有引用,配置类是否被会淆,混如Ativity,Scevrice自,定组义件等不已要需动手配置。了.3道渠在amifnst中增加如e代下码:后增加然置配:编译时An,roidSdudit会用ochanne1l等替换maifnest的中vaule最后,通:过获对应取渠道标的识。渠的道置也可配通以如下过法实现方: 4.打包按照单项菜作操即可,注意全选所渠道:有5依赖1.)nArodid带的依赖,如自suportpv打4上文开3渠道.中到的提MdouleSetting界面点 击+“”:选择应对:项2)lbs文件夹中的依i赖 bild.ugradel件如文上图示。所默认lbis目录下的jar文件已经引被,与入Ecipls一致,无e再需操:作如果aar是文件,则需分两步要:是添一r加peoitosrise置配:二引是入依:Ma赖ven私,如服eNux,同s样两步分: 注上意图中亮高分末尾部的“a@r”r注。公 :司目前的neuxs私:服mvena{urlh'tp:t//91.216.280.9580:81/neus/xontenct/rpesitorieo/tsirdharty/p}'compil'en.richcnif.oandoid.riwdge:rtichinfoidgew:t.0.0@a1ar'、六SV本N介绍节AnrdoiSdtdiou何如合结vns进行本控制版。1安装.svn具工载:h下ttp/:so/rucfeore.nget/rojepctst/otoisresn/vflis/e1..812/ppAicaltin/o版本1:8(Andr.iodSudtoi.31要安不最新装svn1.,9不别识文件格,Androi式dtudiSo1.4还测未试安)装时,要需选co中mamdnlniecieltntool,s默为认安装,如下不图: 2.配置AndoridtuSdo进i入置页设面:选择VesroinCnorotl-->Subevrsino:输入 vns安装地,如:址:PDorgarmilFseoTroitesSVNbins .vxee传工程上:选 与安择装的svn一直版的号本:SarehProjce完成t后和,Eclispe样一,要再提交一次文还,件才正能式文件上传到把服器。务3Igno.re件或文文件夹在s向vn上传件时,文最好要上传不buidl目录(里都是面AnroddSiudit的o编结译果本或地配置。)忽略掉的目显示颜色为黄录色:绿 通过TotorisSeVN来添加忽:略 4.新更和交提这两小个钮很按面方作,向操的绿色是c上moitm,下向蓝的色是pdauet5.导。出vs项n目 选择已安装s的vn对应版本:的之可能后会在卡uibld环节,原因可是在能载文下件(络慢网加再上gogol被e)墙。直接束进结,程后在文然件夹找下到gradel appewrgadrle-wappre.rrppeotries这文个件容如内下#WeAdp101r5:2:170PDT2130dstriiutbioBnaseGRA=DE_LUERS_HMOdiEtsirutiobnPtha=wrpapredi/stzspStoreiaBesGRADL=_UESE_HRMOzEiStopePatrhwr=pperad/sistdsitirutbonUir=hltp://tsrevcesi.rgade.log/disrtirutibonsg/arle-2.4-dll.aizp重最要的就是下面最句,一androidtudiso会网下联符合当前载本的版rgaled件,插而个网这址虽然可访问但速度以实太慢在,所每次以新更要需花很长时或直间接时超最单的办法简是就把本版改成好本地已的版有本。重关启a闭droidnstuido重新打开。成功入后导:七 、内部自定组件上义文节五章已经中描述如了引入依赖何,本章绍目介前有已的内部件,组有后待续不断善。完1.Atciitvy滑退动出组件本组g件tihbu开源址地:https:/gi/htbu.om/ikec0wg/nSwpeBickaLyoat1u继承)cn.rihcifo.nanrodi.widgedts.iwepbak.cppaS.wieBapkActcivtyi:Swi peBakAccivity继t承自FragemntAticviyt同,支样持Framgetn2)配Th置mee注意使:用制限,由于需要置设<了temnima="endaoidr:iwndowITransslcenut"true</>tem>i导致,Ativciyt法无横。屏八、附录:aa组r件发开urPpsoeofARAibLrrayeuserhsalogneenbaailvbaleinJavabaesappdlcitaionstrhugoJhavarcAhive(j.a)rilefs.AnrdodiAARfielsbuidlpoutnishcnoecptotallwooyutopakagcenoonltytehsuocrecdoebutaslohtelirbaiersselfcontinaedndroAid reosrcus.eTheibrarlyanchaveitswonamnfesitadrnsoeucreasdcnanalsootpoialnlyporidveasest,NsDKbuiltilbraiesr,prguardoconfgiuariotnanedvnitseowncsutolintmilftrseT.hsiisallbndlediutnaoizparhcvietatcanhbepbulsiehdtorapoestoryiforoyruteam(rotehwolrd)!togteaseyaccessrfmaorGadlebilud.AARiFelFrmaoThtAAeRFilforematissimlypaziparhcveiilefithwexentisno.aa.rTeharhicecontvani:s•/ndrAioManifdet.smxl(anmatoryd)•class/se.aj(ramndaory)t•/re/s(amdntaoyr)•/.Rtxt(amdntoary)/a•sess/(toptiona)l•/lbi/s*.arj(otionap)l•/ni/j<bai>*.so/(otpinoal) /p•ogurrd.tax(opttoianl)•/lni.tar(opjtionl)arCetiangaAARnibrlaryproecjtTheogodewnissceatirgnaAnRAlibrarysieasyandAdnoridStudioillwodlalteharhdwrokforou.yAdronidStudocieaterlbiaryrodmuelFiuger1:reCtaenAadrniodiLbarry.1tSatrybeslcetigNewnMoudle…rfmtoheFleienmu2.SleetAncdoirdLbiaryrastheomdulteoebcreate(deseiFgrue1).3tSepthourghthpreocsesfuoingsatemlatepfortehcratieonofyuolirbarrmychulkiecrateniganewrpjeotcOneekyidffreneceinthecearetdlirbayardnannArdoidpalpcitainowlilbethelbiarriseGrdleabuildscrpitincluesdaplpypluing:‘com.adrniod.iblrrayin’tsadefoapplyplugni:‘co.andmoirda.pplicaton’i.WhnyoeubuldyouirprjoecttheARAfielillwutoamticaalylbaesesmlebdandpalcdenihteseofdels(rnAdoidSrtduio1.0)+b|uidl|oututps|aar|applib-edub.gara|appil-beleasre.aarUinsgAARYouhaevafewchoiescsatohwtoinoludceouryARAiblrryaiyournprjocet:•PulishbtoaexernaltMaveneposrtiry•PoublihstaoocallrepoisorytAcc•sserfmoalcaolfoderlWhilGeadlercanbuesdeotdiertclyuplisbhotrpoesitoierssuhcasaMvneCentrla,tishartcildoeesn’covetprbuilhsingyoruAARfiletMovenraposeiotreisT.inoculdeoyruAARilbarrasyadepneencydformalcolaoflerd:1C.oyptheAARfielintotehlibfslodrienyourprjeco.trCeatethisolderfiiftdose’texins.ItteendtosbelocatednihtesaefmloedasryouraplpcitainoGadleburlidilef,nothteopletelvprojecftoldre2..DelarethceilbsfoledraasedpndeecnyrpoestoiriyynourappilcaiontGradlecsipr.t epositrroesi{fltairD{dirs'lib'}}sTehradGlelfatDrireopsiortyedlcaatrionallowsouyodectalearilesfytsmediecrtorythtaisaeposirorytfrdoepednecinseorftheprjocte.InteexhampleboaveIamusigtnehlibsfoderlhwichneestdoebocltedaerlaivteottheocaltinofotehbiudlcrsit.ThenapemotfhsiofldredesontohveatbeloibsandtiisalososspiletodeclarbmeulitpefilleDrfoldiersithneonerpjoce.t3.DelcareyuorARAlirbryaasadpeenedcn:yedenpendiecsc{opilmena(me:'ouylibrarryamen,'ext:'aar')}aMnfiesteMrgngiErliaerntihsirticaelwenteodtahttheAdnrodianMfistexm.liasocmpulorsyietmninaARlAibarr.WhyennaappnciuldesyourARlAbrariythmenifaesmtsutbeemgedrwtihthaotftehpp, aasteheriwlbloneyolenmaniesftinlucddeiannAPK.eMriggnmanifstescanqickluygetemssywehnmltuiplceonlictingfmaifensstaerallergmd.eheTandordtoilousserguidetomainestfmregerssitheesbtesruorecaavlibaleteoxlapinalthelinansoudstfhoowhetmrgeewillhppeaanndhowyuoancconrolthetemgre.Themostbascrilueothemefgerithesordroefpirortiiesivgenodiffteenrmtaifnsets.Fommortsinluentifaltleoas:t.1Prdouctflavorsandbulditypespecificsmanfiestilesf..M2anminaiefstifelfortehppailactin.3oLibra.ymanifertsflis.eSoyoucaseenyourLirabymaniferstitssattehobtomtoftehepkincgoder.roMtsoftehitmehitsermgingwillhappenlikemgaicwi,tohutthneeedforitenvenrion.Iftisseusarsieinthemanifetsergmeterhereacauopeolfplceatsstoratlooknginirdortoetarkcdownheisste.Tuehifstrplcateochekictsehfianoltuutpedtmaifensftiel.Thenxtelapceotchckesihetamnifetsmrgeereprtow(ichhsiasveditntheoappbiudluopttsuolgsofdelrofoyruprojet).chTeforatandmontcetnsofthelogginintghmeregrepoetrsiepxainldehree.efReenresc ARAFileormFatthp:/t/tols.onardio.cdmo/tec-docsh/enwbu-id-sylsem/aat-rofratmaMinefstmergniugsegriduehttp:/t/ols.ondroaid.omct/ceh-dcso/new-bildu-sstyemuser/g-iue/dmanifets-mrgee九、r附录Ma:vneNexs私服uar包a传上私地址及用服户信:息htt:p//912.61.80259.:8810n/xuse/adinammin123d用浏器直接打开览:登完成录:后成 功:之后可后在以下面的图视中查看 :