3

I have access to the internet 1 time per week so in this time I download dependencies - for UI and animation - but I don't know how to implement it in the project when I'm offline.

I fond solution by adding this line of code.

But when I download the dependencies from GitHub I cant find the JAR file.

Sorry for the bad English.

JorgeAmVF
  • 1,660
  • 3
  • 21
  • 32
  • Just add them in your `build.gradle` file and sync your project. The libraries should be available offline. If you are planning to add another, then you need the access to the internet. Otherwise its fine. – Reaz Murshed Mar 05 '18 at 02:35
  • Most of the dependencies we can add offline but some dependencies like google maven ,for that you need one time internet to download it, after that we can add them offline too. – Arjun Mar 05 '18 at 03:25
  • i fond this answer and it's work fine for me thank you all https://stackoverflow.com/questions/41764338/importing-module-in-android-studio – Ahmed Laoun Mar 05 '18 at 12:42

1 Answers1

1

After download library, import to Android Studio, then build will now create an AAR file instead of an APK.

When you want to build the AAR file, select the library module in the Project window and then click Build > Build APK.

Now add you library as a dependency

Add the compiled AAR file (the library must be already built): 1. Click File > New > New Module. 2. Click Import .AAR Package then click Next. 3. Enter the location of the compiled AAR file then click Finish.