Differences between Android Studio versions

  

2.3.2 -> 3.0.1  Gradle version is 4.1    com.android.tools.build:gradle:3.0.x

  • Android Monitor was replaced with Android Profile;
  • New projects need to be configured in gradle.properties android.enableAapt2=false To compile and pass;
  • compile is not recommended, Google recommends using the new implement and api;
    •   api : It is completely equivalent to the compile command, there is no difference, you change all compiles to api, there is nothing wrong with it.
    •   implement: The feature of this command is that, for the dependencies compiled using this command, the projects that depend on the project will not be able to access any programs in the dependencies compiled using this command, that is, the dependencies are hidden internally, not correct External disclosure.
    •   Suggestion : There is a suggestion mentioned in the Google IO related topic, that the dependency should be set to implement first. If there is no error, then use the implement, if there is an error, then use the api instruction, which will speed up the compilation. .
compile fileTree(dir: 'libs', include: ['*.jar'])

But after 3.0 it is written as

implementation fileTree(dir: 'libs', include: ['*.jar'])
or
api fileTree(dir: 'libs', include: ['*.jar'])

 

3.0.1->3.1.2   Gradle version is 4.4   com.android.tools.build:gradle:3.1.x

  • compile is no longer available;
  • android.enableAapt2=false cannot be used, it needs to be configured to true, and the documentation suggests that this setting will be completely deleted by the end of 2018;
  • Don't use the built-in JDK, use your own;

 

Warning: It is best not to upgrade, make a backup before upgrading, or you will be trapped to death. . . Is it easy to do development? Write code, work overtime, and be tortured by all kinds of junk software. . . Convex (Fuck Duck)

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324937746&siteId=291194637