Recyclerview URL Error


#1

While creating an Android version build in Ionic we are facing the following error.

A problem occurred configuring root project ‘android’.

Could not find recyclerview-v7.jar (com.android.support:recyclerview-v7:26.1.0).
Searched in the following locations:
https://jcenter.bintray.com/com/android/support/recyclerview-v7/26.1.0/recyclerview-v7-26.1.0.jar

The plugins used are as follows:
com-sarriaroman-photoviewer 1.1.16 “PhotoViewer”
com.dbaq.cordova.contactsPhoneNumbers 0.0.9 “Contacts Phone Numbers”
com.synconset.imagepicker 2.1.8 “ImagePicker”
cordova-open-native-settings 1.5.1 “Native settings”
cordova-plugin-accountkit 1.4.0 “Cordova AccountKit”
cordova-plugin-add-swift-support 1.6.2 “AddSwiftSupport”
cordova-plugin-badge 0.8.1 “Badges”
cordova-plugin-browsertab 0.2.0 “cordova-plugin-browsertab”
cordova-plugin-camera 2.4.1 “Camera”
cordova-plugin-compat 1.2.0 “Compat”
cordova-plugin-console 1.0.5 “Console”
cordova-plugin-contacts 2.3.1 “Contacts”
cordova-plugin-crop 0.3.1 “CropPlugin”
cordova-plugin-device 1.1.4 “Device”
cordova-plugin-email 1.2.6 “EmailComposer”
cordova-plugin-facebook4 1.9.1 “Facebook Connect”
cordova-plugin-geolocation 2.4.3 “Geolocation”
cordova-plugin-googleplus 5.1.1 “Google SignIn”
cordova-plugin-image-picker 1.1.1 “ImagePicker”
cordova-plugin-inappbrowser 1.7.1 “InAppBrowser”
cordova-plugin-nativegeocoder 1.0.2 “NativeGeocoder”
cordova-plugin-network-information 1.3.4 “Network Information”
cordova-plugin-request-location-accuracy 2.2.2 “Request Location Accuracy”
cordova-plugin-splashscreen 4.0.3 “Splashscreen”
cordova-plugin-statusbar 2.2.2 “StatusBar”
cordova-plugin-whitelist 1.3.1 “Whitelist”
cordova-plugin-x-socialsharing 5.1.8 “SocialSharing”
cordova.plugins.diagnostic 3.6.7 “Diagnostic”
es6-promise-plugin 4.1.0 “Promise”
info.protonet.imageresizer 0.1.1 “Image Resizer”
ionic-plugin-keyboard 2.2.1 “Keyboard”
mx.ferreyra.callnumber 0.0.2 “Cordova Call Number Plugin”
onesignal-cordova-plugin 2.3.1 “OneSignal Push Notifications”

Configuration Information:
cli packages: (D:\ionic\konektd-v2\node_modules)

@ionic/cli-utils  : 1.19.0
ionic (Ionic CLI) : 3.19.0

global packages:

cordova (Cordova CLI) : 7.1.0

local packages:

@ionic/app-scripts : 1.3.7
Cordova Platforms  : android 6.3.0
Ionic Framework    : ionic-angular 3.1.1

System:

Android SDK Tools : 25.2.5
Node              : v6.10.3
npm               : 5.6.0
OS                : Windows 10

Environment Variables:

ANDROID_HOME : C:\Users\Admin\AppData\Local\Android\android-sdk

Misc:

backend : pro

Could someone let us know what could be the cause of this issue and the possible solution?

Thanks,
Manoj


#2

Same issue here, will update if I find a workaround. It seems jcenter just removed all their .jar files?


#3

Thank you for your reply
Is there any reason for which ionic uses recyclerview and can that be avoided? Alternatively is there another option to recyclerview?

Thanks
Manoj


#4

I simply wrote a pre build hook to swap the ordering of maven and jcenter in the gradle files.


#5

can you let me know how i can do this too? i haven’t done this before please can you share your code with me.

Thanks
Manoj


#6

I have the same issue.
A few days ago it was ok


#7

You need jcenter below maven in build.gradle.
example for you

allprojects {
    repositories {

        maven {
            url "https://maven.google.com"
        }
        jcenter()
    }
}

I hope this will help


#8

Thank you i have also done that changes i got that solution from the below link