Pushwoosh / pushwoosh-appcelerator-titanium

Other
33 stars 16 forks source link

Latest Android version doesn't work with playservices 16.1.3 #72

Closed perdona closed 4 years ago

wfhm commented 4 years ago

Hi @perdona,

Checking it.

wfhm commented 4 years ago

@perdona,

Could you please provide a bit more details on the issue? Can you build the app and it crashes (or something else happens), or does the build process fail? Can you provide us with a device console log/build log describing the issue better?

perdona commented 4 years ago

app crashes with following log:

[ERROR] AndroidRuntime: FATAL EXCEPTION: main
[ERROR] AndroidRuntime: Process: ai.engaj, PID: 1297
[ERROR] AndroidRuntime: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/firebase/analytics/connector/AnalyticsConnector;
[ERROR] AndroidRuntime:     at com.google.firebase.analytics.connector.internal.AnalyticsConnectorRegistrar.getComponents(Unknown Source)
[ERROR] AndroidRuntime:     at com.google.firebase.components.ComponentRuntime.<init>(com.google.firebase:firebase-common@@16.1.0:56)
[ERROR] AndroidRuntime:     at com.google.firebase.FirebaseApp.<init>(com.google.firebase:firebase-common@@16.1.0:553)
[ERROR] AndroidRuntime:     at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@16.1.0:365)
[ERROR] AndroidRuntime:     at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@16.1.0:332)
[ERROR] AndroidRuntime:     at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@16.1.0:316)
[ERROR] AndroidRuntime:     at com.google.firebase.provider.FirebaseInitProvider.onCreate(com.google.firebase:firebase-common@@16.1.0:53)
[ERROR] AndroidRuntime:     at android.content.ContentProvider.attachInfo(ContentProvider.java:1789)
[ERROR] AndroidRuntime:     at android.content.ContentProvider.attachInfo(ContentProvider.java:1764)
[ERROR] AndroidRuntime:     at com.google.firebase.provider.FirebaseInitProvider.attachInfo(com.google.firebase:firebase-common@@16.1.0:47)
[ERROR] AndroidRuntime:     at android.app.ActivityThread.installProvider(ActivityThread.java:6868)
[ERROR] AndroidRuntime:     at android.app.ActivityThread.installContentProviders(ActivityThread.java:6463)
[ERROR] AndroidRuntime:     at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6403)
[ERROR] AndroidRuntime:     at android.app.ActivityThread.access$1800(ActivityThread.java:229)
[ERROR] AndroidRuntime:     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1887)
[ERROR] AndroidRuntime:     at android.os.Handler.dispatchMessage(Handler.java:102)
[ERROR] AndroidRuntime:     at android.os.Looper.loop(Looper.java:148)
[ERROR] AndroidRuntime:     at android.app.ActivityThread.main(ActivityThread.java:7325)
[ERROR] AndroidRuntime:     at java.lang.reflect.Method.invoke(Native Method)
[ERROR] AndroidRuntime:     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
[ERROR] AndroidRuntime:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
[ERROR] AndroidRuntime: Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.firebase.analytics.connector.AnalyticsConnector" on path: DexPathList[[zip file "/data/app/ai.engaj-1/base.apk"],nativeLibraryDirectories=[/data/app/ai.engaj-1/lib/arm, /data/app/ai.engaj-1/base.apk!/lib/armeabi-v7a, /vendor/lib, /system/lib]]
[ERROR] AndroidRuntime:     at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
[ERROR] AndroidRuntime:     at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
[ERROR] AndroidRuntime:     at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
[ERROR] AndroidRuntime:     ... 21 more
[ERROR] AndroidRuntime:     Suppressed: java.lang.ClassNotFoundException: com.google.firebase.analytics.connector.AnalyticsConnector
[ERROR] AndroidRuntime:         at java.lang.Class.classForName(Native Method)
[ERROR] AndroidRuntime:         at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
[ERROR] AndroidRuntime:         at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
[ERROR] AndroidRuntime:         at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
[ERROR] AndroidRuntime:         ... 22 more
[ERROR] AndroidRuntime:     Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available 

using latest ti.playservices and latest module. I had to downgrade ti.playservices in order to make it work.

phobeous commented 4 years ago

Same issue here. PW module depends on ti.playservices module. We've upgraded our project to use Titanium SDK 8.0.2.GA, which upgrades global ti.playservices module to 16.1.3. The workaround is to explicitly include ti.playservices module in tiapp.xml forcing version 16.1.2.

wfhm commented 4 years ago

@perdona, @phobeous,

Do you use play-services-measurement-api library (16.3.0 version or higher) in your project?

phobeous commented 4 years ago

We use other modules that depend on ti.playservices (ti.map). I've realized that if any module include ti.playservices, build process build add the latest version (16.1.3) that is what comes with Ti SDK 8. So, if you need any other version (as is the case for PW module) we have to explicitly add it in our tiapp.xml, so that build process includes it first and bypass later timodule.xml dependencies.

So, in summary, PW module is not compatible with Titanium SDK 8 because default ti.playservices version module is 16.1.3 and it crashes app. It's necessary to force ti.playservices 16.1.2 in your tiapp.xml. I don't know what happens if any other module depends on ti.playservices 16.1.3

wfhm commented 4 years ago

@phobeous, @perdona,

Fixed with the latest release.