I'm trying to use a library from GitHub in my Android Studio Project (specifically, the Universal Image Loader https://github.com/nostra13/Android-Universal-Image-Loader).
My project has been crashing, due to an error with a variable called mMaxHeight, in a file called ImageViewAware.java
On the GitHub page, I see that this issue was 4 fixed months ago:
When I view the code in ImageViewAware.java on GitHub, I see that the issue is fixed.
However when I look at the version of ImageViewAware.java being used in my Android Studio, I see it's an older version, with the issue not fixed.
I've added
implementation 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
to my Gradle Dependency, as the documentation says, and have followed all other instructions I can see.
I notice that the last update to those instructions was over a year ago. Should I be implementing a newer version than 1.9.5? Is there another reason why the version in my Android Studio isn't getting the latest GitHub version?
I'm pretty new to this and feeling a bit out of my depth. Thanks for any help!
Alex
You are correctly using the latest published version of the library, v1.9.5.
However, there have been 23 unreleased commits to that library since then, as shown on the GitHub tags page:
To get the latest version of the code, you'll need to:
Download the library's zip.
Unzip it.
Manually add the dependency to your project.
This process is pretty straightforward, you may also be interested in this list of every difference between v1.9.5 and master.
However, I'd recommend against using this library if possible, given that it hasn't had a release / major update in 4.5 years! In the readme the author states he has stopped maintaining it. It also has over 400 open issues, despite the popularity.
More modern libraries like Picasso and Glide are much more widely supported, feature rich, and reliable.
Related
I am using some old dependencies in my Android project. But now I am updating the dependencies to latest one. Before update how to check what are the changes is made in latest dependencies. Is there any tool or procedure to check the difference between two dependencies.
I am using 'com.squareup.okhttp3:logging-interceptor:3.12.3'. Now the latest version is 'com.squareup.okhttp3:logging-interceptor:4.10.0'. So before update I want to confirm that existing flow should not break. Many users are using my app. So please suggest me ideas to check the difference between two dependencies.
You can also check the changelog available here or on Github.
But in your case, when you're upgrading to the next major version, all libraries usually provide some kind of migration tutorial. For okHttp v3 -> v4 you'll find it here.
you can check the github page here and view differences between branches as there is a one for pretty much every version.
When I create a empty Android Studio Application, in there I have some questions:
What's the meaning of Failed to load stats. Value maybe out of date?
What's the meaning of support instant apps? If I check it, what will happen?
What's the meaning of androidx.* artifacts?
1)It couldn't load more recent stats on usage of various OS versions. Probably because Google has only been exporting them every few months lately, instead of weekly. Don't worry about this
2)Its a native app that can be loaded from a website (needs to be small) instead of being installed. If you don't know what it is, you probably don't need it.
3)Google recently rebranded the Support Library as androidx. This causes problems when some libraries use the support version of a class and some the androidx version. This tells the app to try to use the androidx libraries where dependencies want the support libraries.
I honestly think Google really did not do a great job at keeping their Android documentation and training guides up to date. Numerous times I encountered situations where the documentation refers to samples that no longer exist.
Most recently I've been trying to learn about animation for Android.
Google seems to have a good API guide about animation:
https://developer.android.com/guide/topics/graphics/prop-animation.html
The guide refers to sample "com.example.android.apis.animation" in the API Demos sample. If you click on the "API Demos" link on that page, it brings you to another page with other samples.
After a bit of searching, I found the older samples have been moved and they can now be downloaded from git using this command:
git clone https://android.googlesource.com/platform/development
Once downloaded, the sample I am looking for can be found at "samples/ApiDemos". The only problem now is those samples don't have a build.gradle file. They must have been created at a time when gradle was not being used yet.
I am obviously new to Android and I am trying to learn the ropes. I am using android studio to build my projects. All the tutorials I've been reading use gradle to build the android application.
My question is in this post is (1) how to get to the older samples that are referred throughout the current Android API guides like the example above, I hope I have identified the correct git repo. (2) How the heck can I compile those older samples.
(1) how to get to the older samples that are referred throughout the current Android API guides like the example above, I hope I have identified the correct git repo.
The only way is to google and try to find them. There is no central repo for old versions of those (at least none that I'm aware of)
(2) How the heck can I compile those older samples.
Instead of opening those projects normally, close your current project (File > Close Project) and then choose "Import from Eclipse". This will look into all configs and generate a build.gradle for you.
Given the recent updates I'm a little lost on what I should be using now.
I have been using gradle-experimental successfully but it still misses some of the build options default gradle has.
The gradle-experimental documentation has not been updated so it gives the impression that it is still necessary for ndk projects, but given how google do documentation it could just be out of date.
Any light cast on this would be very welcome and let me rest easy.
Thanks
In my project I am integrating push notification for that I require classes from com.google.android.gms package.
Is it possible for me to include selected package from whole library?
I am using eclipse. actually there are lot more libraries required, due to which I am facing 65k multidex issue. Any solution?
If you really really want to use the Eclipse to compile this, you need to perform these steps:
Have someone with Android studio include your needed Google components as dependency.
Kidnap the components from exploded-aar Android studio folder and setup the components as your own Eclipse library.
But of course, this is highly not a recommended procedure, but this is for those people who desperately needs it as last resort. This also marks a disclaimer that the kidnapped libraries are already free from the developer's accountability, because you didn't compile it the right way.
PS. Did this with Google Maps
If you want to use selective components of the Google Play Services you will need to switch to Android studio.
Read this: (Source)
Important: Support for the Android Developer Tools (ADT) in Eclipse
has ended, per our announcement. You should migrate your app
development projects to Android Studio as soon as possible. For more
information on transitioning to Android Studio, see Migrating from
Eclipse ADT.
If you still want to continue using eclipse, you'll have to to the hard work yourself - of deleting the unwanted packages/components from the full source code and making sure it compiles and works fine.
Instructions of setting up selective APIs can be found on this page, for android studio. For Eclipse, as the documentation says nothing about setting up selective APIs, you just have to go with the whole set.
NO. you have to migrate your code to Android Studio.