Sun, 14 Feb 2021 08:33:52 GMT
Join the conversation at slack.cordova.io
Sat, 13 Feb 2021 15:51:35 GMT
@ppetree says
AndroidX: I‘ve been away from this for a while so I’m sure this subject has been beat to death but I have a build problem (as in I can‘t build) and I can’t find a workaround.
Essentially, my config.xml has these settings:
<preference name="android-targetSdkVersion" value="29" /> <preference name="AndroidXEnabled" value="true" /> <preference name="JetifierEnabled" value="true" /> <plugin name="cordova-plugin-androidx-adapter" spec="1.1.3" /> <plugin name="cordova-android-play-services-gradle-release" spec="4.0.0" />``` When I build I get the following errors on several packages: ```error: package android.support.annotation does not exist import android.support.annotation.NonNull; ^ error: package android.support.v4.content does not exist import android.support.v4.content.PermissionChecker; ^ error: package android.support.annotation does not exist import android.support.annotation.NonNull; ^ error: package android.support.v4.content does not exist import android.support.v4.content.PermissionChecker; ^``` What's the solution?
Sat, 13 Feb 2021 15:58:08 GMT
@norman137 says
It's my understanding that
cordova-plugin-androidx-adapter
was suppose to translate those to the androidx equivalent classes.
Sat, 13 Feb 2021 16:01:03 GMT
@norman137 says
You could find out which packages are using the old support libraries and fork them. Upgrading them to androidx should be relatively simple...
Dependency mapping -> https://developer.android.com/jetpack/androidx/migrate/artifact-mappings Class Mapping -> https://developer.android.com/jetpack/androidx/migrate/class-mappings
If the plugin is using version 28 of the old support libraries, then you can upgrade to version 1.0.0 to androidx, which is binary identical to the old android support library classes, other then the namespaces.
Sat, 13 Feb 2021 16:05:01 GMT
@ppetree says
I can see I'm gonna have to ditch cloud build services and go local... I have a macbook air but zero idea how to configure it for cordova and none of the documentation comes close to getting me going... sigh.
Sat, 13 Feb 2021 16:08:01 GMT
@norman137 says
I'd recommend installing Node14, via https://github.com/nvm-sh/nvm Then install xcode from the App Store Then install cordova via
npm install cordova -g
Then installios-deploy
vianpm install ios-deploy -g
(I think this needs to have xcode installed on the machine first)After that you should be able to successfully build and run an ios project...
cd test cordova platform add ios cordova run ios```
Sat, 13 Feb 2021 16:09:11 GMT
@norman137 says
But I don't know how efficient a macbook air will be in ios development and running emulators...
Sat, 13 Feb 2021 16:24:25 GMT
@ppetree says
(I'm surprised no one has built an electron app to install and maintain all this, to add plugins, to perform builds etc).
Ok, I'm down to this error:
> Compilation failed; see the compiler error output for details.``` Which is occurring with @havesource/cordova-plugin-push. Sigh...
Sat, 13 Feb 2021 16:32:03 GMT
@norman137 says
Is that what those old support libraries errors are coming from? I know there are some people working on making that plugin use & depend on androidx.
Sat, 13 Feb 2021 16:40:47 GMT
@ppetree says
The <https://apps.volt.build/0772adc8-c48d-4165-9c20-ad341a4dbcde/voltbuilder.log|log file>
I disabled jetifier and was trying to depend on adroidx-adapter. Still same error.