But now it appears Google won't allow the download of new libraries with the new classes like: android.support.v7.widget.RecyclerView
Other than buy a new machine, is there a way to get the support library for android.support.v7.widget.RecyclerView?
If you are using Gradle then you could do something like the following:
I wonder if it could be a matter of downloading the files from a Google Android Repo?
If you are using Gradle
I don't think I am using Gradle. I use Eclipse/Juno
I have not use Eclipse in a few years and I do not not too much about Maven, but I think that you may be able to use that repository.
Google also supplied this link https://dl.google.com/dl/android/maven2/index.html from this page
https://developer.android.com/studio/build/dependencies.html#google-maven which may help you out.
Looking the links you provided I don't see any reference to the android-support-v7-appcompat.jar file that I need to get a newer version of.
https://developer.android.com/studio/build/dependencies.html#gmaven-access wrote:Programmatic access
For programmatic access to Google's Maven artifacts, you can get an XML list of artifact groups from maven.google.com/master-index.xml. Then, for any group, you can view its library names and versions at:
For example, libraries in the android.arch.lifecycle group are listed at maven.google.com/android/arch/lifecycle/group-index.xml.
You can also download the POM and JAR files at:
For example: maven.google.com/android/arch/lifecycle/compiler/1.0.0/compiler-1.0.0.pom.
They say that you can download the JAR file, you just need to know the path to the file.
you just need to know the path to the file
That is often true. I've been to many sites in the last hour and have not found it yet.
I get Error 404 for several of the posted links.
Norm Radder wrote:I get Error 404 for several of the posted links.
From the links that I have provided in the last few posts or from the links that you have tried over the last hour or two?
download and rename the .aar to .jar.
I do not know which version you said that you wanted.
I suspect now that you see the pattern you can download the one you want along with other files if needed
2 steps forward - found RecyclerView class
1 step backwards - problem with Cannot find the class file for android.support.v4.view.NestedScrollingChild2
How did you get those paths to the aar files?
Does this file have what you need?
Google using the following
But you need to know where the package is located and I would have suspected that NestedScrolling is located in android.support.v4, but maybe not
java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v7/appcompat/R$styleable
Something for tomorrow.
Thanks for all your help.
Please remember that it is not suggested that you mix different versions of Android libraries.
I suspect that you should either use version 25 or version 26.1.0 but not both at the same time.
Or do you need to be careful when renaming the classes.jar files?
Norm Radder wrote:Can you determine a library's version by looking at its contents?
I think so, support-v4-26.0.2.jar has a file named AndroidManifest.xml.
In AndroidManifest.xml there is the following XML
I suspect that other files have the same XML file with a corresponding value for which version they are.
It wasn't in all of them
And no you cannot count on AndroidManifest.xml for showing you which version the jar or class is.
1) Install Gradle, which is really a matter of downloading and extracting a file if you are using Windows 10 as noted here https://coderanch.com/t/689645/gradle/build-tools/install-Gradle-Windows
You do not need to keep Gradle running in the background or anything like that at all.
2) Create a simple Gradle build file like this
3) From the command line run the following command gradle -b [nameOfBuildFile] copyDependencies
4) Notice a directory named "dependencies" which has this file and it's related dependencies
I'll take credit for Googling, but I will not take credit for the build script, which I got from https://newfivefour.com/gradle-copy-all-dependencies-into-dir.html
I copied that for the gradle input and uncommented the last 2 compile statements and installed gradle (modified .bat file for debugging)
I get this:
D:\Android\_MyStuff\EclipseSupportLibraryProblem>D:\gradle-4.5-all\gradle-4.5\bin\gradleTest.bat -b GetLib.gradle copyDependencies
FAILURE: Build failed with an exception.
* What went wrong:
Could not resolve all files for configuration ':compile'.
> Could not find android.support.v4:26.1.0:.
> Could not find android.support.v7:26.1.0:.
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 1s
1 actionable task: 1 executed
It worked when I restored the comments for the last two compile statements.
Please note that I did comment out the following two lines in my previous example
Maybe you do need to set the Windows path variable to include gradle?
You can name the Gradle file anything you want, I named it gradle.build.
In my gralde.build I have this:
From the command line I used this line:
gradle -b gradle.build copyDependencies
If you try with the contents of the file as listed in this post do you get a successful result?
Where did you get the names like appcompat and cardview
and the version numbers like v7:26.1.0 ?
The batch file I use to run gradle:
Norm Radder wrote:Where did you get the names like appcompat and cardview
and the version numbers like v7:26.1.0 ?
Android Studio, a project I was working on.
But I think that you can get that from https://developer.android.com/reference/packages.html as shown here
https://developer.android.com/reference/android/support/v7/widget/CardView.html in the top right hand corner you see this:
added in version 25.1.0
belongs to Maven artifact com.android.support:cardview-v7:27.0.0
Summary: XML Attrs | Inherited Constants | Inherited Fields | Ctors | Methods | Protected Methods | Inherited
Knowing which each library does it a different matter.
There is also some information in the Android SDK manager as shown in the attached image.
After all, we are all in this together and I'm glad I could help.