Giter VIP home page Giter VIP logo

cordova-plugin-androidx's Introduction

cordova-plugin-androidx

DEPRECATION NOTICE

This plugin is deprecated as it's no longer required since cordova-android@9 adds built-in support for AndroidX.

  • This plugin is only needed if your project uses legacy cordova-android@8.
  • If you update to cordova-android@9 and your project contains this plugin then you should remove it.

Purpose

This Cordova/Phonegap plugin enables AndroidX in a Cordova project (AndroidX is the successor to the Android Support Library).

This plugin is useful if your project contains plugins which have migrated to AndroidX or if you otherwise want to enable AndroidX in your Cordova Android platform project.

donate

I dedicate a considerable amount of my free time to developing and maintaining this Cordova plugin, along with my other Open Source software. To help ensure this plugin is kept updated, new features are added and bugfixes are implemented quickly, please donate a couple of dollars (or a little more if you can stretch) as this will help me to afford to dedicate time to its maintenance. Please consider donating if you're using this plugin in an app that makes you money, if you're being paid to make the app, if you're asking for new features or priority bug fixes.

Requirements

This plugin requires a minimum of cordova@8 and specifically cordova-android@8.

Installation

$ cordova plugin add cordova-plugin-androidx

IMPORTANT: This plugin relies on Cordova hook scripts so will not work in Cloud Build environments such as Phonegap Build which do not support Cordova hook scripts.

Usage

Once the plugin is installed it will persistently enable AndroidX by editing the gradle.properties file in your Cordova Android platform project.

If you encounter build failures after installing this plugin (or after manually enabling AndroidX) try installing cordova-plugin-androidx-adapter into your Cordova project; it will migrate any references to the legacy Android Support library in the Gradle config or Java source to use the new AndroidX mappings which should resolve build failures due to referencing legacy Support Library assets.

License

The MIT License

Copyright (c) 2019 Dave Alden / Working Edge Ltd.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

cordova-plugin-androidx's People

Contributors

chemerisuk avatar dpa99c avatar timbru31 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

cordova-plugin-androidx's Issues

Trouble Installing

I'm submitting a ... (check one with "x"):

  • [ x ] bug report
  • feature request
  • documentation issue

Bug report

Current behavior:

when I tried to add the platform android to my ionic project I got:

Cannot find plugin.xml for plugin "cordova-plugin-androidx". Please try adding it again.

I try to reinstall androidx:
cordova plugin add cordova-plugin-androidx
I get:

Cannot find plugin.xml for plugin "cordova-plugin-androidx". Please try adding it again.

I try to remove androidx:
cordova plugin rm cordova-plugin-androidx
I get

Cannot find plugin.xml for plugin "cordova-plugin-androidx". Please try adding it again.

Expected behavior:

Be able to either ad or remove the plugin

Steps to reproduce:

cordova plugin add cordova-plugin-androidx
cordova plugin rm cordova-plugin-androidx

Environment information

  • Cordova CLI version
    9.0.0 ([email protected])
  • Cordova platform version
    • Available platforms:

android ^8.0.0
browser ^6.0.0
electron ^1.0.0
ios ^5.0.0
osx ^5.0.0
windows ^7.0.0

  • Plugins & versions installed in project (including this plugin)

cordova-android-support-gradle-release 2.1.0 "cordova-android-support-gradle-release"
cordova-clipboard 1.2.1 "Clipboard"
cordova-plugin-add-swift-support 1.7.2 "AddSwiftSupport"
cordova-plugin-android-permissions 1.0.0 "Permissions"
cordova-plugin-androidx-adapter 1.1.0 "cordova-plugin-androidx-adapter"
cordova-plugin-app-version 0.1.9 "AppVersion"
cordova-plugin-device 2.0.2 "Device"
cordova-plugin-document-viewer 0.9.10 "SitewaertsDocumentViewer"
cordova-plugin-file 6.0.1 "File"
cordova-plugin-file-opener2 2.2.0 "File Opener2"
cordova-plugin-file-transfer 1.7.1 "File Transfer"
cordova-plugin-firebasex 5.0.0 "Google Firebase Plugin"
cordova-plugin-geolocation 4.0.1 "Geolocation"
cordova-plugin-ionic 5.3.0 "cordova-plugin-ionic"
cordova-plugin-ionic-keyboard 2.1.3 "cordova-plugin-ionic-keyboard"
cordova-plugin-ionic-webview 3.1.2 "cordova-plugin-ionic-webview"
cordova-plugin-nativegeocoder 3.2.1 "NativeGeocoder"
cordova-plugin-network-information 2.0.1 "Network Information"
cordova-plugin-request-location-accuracy 2.2.3 "Request Location Accuracy"
cordova-plugin-splashscreen 5.0.2 "Splashscreen"
cordova-plugin-statusbar 2.4.2 "StatusBar"
cordova-plugin-whitelist 1.3.3 "Whitelist"
cordova-sqlite-storage 3.2.0 "Cordova sqlite storage plugin - cordova-sqlite-storage plugin version"
cordova.plugins.diagnostic 4.0.12 "Diagnostic"
es6-promise-plugin 4.1.0 "Promise"
phonegap-plugin-barcodescanner 8.1.0 "BarcodeScanner"
wifiwizard2 3.1.1 "WifiWizard2"

  • Dev machine OS and version, e.g.
    • OSX
      • sw_vers
    • Windows 10
      • 1903

Android SDK Tools : 26.1.1 (C:\sdk-tools)
NodeJS : v10.16.0 (C:\Program Files\nodejs\node.exe)
npm : 6.9.0

If using an Ionic Native Typescript wrapper for this plugin:

  • Ionic environment info

Ionic CLI : 5.1.0 (C:\Users\PROGETTO\AppData\Roaming\npm\node_modules\ionic)
Ionic Framework : @ionic/angular 4.6.2
@angular-devkit/build-angular : 0.13.9
@angular-devkit/schematics : 7.2.4
@angular/cli : 7.3.9
@ionic/angular-toolkit : 1.4.1

Not compatible with cordova-plugin-facebook4

I'm submitting a ...

  • [x ] bug report
  • feature request
  • documentation issue

Current behavior:
When I use this plugin along with cordova-plugin-facebook4, I get below error during build:

FAILURE: Build failed with an exception.

What went wrong:
Execution failed for task ':app:processDebugResources'.
Android resource linking failed
error: resource style/Theme.AppCompat.NoActionBar (aka com.akasdigitalstudio.test:style/Theme.AppCompat.NoActionBar) not found.
error: resource style/Theme.AppCompat.Dialog (aka com.akasdigitalstudio.test:style/Theme.AppCompat.Dialog) not found.
error: failed linking references.

Try:
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.
23 actionable tasks: 21 executed, 2 up-to-date

Get more help at https://help.gradle.org
BUILD FAILED in 10s
D:\Freelancer\PhoneGap\test\platforms\android\gradlew: Command failed with exit
code 1 Error output:
FAILURE: Build failed with an exception.

What went wrong:
Execution failed for task ':app:processDebugResources'.
Android resource linking failed
error: resource style/Theme.AppCompat.NoActionBar (aka com.akasdigitalstudio.test:style/Theme.AppCompat.NoActionBar) not found.
error: resource style/Theme.AppCompat.Dialog (aka com.akasdigitalstudio.test:style/Theme.AppCompat.Dialog) not found.
error: failed linking references.

Try:
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

Expected behavior:

Build should go successful

Steps to reproduce:

  1. Create a new cordova project
  2. Add platform Android
  3. Add cordova-plugin-androidx
  4. Add cordova-plugin-androidx-adapter
  5. Add cordova-plugin-facebook4
  6. Run cordova clean android
  7. Run cordova build android

Environment information

  • Cordova CLI version
    • 9.0.0
  • Cordova platform version
    • android 8.0.0
    • browser 6.0.0
  • Plugins & versions installed in project (including this plugin)
    • cordova-plugin-androidx 1.0.2 "cordova-plugin-androidx"
    • cordova-plugin-androidx-adapter 1.1.0 "cordova-plugin-androidx-adapter"
    • cordova-plugin-camera 4.1.0 "Camera"
    • cordova-plugin-customurlscheme 4.4.0 "Custom URL scheme"
    • cordova-plugin-device 2.0.3 "Device"
    • cordova-plugin-file 6.0.2 "File"
    • cordova-plugin-file-transfer 1.7.1 "File Transfer"
    • cordova-plugin-firebase-authentication 3.0.0 "cordova-plugin-firebase-authentication"
    • cordova-plugin-firebase-messaging 3.0.0 "FirebaseMessagingPlugin"
    • cordova-plugin-geolocation 4.0.2 "Geolocation"
    • cordova-plugin-googleplus 8.1.2 "Google SignIn"
    • cordova-plugin-inappbrowser 3.1.0 "InAppBrowser"
    • cordova-plugin-splashscreen 5.0.3 "Splashscreen"
    • cordova-plugin-whitelist 1.3.4 "Whitelist"
    • cordova-plugin-x-socialsharing 5.6.1 "SocialSharing"
    • cordova-support-android-plugin 1.0.1 "cordova-support-android-plugin"
    • cordova-support-google-services 1.3.1 "cordova-support-google-services"
    • es6-promise-plugin 4.2.2 "Promise"
  • Dev machine OS and version, e.g.
    • Windows 7

Android build issue:

  • Node JS version
    • 10.16.0
  • Gradle version
    • 3.3.0
  • Target Android SDK version
    • 28

This repository can now be archived as cordova-android now has inbuilt support for AndroidX

Documentation issue

https://cordova.apache.org/announcements/2020/06/29/cordova-android-9.0.0.html
image

It is proud to see that Cordova has referenced this plugin in their blog post. But like mentioned, since cordova-android > 9.0.0, this plugin is no longer needed. So the following changes can be done in this repo-

  1. Update README.md to mark the required cordova-android version < 9.0.0.
  2. Archive the repository.

THANKS FOR YOUR CONTRIBUTION TOWARDS THE CORDOVA COMMUNITY ๐Ÿ‘

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.