Android Developer Tips (iii)

Source: Internet
Author: User
<span id="Label3"></p>19. How do I use sourceinsight? 19.1 Use<p><p>We mainly use Sourceinsight for source analysis and search, mainly to find the location of the files/classes we Need. For a set of source code, with hundreds of thousands of or more files, we can import this set of source code into the Sourceinsight project, and then through its search function, we can quickly give our search results: whether there is this file, and can directly open the code to read and modify synchronization and other Operations. When do we need to do this? Give an example to help understand:</p></p><p><p>When we need to solve a PR or to verify a problem, it will inevitably involve some unfamiliar files (layout, resources, such as XML files)/class, at this time, just through eclipse or go directly to the folder under one of the search, it is no more than a needle in the haystack is not necessarily able to find. At this time, through the sourceinsight can be completed in a few seconds to find a task, how convenient!</p></p><p><p>The principle is to index all the files under the source code (the directory you choose), and when you enter a file name to search, it can be quickly positioned and displayed.</p></p>19.2 Installation<p><p>Because we are developing under ubuntu, and the Sourceinsight tool is under the Windows platform, it involves installation Issues. Here's A special talk about how to install: use wine to Install. Here's How:</p></p><p><p>Download the installation file of sourceinsight, which is usually the executable file with the Suffix. exe, such as sourceinsight.exe, and copy it to a storage directory, for example using/local directory;</p></p><p><p>Open the terminal and enter the installation command:</p></p><pre class="prettyprint"><pre class="prettyprint"><code class=" hljs perl"><span class="hljs-variable">$wine</span> install /<span class="hljs-keyword">local</span>/sourceinsight.exe</code></pre></pre><p><p>After the installation is open, the SN code will be copied into the registration box.</p></p><p><p>In other words, we use wine to install, later to use, in the Ubuntu System status bar under the application, you will see the wine menu, click on it will pop up programs folder, in which you can find the installed Sourceinsight folder, Click on its logo to Run.</p></p>19.3 Use<p><p>finally, Let's talk about how to use sourceinsight:</p></p><p><p>1. In the top menu bar, click Project→new Project;<br>2. In the popup dialog box, Click Browse and select the project directory you want to Import.</p></p><p><p><strong>Here is a special note</strong> : Import the entire project or import a module, such as import Yarism-v1.0-dint or the following module settings. The difference is that the larger the project is imported, the longer it will be imported (the more files it takes, the more time it can be understood). however, from the experience of use, the direct import of an entire project, the search will not have a particularly noticeable lag. therefore, The author is generally a whole project to Import.</p></p><p><p>3. then, a project name (the name is used to mark in the sourceinsight, does not affect the actual source code, so please feel free to name), in order to facilitate the memory of the distinction, generally that is the use of the source code works, such as the use of Eyelike-v1.0-dint.</p></p><p><p>Then click OK to pop up a confirmation window and continue clicking Ok. The following window POPs up:<br><br>Figure x sourceinsight Import Source</p></p><p><p>The default selection is the previously selected source directory (note: the author when the import is Kitkat-v1.0-dint source code, so the figure eyelike-v1.0-dint, please know not to doubt). Click the Add Tree button on the right to wait for the import to Complete. (the entire source code project takes a long time, need to wait patiently).</p></p><p><p>4. After the import is complete, click Close. then, Enter any file you want to find in the input box below, see the File path, and click the file you want to view to open the file on the left.<br><br>Figure x Sourceinsight Search file</p></p><p><p>The above search operation can meet our daily needs, is not very convenient and simple! When you close the project, you can click Project at the top of the menu bar again, Select Open project, and then select the project you want to Open.</p></p>20. How to make a single module?<p><p>The previous code is fully compiled, but often time-consuming (such as the Author's current use of the i7 processor +8g memory, full-time Android4.4 KitKat source code takes more than 5 hours). In actual development, we usually just compile the module separately (before a single compilation must be done before the full compilation). For example, I only made changes to the settings module, then it is just a Single-part setup module, and then the module is individually brushed into the phone for Verification.</p></p><p><p>Full compilation SUB-MTK platform code and Google source, a single series is the Same.</p></p><p><p><strong>First of all, in the MTK platform to form a module of the Method:</strong></p></p><p><p>1. Enter the source directory, for example eyelike-v1.0-dint, and enter the following command (for example, compile the baseline code provided by mtk):</p></p><pre class="prettyprint"><pre class="prettyprint"><code class=" hljs lasso"><span class="hljs-variable">$cd</span> /<span class="hljs-built_in">local</span>/eyelike<span class="hljs-attribute">-v1</span><span class="hljs-number">.0</span><span class="hljs-attribute">-dint</span><span class="hljs-subst">/</span></code></pre></pre><p><p>2. Enter the Compile command:</p></p><pre class="prettyprint"><pre class="prettyprint"><code class=" hljs ruby"><span class="hljs-variable">$.</span>/makeMtk –t mm packages/apps/<span class="hljs-constant">Settings</span>/</code></pre></pre><p><p>Description: the packages/apps/settings/in The above command is a module path.</p></p><p><p>The way to brush a single PostScript module into your phone is as follows:</p></p><pre class="prettyprint"><pre class="prettyprint"><code class=" hljs perl"><span class="hljs-variable">$adb</span><span class="hljs-keyword">push</span> out/target/……</code></pre></pre><p><p>The ellipsis indicates the path of the module in the system, and the method is: after the completion of a single compilation, the terminal will return some information, which contains two output files, all in the format of the full path is displayed, where the suffix is. The full path of the APK is the full path of the compiled apk in the out directory, where the project name is followed by the Module's storage path in the phone System. First copy the full path in the out directory to the push command, and then copy the Phone's storage path to the last, separated by a space.</p></p><p><p><strong>Special Note</strong> : Sometimes reported insufficient authority, adb Remount.</p></p><p><p><strong>Then we talk about the Single-module compiling method of Google source code:</strong></p></p><p><p>1. Enter the source directory, for example kitkat-v1.0-dint, and enter the following command:</p></p><pre class="prettyprint"><pre class="prettyprint"><code class=" hljs lasso"><span class="hljs-variable">$cd</span> /<span class="hljs-built_in">local</span>/kitkat<span class="hljs-attribute">-v1</span><span class="hljs-number">.0</span><span class="hljs-attribute">-dint</span></code></pre></pre><p><p>2. Enter the Command:</p></p><pre class="prettyprint"><pre class="prettyprint"><code class=" hljs bash"><span class="hljs-variable">$source</span> build/envsetup.sh</code></pre></pre><p><p>Description: loads all the required system environment Variables.</p></p><p><p>3. Enter the compile command:</p></p><pre class="prettyprint"><pre class="prettyprint"><code class=" hljs bash"><span class="hljs-variable">$mmm</span> packages/apps/Settings/</code></pre></pre><p><p>Description: the section behind the order MMM is the module path.</p></p><p><p>4. Enter the Command:</p></p><pre class="prettyprint"><pre class="prettyprint"><code class=" hljs bash"><span class="hljs-variable">$make</span> snod</code></pre></pre><p><p>Description: The source code verification for Google can only be done in the Simulator. Because the Google source code is not included in the hardware drivers and other content, therefore, can not be to a single-series MTK platform codes directly to push the module into the phone for verification testing. To make the compiled single module effective in the emulator, you must understand the mechanism for loading the Emulator. Simply put, the simulator will load the following path when it is opened:</p></p><pre class="prettyprint"><pre class="prettyprint"><code class=" hljs lasso">/<span class="hljs-built_in">local</span>/kitkat<span class="hljs-attribute">-v1</span><span class="hljs-number">.0</span><span class="hljs-attribute">-dint</span>/out/target/product/generic</code></pre></pre><p><p>The contents of each module are included in the System.img file, as shown in. therefore, if we compile a module, we can see the effect of the modification as long as we ensure that the compilation changes are updated to the system.img, and then reopen the Emulator. The function of the above command is to make the modification of the single PostScript in the system.img to take Effect.<br><br>Figure x system.img File</p></p><p><p>5. finally, Restart the emulator and the command is as Follows:</p></p><pre class="prettyprint"><pre class="prettyprint"><code class=" hljs cs">$./<span class="hljs-keyword">out</span>/host/linux-x86/bin/emulator</code></pre></pre><p><p><strong>Special Note</strong> : Enter the above command to start the Simulator. To close the emulator, click the X button in the upper right corner of the simulator, or press CTRL + C in the current Terminal. In addition, the 2nd, 3 commands, in a terminal only need to enter once, and then only need to type the 4th command. however, If you open a new terminal, you need to re-enter all of the above commands, which requires special Attention.</p></p>21. have the necessary skills for the actual project development level?<p><p>At this point, stop to make a summary:</p></p><p><p>We have a more familiar module, to be able to download the source code, update, full-line, single-part, to view the pr, can be based on the requirements of the PR code Modification. A good sense of accomplishment and a sense of sureness, isn't it? At this time, as long as the reading of the Code and walkthrough of the PR is not self-deception, should have been able to initially take charge of some simple practical project tasks! Congratulations to you!</p></p><p><p>however, There is an important part that we have not yet touched On. What is it? --a variety of commit-related Operations. yes, including code submissions, string submissions, picture submissions, and so On. Isn't that right?</p></p>22. How do I submit a string and a picture?<p><p>We use the MSGM Web site to manage strings and image resources in the project At: http://eyelike.com/msgm/login.aspx. Account application, the first to be registered in the website login interface. As shown in the Following:<br><br>Figure x MSGM website Registration</p></p><p><p>Account information can be filled out by themselves, no special provisions. You will then need to send an email to the integration team leader to apply Approved. Approved after the landing after the attempt can be, its specific use is relatively simple (but it is recommended to senior colleagues to consult, 5 minutes of time will save a few hours of the attempt, and can effectively learn how to avoid making mistakes).</p></p><p><p>At this point, you are sure to wonder: why commit strings and pictures? Take a look at the content below.</p></p>23. Why do I submit strings and pictures? 23.1 Principles of resource separation<p><p>To explain this problem, it is necessary to talk about the mechanism of resource separation!</p></p><p><p>System customization is our company as an international company features (such as Huawei Mobile phone, obviously using the Android system of mobile phones, open the phone why do you see huawei? Why is there a variety of Huawei applications and elements in it? Of course because we do the article and work, this is what we do the system customization, and the system customization is an important purpose is the separation of Resources. The main content of resource separation is to separate code from resources (slices, strings, sounds, related custom values, etc.).</p></p><p><p>How do you split it off? First of all, when the separation of resources is not the case, such as Google Android source code, We compile using the make command, The make command runs through Multiple. Mk files, and the contents of each folder under the source code are found in a logical sequence and converted into Machine-aware forms. so, we separate the original resources (close to each other) from the code (and put them in a special folder/directory). The effect of these Multiple. MK files is that they cannot find these removed resource Files. so, we'll Try to modify the contents of these files so that they know where the moved files are, and then they can find it at compile time and generate the complete output file.</p></p><p><p>In a nutshell, it is by modifying the compiled file of the compiled system to change its compilation Mechanism. As a result, we finally created a new partition (partition) cuspack, separated the resources, and had a set of own mechanisms for parsing the custom Resources.</p></p><p><p>Intuitively speaking, The effect we finally do is to put a code and resources together with the apk, into only the code of the APK and only the resources of the APK two Parts. For example, Google source code in the original settings compiled into a settings.apk file, and after the system customization, will be compiled to generate settings.apk (code only) and Settings_res. APK (resource only) Two files of which Settings_res. The APK will be stored in the Cuspack Partition.</p></p><p><p>The above two kinds of elaboration, probably clear the system customization core Content. For an in-depth understanding, it is best to consult with colleagues in the integration group Framework. When you can master the logic of each compiled control file very well, you can roam freely between the two team (it takes a lot of time to learn and familiar, and the C language and script are more demanding, Because most of The. MK files are written in C and involve a lot of scripting tools; this is already off the top of our Android system development and Maintenance.</p></p>23.2 Advantages of resource separation:<p><p>finally, the advantages of the separation of resources: through the separation of resources, we will be different regions of the world, different operators of different requirements of the various changes to reduce the problem to only need to modify the customized Resources. As a result, the core code basically does not need to be modified, all work is replaced by the Perso group, greatly reducing the human consumption and maintenance cost of modifying different Requirements.</p></p>23.3 Summary of Causes<p><p>It was because of this mechanism that a group was born: the Perso group, which is dedicated to the management of these custom Resources. To improve efficiency, They use a website called msgm. Through it, you can easily communicate with your UE (art/design) and development engineer for Resources. Because of the differences in language, style and so on in different regions, there are various adaptation requirements (translation, pictures, etc.) in the upper application of the mobile system, which are verified, confirmed or modified by the development engineer in the engineering Code. therefore, the submission of strings and pictures is a very common and important work.</p></p>24. directory structure of the code?<p><p>As a top-level developer, there are four folders in the main code root directory: packages (the module code is mainly located here), frameworks (the System framework code is mainly located here), MediaTek (MTK code is mainly located here), and the "project name _ Wimdata_ng "the named folder is where each custom resource Resides. Under it, There are several folders: wcustores (mainly storage of pictures, sound and other resources), wlanguage (mainly storing string resources), wprocedures (mainly store PLF Custom values). such as Callouts.<br><br>Figure x Code main operation directory</p></p>25. How do I submit the code?<p><p>As a developer, a large part of the problem solved is the PR Record. And most of the PR solution is to modify the code as the main way. How can I commit to the server now that I have modified the code? This section is particularly important, so it will take a larger amount to explain in more detail below.</p></p><p><p><strong>To submit your code:</strong></p></p>25.1 Before submitting the confirmation Work:<p><p>First of all, we want to make sure that the code has been modified, and then make sure that the modified code can be compiled, and the third to ensure that the modified code to meet the PR Requirements. Meet these three requirements and you can submit them at peace of Mind. otherwise, must not be submitted, it is necessary to maintain a rigorous attitude to make three requirements, indispensable.</p></p><p><p>The details of these three requirements are described below:</p></p><p><p>one, obviously, If the code has not been modified, the submission is meaningless, this is not much to say;</p></p><p><p>second, The revised Code compilation can be passed, you can guarantee that the entire source of the compilation work will not be affected. Even if you modify the function is not normal, but generally do not affect the other People's modules and Functions. This is important for the development model of Team collaboration, especially for projects with huge code Volumes. Because once your submission leads to source code compilation error, Other people's work will be affected, thereby reducing the overall team development Efficiency.</p></p><p><p>third, Our amendment is to solve the problem, if the code changes do not solve the problem effectively, then submitted only superfluous. And will be faced with the risk of being tested by the test personnel (PR is often sent to the testing department of the test engineer to verify, since the change is not met, of course, will be called back to revise), and this is a very serious quality problem. For a software development engineer, this undoubtedly indicates that your ability level is low, will seriously affect your performance (and salary bonuses linked to the evaluation tool, most of the form of scoring); for test engineers, He increased the workload of testing, wasting manpower; for the whole project, the PR life cycle was extended , slowing down the overall project Progress. It can be seen that there are really hundreds of harm and no benefit!</p></p><p><p>however, how to avoid serious quality problems? The answer is to carefully and rigorously modify the code and be sure to do the local validation Work.</p></p>25.2 ways to submit your code:<p><p>1. Open the terminal, go to the storage directory (in this case, into the/local directory), typing the following command:</p></p><pre class="prettyprint"><pre class="prettyprint"><code class=" hljs perl"><span class="hljs-variable">$cd</span> /<span class="hljs-keyword">local</span></code></pre></pre><p><p>2. Create a new code submission directory, For example, our local source directory Is: kitkat-v1.0-dint, in which the modification, then you can create a directory name called Kitkat-v1.0-dint-temp (name casually, easy to identify which project is the submission Directory) of the folder (do not use the command directly manually established of course, it can 's):</p></p><pre class="prettyprint"><pre class="prettyprint"><code class=" hljs lasso"><span class="hljs-variable">$mkdir</span> kitkat<span class="hljs-attribute">-v1</span><span class="hljs-number">.0</span><span class="hljs-attribute">-dint</span><span class="hljs-attribute">-temp</span></code></pre></pre><p><p>3. Enter the code submission directory:</p></p><pre class="prettyprint"><pre class="prettyprint"><code class=" hljs lasso"><span class="hljs-variable">$cd</span> kitkat<span class="hljs-attribute">-v1</span><span class="hljs-number">.0</span><span class="hljs-attribute">-dint</span><span class="hljs-attribute">-temp</span></code></pre></pre><p><p>4. Synchronize the project manifest file from the server, which is the previous part of the code download command (the code Download command for this example is: repo init-u [email protected]:aosp/manifest-m kitkat-v1.0-dint.xml && Repo sync):<br>$repo init-u [email protected]:aosp/manifest-m kitkat-v1.0-dint.xml</p></p><p><p><strong>Note</strong> : At this point, in this code submission directory, We have our download configuration file, consistent with our source directory kitkat-v1.0-dint, But now we have not downloaded any code to come IN. Here is a critical step to download the library we need to submit. Here comes the concept of libraries, our set of source code, which is stored in the server in the library (similar to the concept of a module, but the dimensions of the partition may be different). therefore, Our submission also corresponds to the library to submit, the most intuitive explanation is that we must be in a file directory under the code to commit, and this directory is a "library."</p></p><p><p>Our top development is mainly related to several libraries are: frameworks/base (in The source Directory/frameworks folder changes submitted to the library), Packages/apps (in the source Directory/packages folder changes submitted to the library), xxx (project Name) _wimdata_ng/wprocedures (in the source directory/xxx (project Name) _wimdata_ng modified the PLF file after the submission to the library).</p></p><p><p>In this example, the Settingsprovider.java class is modified after the submission as an example, the class in the source Directory/frameworks below, therefore,</p></p><p><p>5. We type the following command to synchronize the Library's code from the Server:</p></p><pre class="prettyprint"><pre class="prettyprint"><code class=" hljs bash"><span class="hljs-variable">$repo</span> sync frameworks/base</code></pre></pre><p><p><strong>Description</strong> : At this point, Our Kitkat-v1.0-dint-temp directory is the latest code for the library in the server, and we can think of a class Settingsprovider.java code that is different from the same library code in our local kitkat-v1.0-dint directory. The goal that our submissions want to achieve is to have the same class code in the same library on the server consistent with the code in our local kitkat-v1.0-dint directory. A comparison tool called the Meld Diff Viewer is required below (which teaches how to install later).</p></p><p><p>6. Type the Command:</p></p><pre class="prettyprint"><pre class="prettyprint"><code class=" hljs bash"><span class="hljs-variable">$meld</span></code></pre></pre><p><p>Description: the window interface of the Meld tool can be opened at this Time.</p></p><p><p>6.1 Click on the file in the top menu bar, and tap New to display the interface as Shown:<br><br>Figure x Meld code Import</p></p><p><p>6.2 Click the Browse button behind original in the image to import the unmodified source code, which is the Settingsprovider.java class in the downloaded Kitkat-v1.0-dint-temp directory;</p></p><p><p>6.3 Click the Browse button behind mine in the map to import the modified source code, here is the Settingsprovider.java class in our local source Kitkat-v1.0-dint directory.</p></p><p><p>6.4 Then click OK to see the comparison of this class in the two sets of code, as shown in:<br><br>Figure x Meld code comparison</p></p><p><p><strong>Note</strong> : The right side of the code is locally modified, and the left is the unmodified code downloaded by the server, and the Green identifies the part of the code that is Different. There is a black arrow in the middle, click it to insert the right side of the modification to the LEFT.</p></p><p><p>6.5 Click on the black arrow to import the changes into the left-hand code;</p></p><p><p>6.6 Click the top save button to save the Change.</p></p><p><p><strong>Note</strong> : At this point, the code base in the Kitkat-v1.0-dint-temp directory is the same as the corresponding codebase in Kitkat-v1.0-dint (in this case, the frameworks/base library).<br>At this point, we should slowly understand the Heart. What we need to do next is to synchronize the code in the Kitkat-v1.0-dint-temp to the Server.</p></p><p><p>7. Enter the frameworks/base/in the Kitkat-v1.0-dint-temp directory:</p></p><pre class="prettyprint"><pre class="prettyprint"><code class=" hljs bash"><span class="hljs-variable">$cd</span> frameworks/base/</code></pre></pre><p><p>8. Review the confirmed changes:</p></p><pre class="prettyprint"><pre class="prettyprint"><code class=" hljs bash"><span class="hljs-variable">$git</span> status</code></pre></pre><p><p><strong>Note</strong> : The above command can see whether the current directory has been modified, whether there is a commit update to the server, if there are changes will be modified to display the File.</p></p><p><p>9. Then Enter:</p></p><pre class="prettyprint"><pre class="prettyprint"><code class=" hljs bash"><span class="hljs-variable">$git</span> diff</code></pre></pre><p><p><strong>Note</strong> : This command can display the modified code in the same order as in the previous section on the Gerrit site to view the modified Record.</p></p><p><p>10. Enter the commit code command:</p></p><pre class="prettyprint"><pre class="prettyprint"><code class=" hljs ruby"><span class="hljs-variable">$ </span>/automount/tools/scm_tools/tools/patch_delivery_cli.php -p ff</code></pre></pre><p><p><strong>Description</strong> : At this point, all confirmation work Ok.</p></p><p><p>The above command indicates that the code is submitted using the patch_delivery_cli.php script Tool. Do you remember how to check someone else's PR change record in the front? The script tool automatically inserts a link to the change record in the comments of the PR above bugzilla, which is the patch_delivery_cli.php here, when it comes to the successful submission of our Code. This is coherent up, is there a sense of enlightenment suddenly enlightened? It's time to congratulate you again!</p></p><p><p>11. then enter the corresponding information according to the prompt that appears on the Terminal:</p></p><p><p>11.1 The first is the project selection, it will provide the name number of all items, according to our PR belongs to which item, enter the corresponding number number press Enter.<br><br>Figure X Patch_delivery interface</p></p><p><p>11.2 Next is the output of the bug number and patch comments information, as shown in. Here special note: PR number must be filled in correctly, comments from the Bugzilla website copy can (we in the time of submission of code, generally at the same time Open bugzilla, in order to copy the necessary information). The rest can be filled out according to the prompts, there are no mandatory provisions, but the use of rigorous language style is Advocated. also, When you are finished filling in patch comments, press enter, then go in and out of a "." and then press ENTER to enter the next Step. Other options if you do not want to fill out, also use "." The end of the show, which requires special Knowledge.</p></p><p><p>11.3 finally, confirm the command input Yes.</p></p><p><p><strong>Description</strong> : At this point, the task submitted by the code is submitted to the Gerrit Web Site. It is also recalled that the Gerrit website is used for code REVIEW.</p></p><p><p>12. Login to the Gerrit website, you can see the code we just submitted has generated the submission task, click on the task, set the code reviewer, as shown in:<br><br>Figure x Gerrit Add reviewer</p></p><p><p>Enter Reviewer's mailbox in the input box to the left of the Add Reviewer button and click the button to complete the Add. When added successfully, you can see the reviewer information in the red box where it is Identified.<br><br>Figure x Gerrit Add reviewer success</p></p><p><p>In this way Gerrit website will automatically send mail to the reviewer you set up the mailbox, when he landed Gerrit website can see your revision audit Task.</p></p><p><p>13. Wait for the approval to pass, after passing, Re-login to the Gerrit Website. You can find a submit button on the Gerrit website, as shown in:<br><br>Figure X Gerrit Audit Pass</p></p><p><p>14. Click the Submit button, when the patch appears as a red box message, it's done!<br><br>Figure X Patch submission succeeded</p></p><p><p><strong>Special Note:</strong></p></p><p><p>If not approved, you will be automatically sent to you by the Gerrit website email notification, What you need to do is to re-review and modify the code, and then resubmit. This operation will not be more than repeat it!</p></p><p><p>second, sometimes, We submit the code more anxious, hope to be approved as soon as possible, then, after the submission directly to the code reviewer seat told him more urgent to ask him to review as soon as possible, is the best way.</p></p>26. How do I install the meld Diff Viewer?<p><p>The Meld Diff Viewer is a comparison tool under the Linux platform that allows you to compare files and Directories. Of course, There are also a lot of people using another comparison tool beyond Compare, which is a powerful comparison tool under the Windows platform, but charges need to be cracked. Now that we are working under ubuntu, we can use MELD. It's very concise and free, and it's enough to work with the comparison of our code Submissions.</p></p><p><p>If the system is not installed, you can install it in the following ways:</p></p><p><p>1. Open the terminal and enter the download command:</p></p><pre class="prettyprint"><pre class="prettyprint"><code class=" hljs lasso"><span class="hljs-variable">$sudo</span> apt<span class="hljs-attribute">-get</span> install meld</code></pre></pre><p><p>2. Prompt to enter a password:</p></p><pre class="prettyprint"><pre class="prettyprint"><code class=" hljs bash"><span class="hljs-variable">$eyelike</span>(本机的Ubuntu系统登录密码)</code></pre></pre><p><p>If it appears</p></p><pre class="prettyprint"><pre class="prettyprint"><code class=" hljs applescript"><span class="hljs-keyword">is</span><span class="hljs-keyword">not</span><span class="hljs-keyword">to</span> execute ‘/usr/bin/apt-<span class="hljs-keyword">get</span><span class="hljs-keyword">as</span><span class="hljs-function_start"><span class="hljs-keyword">on</span></span> aclgcl-ubnt22”</code></pre></pre><p><p>error, the sudo permission setting is not Ok. Make the following settings (as the general company for Security reasons, the administrator rights are not delegated to the development engineer personally, so go to the integration Group colleagues to help set up, need root permission):</p></p><p><p>1. Enter the command first:</p></p><pre class="prettyprint"><pre class="prettyprint"><code class=" hljs bash"><span class="hljs-variable">$su</span></code></pre></pre><p><p>2. then enter the Password:</p></p><pre class="prettyprint"><pre class="prettyprint"><code class=" hljs bash"><span class="hljs-variable">$xxxxx</span>(这个集成组管理系统配置的同事知道)</code></pre></pre><p><p>3. Then enter the root account and enter the Command:</p></p><pre class="prettyprint"><pre class="prettyprint"><code class=" hljs bash"><span class="hljs-variable">$vim</span> /etc/sudoers</code></pre></pre><p><p>4. Add the user account code, as Follows:</p></p><pre class="prettyprint"><pre class="prettyprint"><code class=" hljs ">“(复制root账户代码后粘贴,将root字段修改为user即可)”</code></pre></pre><p><p>5. Then save the exit and complete the setup to install the software properly.</p></p>27. How to take over the actual project?<p><p>At this point, the code can already be submitted independently! This is also indicative of the ability to take over the actual project, the heart is inevitably excited and uneasy, this is Normal.</p></p><p><p>In fact, a better rhythm is the beginning of the time to take over some pre-research tasks. Basically any one complete project, beginning with a period of pre-research, used to refer to the project (generally the previously developed projects, many problems similar, many code can refer to the Common) some functional requirements are pre-familiar, Into the project code we are going to develop (you can solve the task directly using the reference code modification). Pre-research task is characterized by a small difficulty factor, but a wide range of tasks, again suitable for familiar with code and practiced hand but! so, Don't worry too much, you've started to have your own output step-by-step into the actual project.</p></p>Message<p><p>At this point, a qualified junior developer has been formed, in time to familiar with a variety of operations and deepen the understanding of the module code and familiarity, you can reach the "sea wide by diving, high-flying birds fly" level. This article is only to the author from the beginning to finally be able to take over the actual project of the problem encountered in the learning process, it is considered necessary to understand the content of the Master. Everything is difficult, in the boundless at a loss once desperately longed for someone, there are articles to jiangshan, also encountered because do not know a little bit of knowledge and spend a lot of time. fortunately, by a lot of colleagues, responsible mentors and other people to help guide, and finally completed the project before the Study. This article is to thank them, but also for like me with the love and passion for Android development of the later write, hope that some of the knowledge can really help them, give them the motivation to Learn. There is inevitably a corrigendum in the text, hoping that they have not made the fundamental mistake of misleading everyone, so it is Satisfied. As the saying goes, knowledge is endless, There are a lot of things not to be expressed, there are very many things did not learn. but, I believe that as long as we have enough foundation, have enough patience to learn to grope, the unknown will eventually become familiar with their own part of the ability, and produce more and greater Value. At the end, give a sentence: "we are all on the road, refueling, and June Mutual encouragement!" ”</p></p><p><p>finally, I enclose some of my favorite shortcuts and knowledge:<br>Appendix I eclipse utility shortcut keys<br>Appendix two Ubuntu Common Terminal shortcut keys<br>Appendix III vim Edit shortcut keys<br>Appendix four what are the pr/fr/rr/cr?</p></p><p><p>[email protected]</p></p> <p><p>Android Developer Tips (iii)</p></p></span>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.