1. 首页
  2. 移动开发
  3. MeeGo
  4. Learn Android Studio Build:Android Apps Quickly and Effectively

Learn Android Studio Build:Android Apps Quickly and Effectively

上传者: 2020-09-18 15:05:48上传 PDF文件 24.26MB 热度 20次
Contents at a Glance About the authors ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ XVI About the technical reviewer mix Acknowledgments Introduction XXIII Chapter 1: Introducing Android studio.mama. ■■■■■■■■■■■■■■■■■■■口■■■■■■■■■■■口■■■■■■■■■■■口■■■■■■■■■■■口■ Chapter 2: Navigating Android studio mmmmammmmmmm 27 chapter 3: Programming in Android studio m naanmaaaaan 45 Chapter 4: Refactoring code 69 ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ Chapter 5: Reminders Lab: Part 1 ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■a■ 89 Chapter 6: Reminders Lab: Part 2. ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 121 Chapter 7: Introducing Git. ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 145 Chapter 8: Designing Layouts. an 189 Chapter 9: Currencies Lab: Part 1 ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 241 Chapter 10: Currencies Lab; Part 2. ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 267 Chapter 11: Testing and Analyzing ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 297 Chapter 12: Debuggingammar ■■■■■■■■■■■■ 313 Contents at a glance Chapter 13: Gradle 339 Chapter 14: More SDK Tools ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■口■■■■■■■■■■■■■■■■■■ 371 Chapter15: Android wear lab.,,,,...,...,,,,...,,407 Chapter 16: Customizing Android Studio 431 Index ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 445 Introduction Around 530 million years ago, during an age geologists call the Cambrian explosion,a wide variety of species including all the phyla that exist today burst into existence within as little as 10 million years-a mere flash in geological time. Scientists continue to marvel at this phenomenon, and darwin himself suggested that the Cambrian explosion happened so swiftly that it might well cast doubt on his theory of natural selection Today we are experiencing the technological equivalent of the Cambrian explosion. The U.s. Bureau of Labor Statistics predicts that a person graduating high school today will have 11 jobs in her lifetime, and much of this career transience can be attributed to the pace of technological change Technology begets more technology, and new technologies proliferate with ever-increasing speed. Some of these new technologies will survive beyond a few years, but most will not. There is little worse than investing time and energy in acquiring a new skill that is obsolete on arrival or whose utility is short-lived. We wrote this book because we believe that the tools and technologies covered herein will endure and that they are well worth your investment Small is beautiful Moore's Law, which states that processing power doubles approximately every 18 months is relentless. Over the past few years, laptop computers have achieved performance oa arity with their larger desktop cousins. Laptops and notepad computers accounted for 81 percent of PC sales in 2014, and sales are projected to increase at the expense of desktop sales, which are conversely projected to decline. The brilliance of this trend is that no individual or group has the power to arrest or reverse it-such is the power of economic forces, which are the result of aggregate individual choices. Laptops will be the tool of choice for knowledge workers for roughly the next ten years. However, a silent revolution is http://online.wsjcom/news/articles/sb10001424052748704206804575468162805877990 "Source: Forrester Research eReader Forecast, 2010 to 2015(US) Introduction currently afoot that will soon topple the almighty laptop. Around 2025, or possibly sooner, our smartphones will achieve performance parity with our laptops- which is to say that the larger form-factor will no longer afford any performance advantages over the smaller Ultimately, our mobile computer(MC)will be used for the vast majority of computing applications, even those applications that you and I can only imagine doing on our laptops today. This revolution is just as predictable and just as certain as the one that overthrew the desktop. In the meantime, you can expect your Mc (in other words, your smartphone or tablet) to start functioning in ways that resemble your laptop, including the ability to dock to peripherals such as keyboards, monitors, and mice The personal computer(PC)age is coming to a close, but the mc age will actually be far more personal. Soon a whole host of new wearable devices such as watches, glasses, and our computers on our bodies and dock to monitors, keyboards, and mice wherever those shoes will be available. We envision a day in the not-too-distant future in which we will wea peripherals are available. This will truly be an age of personal computing though we are not likely to call it that Android Advantages If you aspire to become an Android developer, you've made an excellent choice. Billions of people in the developing world will be coming online in the next decade. For most of these people, their first computers will be smartphones, and most of these smartphones will be powered by Android". There's good reason for our optimism and already a lot of historical will be sold in 2015iv. At the time of this writing, Android accounts for over three-quarterss data from which we can extrapolate. Gartner Group projects that 1. 25billion Android device of the Chinese market alone, and Chinese consumers are prepared to make staggeringly large investments in mobile devices, some spending as much as 70 percent of their monthly salary on a new mobile device because connectivity is a prerequisite for participation in the global economy. China is the largest market in sheer volume, but we can observe similar trends across the developing world. Furthermore, because the android os is open source and free, it is almost always the first choice among manufacturers of Tv consoles, gaming systems, augmented reality systems, and other electronic devices, of which there are many. Android will continue to consolidate its dominant global market position for several reasons. Android's modular architecture allows for a wide variety of configurations and customizations. All the core applications that ship standard with Android devices are interchangeable with any number of third-party applications, and that includes applications "http://news.yahoocom/android-projected-own-smartphone-market-next-four- years-213256656.html,http://www.idc.com/getdoc.jsp?containerid=prus24302813 WwwW.bBc. co. uk/news/technology-25632430 Report: Windows phone overtakes ios in Italy and makes progress in Europe-The Next Web (n.d.).reTrievedfromhttp://thenextweb.com/insider/2013/11/04/report-windows-phone-over- takes-los-in-italy-and-makes-progress-in-europe/#! pSdH1 Report: Windows phone overtakes ios in italy and makes progress in Europe- The Next Web (n.d.).Retrievedfromhttp://thenextweb.com/insider/2013/11704/report-windows-phone-over- takes-los-in-italy-and-makes-progress-in-europe/#! pSdH1 Introduction like the phone dialer, the e-mail client, the browser, and even the os navigator. Android devices are available in an amazing variety of shapes and functions. There are Android augmented reality glasses, Android game consoles(of which Ouya is the most notable Android watches, Android tablets of every conceivable size, and, of course, Android smartphones Android's core technologies compare favorably to those of its principal competitors Android's inclusive and open source charter has attracted a large and impressive collection of allies, including Samsung, which is among the most innovative companies in the world A freel and customizable operating system means that Android device manufacturers can focus on bringing products to market with unrivaled value, and the highly competitive Android device market continues to produce inexpensive, high-quality, and architecturally open devices Android Studio s Revolutionary As a knowledge worker, your choice of tools can mean the difference between struggling and thriving Were always searching for tools that increase productivity and automate work Certain tools have benefits that are so apparent that one adopts them immediately. Android Studio is one such tool We were introduced to Android Studio just a few days after its prerelease at google I/0 in 2013. Prior to that time, we had both been using Android Developer Tools(adt) both professionally and in the classroom. AdT is an Android development environment built upon the opensource integrated development environment (IDE called Eclipse. While Android Studio was still in early prerelease, we both began to use Android Studio professionally Android Studio is a collaboration between Jet Brains and Google Android Studio is built atop JetBrain's IntelliJ, and so its functionality is a superset of IntelliJ. Most anything you can do with IntelliJ, you can also do in Android Studio. Android Studio is revolutionary because it streamlines the android development process and makes android development far more accessible than it has previously been vl l Android Studio is now the official IDE for Android The Android Tools Ecosystem Android is a technology platform with its own ecosystem of tools to support it. After Android Studio, the next most important tool in the Android ecosystem is Git. Git is a distributed source-control tool that is quickly becoming the standard not only for mobile development, but for software engineering in general. We have never worked on a mobile development project that does not use Git for version control. Git could very well be the subject of another A It's important to note that while google has forgone license fees from Android, mobile echnology proliferation in general tends to buoy google's advertising revenue Developing Android apps requires a solid understanding of Java. Nothing as powerful as Android easy, but using Android Studio will make the task of developing Android apps easier. XXV Introduction book, but fortunately you neednt understand all of git's functionality to be proficient at using it Android Studio has an excellent, full-featured, and integrated git tool with an impressive GUI interface. In this book, we cover the features you need to know to be an effective Git user and then point you to resources for additional study if you wish to deepen your knowledge of this indispensible tool Another important tool in the android ecosystem is gradle gradle is a build tool similar to Ant and Maven that allows you to manage libraries and library projects, run instrumentation tests, and create conditional builds Android Studio does a good job of managing libraries all on its own, but Gradle makes this task easy and portable. As with Git, Gradle is fully integrated into Android studio, which ships with an impressive array of views that allow the user to inspect Gradle files graphically and examine the output of a gradle build process Android and java If you attempt to develop android apps in android Studio without first having a good understanding of Java, you will be frustrated. Java is an extremely useful and popular programming language for many reasons. Perhaps the most important reason for Java's popularity is that Java is memory managed Memory managed means that the programmer does not need to be concerned with deallocating memory off the heap, nor with worrying about memory leaks. Programmers developing in a memory-managed environment tend to be more productive, and their programs tend to have fewer runtime errors. Like Java, Android is a memory-managed programming environment. Managing memory turns out to be such a good idea that both Microsoft and Apple have adopted this model for their mobile development platforms Switching from ADT/Eclipse If you are an experienced android developer and are used to programming with ADT, you are in for a pleasant surprise. Thankfully, all the SDK tools such as DDMS and Hierarchy Viewer are still available, and you will find them easily accessible from within Android Studio. If you're an adT user, you probably find yourself continuously cleaning and rebuilding your projects in order to synchronize your resources with your source code(the dreaded R java synchronization error). In the months that we have been using Android Studio, we have never been troubled with this problem. If you're an experienced ADT user, then in order to get up to speed with Android Studio, you will need to learn a few keyboard shortcuts, familiarize yourself with Gradle, and reorient yourself to Android Studio's presentation logic Altogether, this is a small price to pay for the power and pleasure of Android Studio
下载地址
用户评论