FAQ Rollup in Android Studio

Source: Internet
Author: User

When you switch from Eclipse to Android Studio (hereinafter referred to as), I think normal people will scold Google's product manager,
But in the end you have to use as, no way on GitHub most are built with it;
It's really hard to make a good tool for programmers, and I don't think everyone likes to waste time in the compilation environment, and just want to focus on code;
When you use the as demo from the Internet, I think at least 80% of the possibilities you need to change the code to run,
At the moment I'm down from GitHub on at least 20 projects, the probability of changing the code is 100%, yes, it is 100%;
So far I have not a project can be imported directly after, more or less the emergence of such a problem;
Maybe someone would say you're not gradle deserve it, I ...!
When I switched from win to Mac, I only used a seamless switch over 2 years ago,
Switching from Max to Maya took only a few hours ... ;
But it's not as crazy as it is now to switch from Eclipse to Android studio.
I don't know how long this madness will last ... It's a little far.

All right! Tell me about all the different questions I've had on the as, of course, these are not problems now, but you might come across them, and that's a definite thing:

How do I delete files in?
    • Originally deleted in eclipse that is very simple, did not think in Android Studio is so troublesome, at the beginning of the right button is not deleted button, to right-click on the open Module settings in the modules minus minus to recall the delete button, You think it's going to be erased, too native!
    • Call out the Delete button is special is not clickable, has deleted the button on the left, can not let people use, tease me to play it? Then we have to delete under the safe delete under Refactor, fortunately, the selected file can be deleted directly by pressing DELETE;
How do I clear the list on the left?
    • Open as when the left side of the recent projects sometimes a lot, a little annoying want to clear out, how to do?
    • For example, File->open recent->clear List Click on the clear, the instant interface refreshing
How do I set shortcut keys and code font styles in as?
    • When switching from eclipse to as, the shortcut keys are quite time-consuming, fortunately as gives us the eclipse of the shortcut key mode, we directly set up to eclipse, in the preferences under the Keymap to choose your favorite shortcut key mode, What I'm used to here is Eclipse (Mac OS X)
    • How to set the black style, as the default time is lime, not Diablo, or in preferences, appearance theme Choose Darcula Click Apply or OK button, style instantly cool, like Maya and 3dsMax style
    • So how do you set the font and size of the code?
      In the editor of the colors&fonts under the Font option click on the right Display settings options, scheme default is not editable, so you must first click on Save as a new style, enter the name and click OK
    • Found below editor font can be edited, then select font, set size ... Click the Apply or OK button to get it done.
Adding overloaded functions and setting the set Get method in Android Studio
    • Sets the set get method, right-->generate->getter and Setter
      Overloaded functions: Right---generate-override method-Select the function you want to overload. Or in the Override methods under the menu code.

When importing Android Studio error: (0) cannot invoke method minus () on null object
    • SOURCE Http://stackoverflow.com/questions/19487576/gradle-build-null-console-object
      Workaround: Enter the./gradlew Assemblerelease–no-daemon in the terminal.
Fix Gradle DSL method not found: ' Android () '
    • This problem troubled me for a long time, well, with Baidu searched for half a day are all runproguard, and finally found the solution on the StackOverflow:
      Specific: http://stackoverflow.com/questions/27735646/android-studio-gradle-dsl-method-not-found-android-error17-0
      Erase the outermost build.gradle.

{         compileSdkVersion 19         buildToolsVersion ‘21.1.1‘     }
    • And then re-refresh it ok.
As appears Gradle ' xxx ' project refresh failed?
    • Open the Preferences settings search Gradle and then in the Gradle VM options input-xmx512m or-xmx768m;
As Error: (1, 0) Plugin with id ' com.android.application ' not found.

Add the following code refresh (try again) in the outermost build.gradle of the project:

{     repositories {          mavenCentral()     }     {          classpath ‘com.android.tools.build:gradle:1.2.3‘     }{     repositories {          mavenCentral()     }}

Cond......

FAQ Rollup in Android Studio

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.