Migrating to androidX

I am trying to migrate the cocos2d project to AndroidX
any help?

cocos2d-x 3.15

// Play Services
implementation “com.google.android.gms:play-services-ads:18.2.0”
implementation “com.google.android.gms:play-services-games:15.0.1”
implementation “com.google.android.gms:play-services-plus:15.0.1”
implementation “com.google.android.gms:play-services-auth:15.0.1”

// Firebase
implementation "com.google.firebase:firebase-core:16.0.0"
implementation "com.google.firebase:firebase-messaging:17.0.0"
implementation "com.google.firebase:firebase-config:16.0.0"
implementation "com.google.firebase:firebase-auth:16.0.1"
implementation "com.google.firebase:firebase-invites:16.0.0"

implementation "com.google.firebase:firebase-perf:16.0.0"
implementation "com.google.android.gms:play-services-ads:18.2.0" -

Reason for "Migrate to androidX"

any help with what? whats your error?
can’t compile because of some duplicate symbols?

try upgrading your gradle version.
build.gradle for proj.android: classpath ‘com.android.tools.build:gradle:3.4.2’
in your gradle wrapper file: distributionUrl=https://services.gradle.org/distributions/gradle-5.1.1-all.zip

  • i think if you want to use firebase with playservices together; google recomended to use a special version of firebase that allready includes it. you could browse their repo to find the needed version. (maybe that deprecated today)
  • does google+ still work? i thought they dis continued it. (com.google.android.gms:play-services-plus)

I am trying to implement Adaptive banner
for which i need to update plugin to “com.google.android.gms:play-services-ads:18.2.0”.

when I do this it asks me to migrate to androidX

and I have confusion in upgrading following plugins (to which version so it won’t cause much issue)

implementation “com.google.android.gms:play-services-games:15.0.1”
implementation “com.google.android.gms:play-services-plus:15.0.1”
implementation “com.google.android.gms:play-services-auth:15.0.1”

// Firebase
implementation "com.google.firebase:firebase-core:16.0.0"
implementation "com.google.firebase:firebase-messaging:17.0.0"
implementation "com.google.firebase:firebase-config:16.0.0"
implementation "com.google.firebase:firebase-auth:16.0.1"
implementation "com.google.firebase:firebase-invites:16.0.0"

implementation "com.google.firebase:firebase-perf:16.0.0"

Add this to gradle.properties:

android.useAndroidX=true
android.enableJetifier=true

This got fixed

all plugins updated accordingly and migrated to androidX

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.