Reputation: 1555
I added onesignal-cordova-plugin to my project very well, but when I want to build (ionic cordova run android
) I got this error :
Observed package id 'build-tools;26.0.0-rc1' in inconsistent location 'E:\SDK\build-tools\26.0.0-preview' (Expected 'E:\SDK\build-tools\26.0.0-rc1')
Errors during XML parse:
White spaces are required between publicId and systemId.
org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 62; White spaces are required between publicId and systemId.
javax.xml.bind.UnmarshalException
- with linked exception:
[org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 62; White spaces are required between publicId and systemId.]
Additionally, the fallback loader failed to parse the XML.
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'android'.
> Could not resolve all dependencies for configuration ':_debugApkCopy'.
> Could not resolve com.android.support:support-v4:[26.0.0,26.1.0).
Required by:
project : > com.onesignal:OneSignal:3.6.1
> Could not resolve com.android.support:support-v4:[26.0.0,26.1.0).
> Failed to list versions for com.android.support:support-v4.
> Unable to load Maven meta-data from https://jcenter.bintray.com/com/android/support/support-v4/maven-metadata.xml.
> Could not GET 'https://jcenter.bintray.com/com/android/support/support-v4/maven-metadata.xml'.
> Connect to jcenter.bintray.com:443 [jcenter.bintray.com/108.168.243.150] failed: Connection timed out: connect
> Could not resolve com.android.support:support-v4:[26.0.0,26.1.0).
> Failed to list versions for com.android.support:support-v4.
> Unable to load Maven meta-data from https://maven.google.com/com/android/support/support-v4/maven-metadata.xml.
> org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 62; White spaces are required between publicId and systemId.
> Could not resolve com.android.support:customtabs:[26.0.0,26.1.0).
Required by:
project : > com.onesignal:OneSignal:3.6.1
> Could not resolve com.android.support:customtabs:[26.0.0,26.1.0).
> Failed to list versions for com.android.support:customtabs.
> Unable to load Maven meta-data from https://jcenter.bintray.com/com/android/support/customtabs/maven-metadata.xml.
> Could not GET 'https://jcenter.bintray.com/com/android/support/customtabs/maven-metadata.xml'.
> Connect to jcenter.bintray.com:443 [jcenter.bintray.com/108.168.243.150] failed: Connection timed out: connect
> Could not resolve com.android.support:customtabs:[26.0.0,26.1.0).
>
BUILD FAILED
What is the problem? I saw a same error here
Maybe is related :
The requested path was not found :
https://jcenter.bintray.com/com/android/support/support-v4/maven-metadata.xml
Ionic Info:
cli packages:
@ionic/cli-utils : 1.9.2
ionic (Ionic CLI) : 3.9.2
global packages:
Cordova CLI : 7.0.1
Gulp CLI : CLI version 3.9.1
Local version 3.9.1
local packages:
@ionic/app-scripts : 2.1.4
Cordova Platforms : android 6.2.3
Ionic Framework : ionic-angular 3.5.0
System:
Android SDK Tools : 25.2.5
Node : v8.1.3
npm : 5.0.3
OS : Windows 10
EDITED : So I change folder name from 26.0.0-preview to 26.0.0-rc1 and I got a new error :
Errors during XML parse:
White spaces are required between publicId and systemId.
org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 62; White spaces are required between publicId and
systemId.
javax.xml.bind.UnmarshalException
- with linked exception:
[org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 62; White spaces are required between publicId and
systemId.]
Additionally, the fallback loader failed to parse the XML.
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'android'.
> Could not resolve all dependencies for configuration ':_debugApkCopy'.
> Could not resolve com.android.support:support-v4:[26.0.0,26.1.0).
Required by:
project : > com.onesignal:OneSignal:3.6.1
> Could not resolve com.android.support:support-v4:[26.0.0,26.1.0).
> Failed to list versions for com.android.support:support-v4.
> Unable to load Maven meta-data from
https://maven.google.com/com/android/support/support-v4/maven-metadata.xml.
> org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 62; White spaces are required
between publicId and systemId.
> Could not resolve com.android.support:customtabs:[26.0.0,26.1.0).
Required by:
project : > com.onesignal:OneSignal:3.6.1
> Could not resolve com.android.support:customtabs:[26.0.0,26.1.0).
> Failed to list versions for com.android.support:customtabs.
> Unable to load Maven meta-data from
https://maven.google.com/com/android/support/customtabs/maven-metadata.xml.
> org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 62; White spaces are required
between publicId and systemId.
Upvotes: 4
Views: 2738
Reputation: 1555
Finally I found a solution! At the first is better to see onesignal-plugin-versions ;
according to that :
2.2.0 Release :
Dropped Android 2.3 (API 9) support, minimum is now 4.0.3 (API 15).
So we have two choices :
Increase minSdkVersion
in config.xml
Decrease onesignal-cordova-plugin
version (ionic cordova plugin add [email protected]
)
Upvotes: 2