• Guest
HabraHabr
  • Main
  • Users

  • Development
    • Programming
    • Information Security
    • Website development
    • JavaScript
    • Game development
    • Open source
    • Developed for Android
    • Machine learning
    • Abnormal programming
    • Java
    • Python
    • Development of mobile applications
    • Analysis and design of systems
    • .NET
    • Mathematics
    • Algorithms
    • C#
    • System Programming
    • C++
    • C
    • Go
    • PHP
    • Reverse engineering
    • Assembler
    • Development under Linux
    • Big Data
    • Rust
    • Cryptography
    • Entertaining problems
    • Testing of IT systems
    • Testing Web Services
    • HTML
    • Programming microcontrollers
    • API
    • High performance
    • Developed for iOS
    • CSS
    • Industrial Programming
    • Development under Windows
    • Image processing
    • Compilers
    • FPGA
    • Professional literature
    • OpenStreetMap
    • Google Chrome
    • Data Mining
    • PostgreSQL
    • Development of robotics
    • Visualization of data
    • Angular
    • ReactJS
    • Search technologies
    • Debugging
    • Test mobile applications
    • Browsers
    • Designing and refactoring
    • IT Standards
    • Solidity
    • Node.JS
    • Git
    • LaTeX
    • SQL
    • Haskell
    • Unreal Engine
    • Unity3D
    • Development for the Internet of things
    • Functional Programming
    • Amazon Web Services
    • Google Cloud Platform
    • Development under AR and VR
    • Assembly systems
    • Version control systems
    • Kotlin
    • R
    • CAD/CAM
    • Customer Optimization
    • Development of communication systems
    • Microsoft Azure
    • Perfect code
    • Atlassian
    • Visual Studio
    • NoSQL
    • Yii
    • Mono и Moonlight
    • Parallel Programming
    • Asterisk
    • Yandex API
    • WordPress
    • Sports programming
    • Lua
    • Microsoft SQL Server
    • Payment systems
    • TypeScript
    • Scala
    • Google API
    • Development of data transmission systems
    • XML
    • Regular expressions
    • Development under Tizen
    • Swift
    • MySQL
    • Geoinformation services
    • Global Positioning Systems
    • Qt
    • Dart
    • Django
    • Development for Office 365
    • Erlang/OTP
    • GPGPU
    • Eclipse
    • Maps API
    • Testing games
    • Browser Extensions
    • 1C-Bitrix
    • Development under e-commerce
    • Xamarin
    • Xcode
    • Development under Windows Phone
    • Semantics
    • CMS
    • VueJS
    • GitHub
    • Open data
    • Sphinx
    • Ruby on Rails
    • Ruby
    • Symfony
    • Drupal
    • Messaging Systems
    • CTF
    • SaaS / S+S
    • SharePoint
    • jQuery
    • Puppet
    • Firefox
    • Elm
    • MODX
    • Billing systems
    • Graphical shells
    • Kodobred
    • MongoDB
    • SCADA
    • Hadoop
    • Gradle
    • Clojure
    • F#
    • CoffeeScript
    • Matlab
    • Phalcon
    • Development under Sailfish OS
    • Magento
    • Elixir/Phoenix
    • Microsoft Edge
    • Layout of letters
    • Development for OS X
    • Forth
    • Smalltalk
    • Julia
    • Laravel
    • WebGL
    • Meteor.JS
    • Firebird/Interbase
    • SQLite
    • D
    • Mesh-networks
    • I2P
    • Derby.js
    • Emacs
    • Development under Bada
    • Mercurial
    • UML Design
    • Objective C
    • Fortran
    • Cocoa
    • Cobol
    • Apache Flex
    • Action Script
    • Joomla
    • IIS
    • Twitter API
    • Vkontakte API
    • Facebook API
    • Microsoft Access
    • PDF
    • Prolog
    • GTK+
    • LabVIEW
    • Brainfuck
    • Cubrid
    • Canvas
    • Doctrine ORM
    • Google App Engine
    • Twisted
    • XSLT
    • TDD
    • Small Basic
    • Kohana
    • Development for Java ME
    • LiveStreet
    • MooTools
    • Adobe Flash
    • GreaseMonkey
    • INFOLUST
    • Groovy & Grails
    • Lisp
    • Delphi
    • Zend Framework
    • ExtJS / Sencha Library
    • Internet Explorer
    • CodeIgniter
    • Silverlight
    • Google Web Toolkit
    • CakePHP
    • Safari
    • Opera
    • Microformats
    • Ajax
    • VIM
  • Administration
    • System administration
    • IT Infrastructure
    • *nix
    • Network technologies
    • DevOps
    • Server Administration
    • Cloud computing
    • Configuring Linux
    • Wireless technologies
    • Virtualization
    • Hosting
    • Data storage
    • Decentralized networks
    • Database Administration
    • Data Warehousing
    • Communication standards
    • PowerShell
    • Backup
    • Cisco
    • Nginx
    • Antivirus protection
    • DNS
    • Server Optimization
    • Data recovery
    • Apache
    • Spam and antispam
    • Data Compression
    • SAN
    • IPv6
    • Fidonet
    • IPTV
    • Shells
    • Administering domain names
  • Design
    • Interfaces
    • Web design
    • Working with sound
    • Usability
    • Graphic design
    • Design Games
    • Mobile App Design
    • Working with 3D-graphics
    • Typography
    • Working with video
    • Work with vector graphics
    • Accessibility
    • Prototyping
    • CGI (graphics)
    • Computer Animation
    • Working with icons
  • Control
    • Careers in the IT industry
    • Project management
    • Development Management
    • Personnel Management
    • Product Management
    • Start-up development
    • Managing the community
    • Service Desk
    • GTD
    • IT Terminology
    • Agile
    • Business Models
    • Legislation and IT-business
    • Sales management
    • CRM-systems
    • Product localization
    • ECM / EDS
    • Freelance
    • Venture investments
    • ERP-systems
    • Help Desk Software
    • Media management
    • Patenting
    • E-commerce management
    • Creative Commons
  • Marketing
    • Conferences
    • Promotion of games
    • Internet Marketing
    • Search Engine Optimization
    • Web Analytics
    • Monetize Web services
    • Content marketing
    • Monetization of IT systems
    • Monetize mobile apps
    • Mobile App Analytics
    • Growth Hacking
    • Branding
    • Monetize Games
    • Display ads
    • Contextual advertising
    • Increase Conversion Rate
  • Sundry
    • Reading room
    • Educational process in IT
    • Research and forecasts in IT
    • Finance in IT
    • Hakatonas
    • IT emigration
    • Education abroad
    • Lumber room
    • I'm on my way

Go to Androidx or an exciting journey on the rake

The theme of the transition to Androidx is now in the air. There are already A short article in English from Daniel Lew , there are Report 3-333214. . But they all quite superficially consider the transition scenario described in
Google documentation

 3r33333. I want to share my experience. In my project, Moxy and Cicerone are used, I find my experience interesting, because the official telegram channels of these libraries periodically raise the question of when they will be transferred to Androidx.
 3r33333. 3r314.
 3r33333.
 3r33333. 3r3198. Just Migrate to AndroidX
 3r33333.
 3r33333. In order to translate a project on Androidx, you need to follow a few simple steps:
 3r33333. 1. Install 3r3192. compileSdkVersion 28 [/i] and 3r3192. targetSdkVersion 28 [/i] , update all support libraries to the latest versions.
 3r33333. 2. In the file 3-333180. gradle.properties [/b] add lines:
 3r33333. 3r3338. android.useAndroidX = true
android.enableJetifier = true
3r3342.
 3r33333. 3. If you are already using Android Studio 3.? then use refactoring: 3r-3200.  3r33333. Go to Androidx or an exciting journey on the rake  3r33333. He will do more (or less) for you.
 3r33333. If you, for some reason, do not use Git, or another version control system, then at this stage you will have a chance to make a project archive:
 3r33333.  3r33333.
 3r33333. Click the Migrate button, choose where to save the archive, and after a while, we get the result of checking the project before refactoring: 3r-3200.  3r33333. 3r361.
 3r33333.
 3r33333. Here we see which dependencies in build.gradle and in import directives will be replaced. On the example of the MainActivity class, as can be seen in the screenshot above, one dependency will be replaced: android.support.v4.view.GravityCompat , but if we open this class, we will see that in fact there are three more dependencies that need to be replaced:
 3r33333.  3r33333.
 3r33333. I did not understand the reason for this selective behavior, but these dependencies will have to be corrected manually. Click "Do Refactor".
 3r33333.
If you are not using Android Studio 3.? then all dependencies are manually edited by [/b] 3r380. It will be necessary to change the dependencies in build.gradle (for clarity, I commented out the old dependencies):
 3r33333.  3r33333.
 3r33333. A complete list of replacements can be found 3r390. here is
.
 3r33333. Then synchronize the project with Gradle, and get a bunch of errors. These are import directives in your classes, they refer to old packages, you need to change them according to 3r3394. this table
.
 3r33333. 3r33333. 3r33333.
 3r33333.
 3r33333. So, since the studio could not replace all the dependencies (maybe you could, then you can be congratulated), when you try to build a project, you will see a similar list of errors: 3r33200.  3r33333.  3r33333.
 3r33333. Having opened a class with errors, we will see something like this:
 3r33333. 3r3113.
 3r33333.
 3r33333. We delete the obsolete dependencies, and by the Alt + Enter hotkey we import classes from the package. androidx
 3r33333. 3r3122.
 3r33333.
 3r33333. Thus we fix all the classes. If the error is not related to the “import”, do not pay attention to it, most likely it is due to the same problems in another class.
 3r33333. For example: 3r33200.  3r33333.  3r33333.
 3r33333. Here, errors are due to the fact that the TimelineView class also needs to fix problems with imports. When all the errors are corrected, we build the project again, and perhaps we get a list of errors again, only in other classes, the process is iteratively continued.
 3r33333. For errors with classes that are generated (Dagger or DataBinding), at this stage do not pay attention. If there are no errors in your classes, and the studio swears only on the generated code, then you need to run the Clean Project and the Rebuild Project.
 3r33333. 3r33140.
 3r33333. If that doesn't help, you can try clearing the studio cache:
 3r33333. 3r3145.
 3r33333. You will have to clear the cache at least once to correctly create classes that generate a DataBinding or Room.
 3r33333.
 3r33333. 3r3198. External libraries 3r3-3999.
 3r33333. Generally, the flag android.enableJetifier = true we installed it just so that at the project build stage, the dependencies of external libraries were replaced with the corresponding AndroidX dependencies automatically, but for some reason, for me, this does not happen.
 3r33333. In any case, before doing what is described below, make sure that you have this problem and that the latest versions of the libraries you use are not yet translated to AndroidX.
 3r33333.
 3r33333. 3r3186. Moxy 3r3r7187.
 3r33333. 3r3192. MainActivity [/i] in my project inherited from MvpAppCompatActivity This class is Moxy, which, at the time of this writing, has not yet been translated to AndroidX. To solve this problem, I copied the class to my project, in a separate package androidx and fixed dependencies in it. The class name is best left unchanged, so it will be easier to update dependencies.
 3r33333. The same procedure needs to be done for fragments, for the class MvpAppCompatFragment .
 3r33333. Note that in these classes there is a generic, in the field mMvpDelegate , do not forget to fix the dependency in it, it is easy not to notice, because it is a dependency on the Moxy class, and not on the support library class.
 3r33333.
 3r33333. 3r3186. Cicerone
 3r33333. To solve problems with Cicerone, I had to create in my project a copy of the class. SupportAppScreen and 3r3192. SupportAppNavigator [/i] . Please note that the SupportAppNavigator class depends on SupportAppScreen. Do not forget to correct this dependence on your copy.
 3r33333.
 3r33333. 3r3198. Conclusions 3r-33199.
 3r33333. The transition to AndroidX, an exciting experience, and perhaps, if you do not have an urgent need, it is worth a little delay with it. After all, then, when most of the rake is removed from your path, it will be easier and faster to do this. But personally, I am pleased that I have gone this way, the bumps on my forehead will heal, and the useful experience will remain with me. 3r33333. 3r33333. 3r33333. 3r33333.
3r33333. 3r33333. 3r33333. 3r33333.
Only registered users can participate in the survey. Enter , you are welcome.
3r33333. 3r33333.
3r33333.
3r33333.
Have you switched to AndroidX? 3r33333. 3r33333. 3r33333. 3r33333. 3r33333.
3r33333.
3r33333. 3r33232. 3r33333.
3r33333. 3r33333.
3r33333. 3r3309. 3r33333. 3r33311. 3r33333.
3r33333. Yes, there were similar problems. 3r33333. 3r33333. 3r33333. 3r33333. 3r33333.
3r33333. 3r3309. 3r33333. 3r33311. 3r33333.
3r33333. Yes, and this is not the main rake, I will share in the comments. 3r33333. 3r33333. 3r33333. 3r33333. 3r33333.
3r33333. 3r3309. 3r33333. 3r33311. 3r33333.
3r33333. Yes, but it was much easier. 3r33333. 3r33333. 3r33333. 3r33333. 3r33333.
3r33333. 3r3309. 3r33333. 3r33311. 3r33333.
3r33333. No, but right now I'll do it. 3r33333. 3r33333. 3r33333. 3r33333. 3r33333.
3r33333. 3r3309. 3r33333. 3r33311. 3r33333.
3r33333. No, wait for it to be easier. 3r33333. 3r33333. 3r33333. 3r33333. 3r33333.
3r33333. 3r3309. 3r33333. 3r33311. 3r33333.
3r33333. No, I do not understand why it is, and so everything works. 3r33333. 3r33333. 3r33333. 3r33333. 3r33333.
3r33333.
3r33333. 3r33333.
3r33333. 3r33333. 3r33333. 3r33333. 6 users have voted. Abstained 2 users. 3r33333. 3r33333. 3r33333.

It may be interesting

  • Comments
  • About article
  • Similar news
This publication has no comments.

weber

Author

22-11-2018, 14:27

Publication Date

Development / Programming

Category
  • Comments: 0
  • Views: 280
SHOCK! New software for phishing does
Let's talk about metrics as a way to
“How to turn a simple project into a
Rome Club Report 201? Chapter 1.5: The
Egocentric daffodils are inferior in
Notes IoT provider. Case: we make a
Write a comment
Name:*
E-Mail:


Comments
Visit Our website If You Need Custom thanksgiving couple shirts, Shirts For Your Company, Family Or Friends & We’ll Cook Something Special for you!
Yesterday, 21:10

raymond weber

Inursing test bank was very pleased  to find this site.I wanted to thank you for this great read!! I definitely  enjoying every little bit of it and I have you bookmarked to check out new  stuff you post.  
Yesterday, 18:20

taxiseo2

You completed certain  reliable points there. I did a search on the subject and found nearly all  persons will agree with your blog.  
nursing test bank
Yesterday, 18:04

taxiseo2

Great post i must say  and thanks for the information. Education is definitely a sticky subject.  However, is still among the leading topics of our time. I appreciate your  post and look forward to more.
nursing test bank
Yesterday, 17:29

taxiseo2

So good! This web post provides knowledge, knowledge, good news, and is very useful. Thank you for everything Taxi Driver Jacket
Yesterday, 15:35

MalenaMorgan

Adv
Website for web developers. New scripts, best ideas, programming tips. How to write a script for you here, we have a lot of information about various programming languages. You are a webmaster or a beginner programmer, it does not matter, useful articles will help to make your favorite business faster.

Login

Registration Forgot password