Ionic 3 & Android SDK 35

Hi to all

In my team, we work in a legacy app with ionic 3 and angular 5

Currently we force SDK 34 in android compiling with cordova using “ionic cordova platform add android@11 && ionic cordova build android” and we override the SDK in the config.xml putting 34 using

Google force to all to use SDK 35 in the new builds but this legacy app give me many errors

Can any one help me migrating to SDK 35 ?

Updating to Ionic 8 is no option now

Ionic Info

Ionic:

Ionic CLI          : 6.20.9 (/Users/tomaspacheco/.nvm/versions/node/v10.24.0/lib/node_modules/@ionic/cli)
Ionic Framework    : ionic-angular 3.9.10
@ionic/app-scripts : 3.2.4

Cordova:

Cordova CLI       : 11.1.0
Cordova Platforms : android 11.0.0, browser 5.0.3, ios 6.3.0
Cordova Plugins   : cordova-plugin-ionic-webview 5.0.0, cordova-plugin-ionic 5.5.3, (and 21 other plugins)

Utility:

cordova-res (update available: 0.15.4) : 0.6.0
native-run (update available: 2.0.1)   : 0.3.0

System:

Android SDK Tools : 26.1.1 (/Users/tomaspacheco/Library/Android/sdk)
ios-sim           : 8.0.2
NodeJS            : v10.24.0 (/Users/tomaspacheco/.nvm/versions/node/v10.24.0/bin/node)
npm               : 6.14.18
OS                : macOS Unknown
Xcode             : Xcode 16.1 Build version 16B40

package.json

{

  "name": "gcapp",

"version": "1.2.9",

"author": "Ionic Framework",

"homepage": "http://ionicframework.com/",

"private": true,

"scripts": {

"clean": "ionic-app-scripts clean",

"build": "node --max-old-space-size=8192 ./node_modules/@ionic/app-scripts/bin/ionic-app-scripts.js build --aot --minifyjs --minifycss",

"lint": "ionic-app-scripts lint",

"ionic:build": "node --max-old-space-size=12000 ./node_modules/@ionic/app-scripts/bin/ionic-app-scripts.js build",

"ionic:serve": "ionic-app-scripts serve",

"browser": "ionic-app-scripts serve --sourceMap source-map --iscordovaserve --wwwDir platforms/browser/www/ --buildDir platforms/browser/www/build",

"gulp": "./node_modules/gulp/bin/gulp.js",

"release": "standard-version",

"precommit": "chmod +x pre-commit",

"resources": "cordova-res"

  },

"dependencies": {

"@angular/animations": "5.2.11",

"@angular/common": "5.2.11",

"@angular/compiler": "5.2.11",

"@angular/compiler-cli": "5.2.11",

"@angular/core": "5.2.11",

"@angular/forms": "5.2.11",

"@angular/http": "7.2.2",

"@angular/platform-browser": "5.2.11",

"@angular/platform-browser-dynamic": "5.2.11",

"@awesome-cordova-plugins/chooser": "^8.0.2",

"@google/markerclusterer": "^2.0.6",

"@ionic-native/android-permissions": "4.20.0",

"@ionic-native/badge": "4.20.0",

"@ionic-native/barcode-scanner": "4.20.0",

"@ionic-native/base64": "4.20.0",

"@ionic-native/calendar": "4.20.0",

"@ionic-native/camera": "4.20.0",

"@ionic-native/camera-preview": "^4.20.0",

"@ionic-native/chooser": "^5.36.0",

"@ionic-native/core": "^4.20.0",

"@ionic-native/date-picker": "4.20.0",

"@ionic-native/device": "4.20.0",

"@ionic-native/diagnostic": "^4.20.0",

"@ionic-native/file": "^3.4.4",

"@ionic-native/file-chooser": "4.20.0",

"@ionic-native/file-opener": "4.20.0",

"@ionic-native/file-path": "^5.36.0",

"@ionic-native/file-picker": "4.20.0",

"@ionic-native/file-transfer": "4.20.0",

"@ionic-native/flashlight": "^4.20.0",

"@ionic-native/geolocation": "4.20.0",

"@ionic-native/google-maps": "^4.12.0",

"@ionic-native/in-app-browser": "4.20.0",

"@ionic-native/insomnia": "^4.20.0",

"@ionic-native/ionic-webview": "5.3.0",

"@ionic-native/keyboard": "5.17.1",

"@ionic-native/local-notifications": "4.20.0",

"@ionic-native/location-accuracy": "4.20.0",

"@ionic-native/media": "4.20.0",

"@ionic-native/media-capture": "4.20.0",

"@ionic-native/native-geocoder": "^4.20.0",

"@ionic-native/native-storage": "4.19.0",

"@ionic-native/network": "4.20.0",

"@ionic-native/open-native-settings": "4.20.0",

"@ionic-native/phonegap-local-notification": "4.20.0",

"@ionic-native/pro": "4.20.0",

"@ionic-native/splash-screen": "4.8.0",

"@ionic-native/status-bar": "4.8.0",

"@ionic-native/toast": "4.20.0",

"@ionic/pro": "2.0.4",

"@ionic/storage": "2.2.0",

"@types/aws-sdk": "^2.7.0",

"@types/chart.js": "^2.9.41",

"@types/node": "14.0.27",

"angular-svg-round-progressbar": "^2.0.0",

"angular2": "2.0.0-beta.7",

"angular2-uuid": "^1.1.1",

"aws-sdk": "^2.890.0",

"axios": "^0.27.2",

"buffer": "^5.6.0",

"chart.js": "2.8.0",

"chartjs-plugin-datalabels": "git+https://github.com/imaulenandain/chartjs-plugin-datalabels.git",

"child_process": "^1.0.2",

"com-badrit-base64": "^0.2.0",

"com.moust.cordova.videoplayer": "
",

"compressorjs": "^1.2.1",

"cordova-common": "^3.2.1",

"cordova-open-native-settings": "^1.5.2",

"cordova-plugin-add-swift-support": "^2.0.2",

"cordova-plugin-android-permissions": "^1.1.0",

"cordova-plugin-androidx-adapter": "^1.1.3",

"cordova-plugin-badge": "^0.8.8",

"cordova-plugin-calendar": "^5.1.5",

"cordova-plugin-console": "^1.1.0",

"cordova-plugin-datepicker": "^0.9.3",

"cordova-plugin-fcm-with-dependecy-updated": "^7.8.0",

"cordova-plugin-filechooser": "^1.2.0",

"cordova-plugin-filepicker": "^1.1.6",

"cordova-plugin-fullscreen": "^1.2.0",

"cordova-plugin-globalization": "^1.11.0",

"cordova-plugin-insomnia": "^4.3.0",

"cordova-plugin-ionic": "^5.4.6",

"cordova-plugin-ionic-keyboard": "^2.2.0",

"cordova-plugin-media": "^5.0.3",

"cordova-plugin-media-capture": "^3.0.3",

"cordova-plugin-nativegeocoder": "^3.4.1",

"cordova-plugin-request-location-accuracy": "^2.3.0",

"cordova-plugin-splashscreen": "^5.0.3",

"cordova-plugin-statusbar": "^2.4.3",

"cordova-plugin-x-toast": "2.7.2",

"cordova-support-android-plugin": "^1.0.1",

"dateformat": "^3.0.3",

"fs": "0.0.1-security",

"gulp-clean": "^0.4.0",

"gulp-prompt": "1.2.0",

"gulp-rename": "^1.4.0",

"gulp-util": "^3.0.8",

"hammerjs": "2.0.8",

"howler": "2.1.3",

"intl": "1.1.0",

"ionic-angular": "3.9.2",

"ionic-img-viewer": "^2.9.0",

"ionic-long-press": "1.5.0",

"ionic-native": "^2.9.0",

"ionic-selectable": "3.2.0",

"ionic-tooltips": "3.1.0",

"ionic2-calendar": "^0.4.6",

"ionicons": "3.0.0",

"js-sha256": "^0.9.0",

"lodash": "4.17.11",

"marked": "^0.3.19",

"markerclustererplus": "^2.1.4",

"mime-types": "2.1.25",

"moment-range": "4.0.2",

"native-run": "^0.3.0",

"ng-lazyload-image": "7.0.1",

"ng2-google-charts": "3.5.0",

"ng2-pdf-viewer": "^3.0.8",

"ngx-pagination": "^5.1.1",

"ngx-swiper-wrapper": "8.0.2",

"npm": "^6.14.8",

"phonegap-plugin-local-notification": "1.0.1",

"platform": "1.3.5",

"q": "^1.5.1",

"recursive-readdir": "^2.2.2",

"round10": "^1.0.3",

"run-sequence": "^2.2.1",

"rxjs": "6.2.2",

"rxjs-compat": "6.2.2",

"save": "^2.4.0",

"semver": "6.0.0",

"shelljs": "^0.8.4",

"signature_pad": "^3.0.0-beta.4",

"sort-by": "^1.2.0",

"sw-toolbox": "3.6.0",

"uuid": "^3.4.0",

"videogular2": "6.4.0",

"xcode": "^2.1.0",

"xml-js": "^1.6.11",

"zone.js": "0.8.26"

  },

"devDependencies": {

"@ionic/app-scripts": "3.2.0",

"@ionic/lab": "1.0.9",

"@types/howler": "2.1.2",

"cordova-android": "^11.0.0",

"cordova-android-support-gradle-release": "^3.0.1",

"cordova-clipboard": "^1.3.0",

"cordova-honeywell-plugin": "^1.0.5",

"cordova-plugin-androidx": "^2.0.0",

"cordova-plugin-avram": "git+https://github.com/Andain-Oneapp/cordova-plugin-avram-andain.git",

"cordova-plugin-camera": "git+https://github.com/GuillermoAndain/cordova-plugin-camera.git",

"cordova-plugin-camera-preview": "git+https://github.com/cordova-plugin-camera-preview/cordova-plugin-camera-preview.git",

"cordova-plugin-chooser": "git+https://github.com/imaulenandain/cordova-plugin-chooser.git",

"cordova-plugin-compat": "^1.2.0",

"cordova-plugin-device": "^3.0.0",

"cordova-plugin-file": "^6.0.2",

"cordova-plugin-file-opener2": "git+https://github.com/GuillermoAndain/cordova-plugin-file-opener2.git#3.0.0",

"cordova-plugin-file-transfer": "git+https://github.com/GuillermoAndain/cordova-plugin-file-transfer.git",

"cordova-plugin-filepath": "^1.6.0",

"cordova-plugin-firebasex": "^18.0.7",

"cordova-plugin-geolocation": "^4.1.0",

"cordova-plugin-googlemaps": "git+https://github.com/GuillermoAndain/phonegap-plugin-googlemaps.git",

"cordova-plugin-googlemaps-sdk": "git+https://github.com/mapsplugin/cordova-plugin-googlemaps-sdk.git",

"cordova-plugin-inappbrowser": "^6.0.0",

"cordova-plugin-ionic-webview": "^5.0.1",

"cordova-plugin-local-notification": "git+https://github.com/katzer/cordova-plugin-local-notifications.git",

"cordova-plugin-network-information": "git+https://github.com/ZumelzuR/cordova-plugin-network-information.git",

"cordova-plugin-whitelist": "^1.3.5",

"cordova-res": "0.6.0",

"cordova-support-google-services": "^1.4.1",

"cordova.plugins.diagnostic": "^7.1.4",

"gulp": "^3.9.1",

"gulp-concat": "^2.6.1",

"gulp-uglify": "3.0.2",

"onesignal-cordova-plugin": "^5.2.11",

"phonegap-plugin-barcodescanner": "git+https://github.com/GuillermoAndain/phonegap-plugin-barcodescanner.git",

"standard-version": "7.1.0",

"typescript": "~2.7.2"

  },

"engines": {

"node": "10.19.0",

"npm": "6.13.4"

  },

"description": "An Ionic project",

"cordova": {

"plugins": {

"cordova-plugin-splashscreen": {},

"cordova-plugin-media-capture": {},

"cordova-plugin-camera": {

"ANDROID_SUPPORT_V4_VERSION": "27.+",

"ANDROIDX_CORE_VERSION": "1.6.+"

      },

"cordova-plugin-media": {

"KEEP_AVAUDIOSESSION_ALWAYS_ACTIVE": "NO"

      },

"cordova-plugin-file-transfer": {},

"cordova-plugin-file": {},

"cordova-plugin-datepicker": {},

"cordova-plugin-statusbar": {},

"cordova-plugin-ionic": {

"APP_ID": "xx",

"CHANNEL_NAME": "Production",

"UPDATE_METHOD": "none",

"MAX_STORE": "2",

"WARN_DEBUG": "true",

"UPDATE_API": "https://api.ionicjs.com",

"MIN_BACKGROUND_DURATION": "30"

      },

"phonegap-plugin-barcodescanner": {

"ANDROID_SUPPORT_V4_VERSION": "27.+"

      },

"cordova-plugin-fullscreen": {

"CALENDAR_USAGE_DESCRIPTION": " ",

"CONTACTS_USAGE_DESCRIPTION": " "

      },

"cordova-plugin-calendar": {

"CALENDAR_USAGE_DESCRIPTION": " ",

"CONTACTS_USAGE_DESCRIPTION": " "

      },

"cordova-plugin-insomnia": {},

"cordova-plugin-request-location-accuracy": {

"PLAY_SERVICES_LOCATION_VERSION": "16.+"

      },

"cordova-open-native-settings": {},

"cordova-plugin-console": {},

"cordova-plugin-add-swift-support": {},

"cordova-plugin-filechooser": {},

"cordova-plugin-filepicker": {},

"cordova-plugin-ionic-keyboard": {},

"cordova-plugin-file-opener2": {

"ANDROID_SUPPORT_V4_VERSION": "27.+",

"cordova-plugin-androidx-adapter": {},

"cordova-plugin-firebasex": {

"FIREBASE_ANALYTICS_COLLECTION_ENABLED": "true",

"FIREBASE_PERFORMANCE_COLLECTION_ENABLED": "true",

"FIREBASE_CRASHLYTICS_COLLECTION_ENABLED": "true",

"ANDROID_ICON_ACCENT": "#FF00FFFF",

"ANDROID_PLAY_SERVICES_TAGMANAGER_VERSION": "17.0.0",

"ANDROID_FIREBASE_ANALYTICS_VERSION": "17.2.1",

"ANDROID_FIREBASE_MESSAGING_VERSION": "20.0.0",

"ANDROID_FIREBASE_CONFIG_VERSION": "19.0.3",

"ANDROID_FIREBASE_PERF_VERSION": "19.0.1",

"ANDROID_FIREBASE_AUTH_VERSION": "19.1.0",

"ANDROID_CRASHLYTICS_VERSION": "2.10.1",

"ANDROID_CRASHLYTICS_NDK_VERSION": "2.1.1"

        },

"cordova-plugin-googlemaps": {

"API_KEY_FOR_ANDROID": "xx",

"API_KEY_FOR_IOS": "xx",

"PLAY_SERVICES_VERSION": "15.0.1",

"ANDROID_SUPPORT_V4_VERSION": "27.+"

        }

      },

"com-badrit-base64": {},

"cordova-plugin-badge": {},

"cordova-plugin-local-notification": {

"ANDROID_SUPPORT_V4_VERSION": "26.+",

"ANDROIDX_CORE_VERSION": "1.12.0"

      },

"cordova-plugin-nativegeocoder": {

"LOCATION_WHEN_IN_USE_DESCRIPTION": "Use geocoder service"

      },

"cordova-plugin-avram": {},

"cordova-plugin-android-permissions": {},

"cordova-plugin-androidx-adapter": {},

"cordova-plugin-geolocation": {

"GEOLOCATION_USAGE_DESCRIPTION": "Para localizar el lugar desde donde se hace un reporte"

      },

"cordova-plugin-googlemaps": {

"API_KEY_FOR_ANDROID": "xx",

"API_KEY_FOR_IOS": "xx",

"PLAY_SERVICES_VERSION": "15.0.1",

"ANDROID_SUPPORT_V4_VERSION": "27.+",

"LOCATION_WHEN_IN_USE_DESCRIPTION": "La aplicación desea acceder a su ubicación para mostrarla en la aplicación, también para calcular distancias entre su punto y sus sucursales. Es seguro y privado.",

"LOCATION_ALWAYS_USAGE_DESCRIPTION": "La aplicación desea acceder a su ubicación para mostrarla en la aplicación, también para calcular distancias entre su punto y sus sucursales. Es seguro y privado."

      },

"cordova-clipboard": {},

"cordova.plugins.diagnostic": {

"ANDROIDX_VERSION": "1.0.0",

"ANDROIDX_APPCOMPAT_VERSION": "1.3.1",

"ANDROID_SUPPORT_VERSION": "28.+"

      },

"cordova-plugin-filepath": {},

"cordova-plugin-chooser": {},

"cordova-plugin-network-information": {},

"cordova-plugin-inappbrowser": {},

"onesignal-cordova-plugin": {},

"cordova-plugin-ionic-webview": {

"ANDROID_SUPPORT_ANNOTATIONS_VERSION": "27.+"

      },

"cordova-plugin-camera-preview": {},

"cordova-plugin-device": {},

"cordova-plugin-firebasex": {},

"cordova-android-support-gradle-release": {

"ANDROID_SUPPORT_VERSION": "27.+"

      },

"cordova-plugin-compat": {},

"cordova-support-google-services": {},

"cordova-plugin-whitelist": {},

"cordova-plugin-androidx": {}

    },

"config": {

"ionic_generate_source_map": "true"

    },

"platforms": [

"android"

    ]

  }

}

My suggestion is to create a new app with Capacitor and try to “copy” and fix the legacy code.

Otherwise, the first step would be to upgrade from Ionic 3 (Cordova) to Ionic 3 (Capacitor), and then continue upgrading from Ionic 3 → 4, 4 → 5, and so on, until you reach the latest version of Ionic.

1 Like

thanks for your reply, i know this is the best path, but… this app is very large, and constantly the owners need more features (This doesn’t stop :frowning: and the past team never updated anything…) for now the unique path for the team is achieve the compilation in sdk 35 :frowning:

I don’t know if you can still use old libraries etc. As first step i really would upgrade the app to capacitor.

1 Like

Capacitor can be used with Ionic 3 and angular 5 ? :open_mouth:

Capacitor is completely independent of your web stack (Ionic/Angular). The only issue you might run into is Node version mismatches. Capacitor 6 requires Node 18+ and v7 requires Node 20+.

yes, as Tom said, it’s independent

Analyzing the migration from Cordova to Capacitor, my team and I have noticed that it is also a large migration of approximately months :frowning: (The app is very large)

With this scenario, we made the decision to continue with Cordova, do yo know if it possible to do the build in sdk 35 using only cordova

Here’s Cordova’s support matrix - Android Platform Guide - Apache Cordova