New features
Quick fixes / Context Actions
- Introduce local variable, quickly declare the return type of the method that you are long pressing on. The completion engine will ensure that the introduced variable name is unique. (Currently supported expressions are method calls and new class declarations).
- Add throws fix, automatically add
throws ExceptionName
to the method containing the call. - Surround with try catch, surround the current expression with a try catch block catching the exception thrown.
- Add catch clause, if there is an existing try catch block surrounding the expression, this will add a new catch block catching the exception.
To invoke quick fixes / context actions, long press on the underlined errors or the code that you want to perform an action on.
Smarter suggestions for generic types
- The completion engine will now show proper types of objects with generic types. e.g.
List<String> list = new ArrayList<>();
list.<cursor position>
The completion engine will show
add(String string);
instead of
add(E e);
Library Manager
Adding dependencies through the build.gradle
file is NO LONGER SUPPORTED. CodeAssist will no longer try to parse them. To add new libraries there is now a library manager. To access it tap the folder icon on the top right of the home screen and then press the library manager text.
To add a dependency, tap the Floating Action Button and type the proper groupId, artifactId and versionName of your library. Excluding dependencies from a particular library will be supported soon.
Viewing dependencies
To view the dependencies of a library that you have added, long press the item and tap View all dependencies
. Fetching POMs may take a while on slow internet connections.
Faster Dependency Resolution
The app now includes a list of commonly downloaded POMs of libraries. This will significantly reduce dependency resolutions times as individually downloading POMs takes the longest time in dependency resolution.
Editing layout attributes
Although there is no proper UI yet for layout editor, you can now edit the attributes of the layout by pressing the view that you want to edit on. There is no validation yet. There is also a plus (+) button below the attributes for you to choose to add from the available attributes based on the current view type and its parent. e.g. If the view type is TextView
, you will have a list of its attributes and also the attributes of View
. If it's parent is a ConstraintLayout
, it will also have the app:layout_constraintLeft_toLeftOf
and other attributes of a ConstraintLayout child.
Jar Corruption Check
Previously if a jar has been corrupted after the user's connection has been lost it will crash the app. Now there's several checks in place to detect jar corruption. First is in dependency resolution, if a jar file is corrupt it will be deleted and re-downloaded again. Second check is before compilation, if a jar file is corrupt it wont get deleted but will simply be ignored from the classpath.
AAR Native Libraries and Assets
If you are using a library that has assets and native libraries, CodeAssist will now properly add them to the APK.