Android messaging sdk file provider
Posted Jan 31, 2022
Hi, messaging sdk has this issue from 2.0.0
AndroidManifest.xml:406:13-64 Error:
Attribute provider#androidx.core.content.FileProvider@authorities value=(x.fileprovider) from AndroidManifest.xml:406:13-64
is also present at [zendesk.messaging:messaging-android:2.1.0] AndroidManifest.xml:49:13-76 value=(com.zendesk.native_messaging.fileprovider).
Suggestion: add 'tools:replace="android:authorities"' to <provider> element at AndroidManifest.xml:404:9-412:20 to override.
AndroidManifest.xml:411:17-60 Error:
Attribute meta-data#android.support.FILE_PROVIDER_PATHS@resource value=(@xml/external_file_paths) from AndroidManifest.xml:411:17-60
is also present at [zendesk.messaging:messaging-android:2.1.0] AndroidManifest.xml:54:17-51 value=(@xml/files_path).
Suggestion: add 'tools:replace="android:resource"' to <meta-data> element at AndroidManifest.xml:409:13-411:62 to override.
Public SDK's should not use default file provider. Can you fix this extending file provider for your needs.
Thanks
0
20
20 comments
明杰 肖
The app will flash back when opened. This error occurs. The version is 2.8.0. I hope it can help me. Thank you very much
java.lang.NoSuchMethodError: No direct method <init>(I)V in class Landroidx/core/content/FileProvider; or its super classes (declaration of 'androidx.core.content.FileProvider' appears in /data/app/~~0OhoGELxx1aN9Tx-vyibNQ==/com.caption.mprint-rYCxFMDhbpihFOkVbuJNqg==/base.apk)
at zendesk.messaging.android.internal.ZendeskFileProvider.<init>(ZendeskFileProvider.kt:6)
at java.lang.Class.newInstance(Native Method)
at android.app.AppComponentFactory.instantiateProvider(AppComponentFactory.java:147)
at androidx.core.app.CoreComponentFactory.instantiateProvider(CoreComponentFactory.java:67)
at android.app.ActivityThread.installProvider(ActivityThread.java:8179)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:7726)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7546)
at android.app.ActivityThread.access$1500(ActivityThread.java:301)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2166)
0
Jacques
Hi 1263082154109!
It seems that the FileProvider name issue was fixed when switching to use SDK 2.8.0, I'll wait to check the release notes once they are available.
Thanks
0
Permanently deleted user
Hello Greg, thanks for the update. Switching to 2.8.0 now allows me to compile the apk, however my app crashes seconds after it starts. I just added the implementation of the library in gradle. I don't have any instantiation nor any type of usage of any of the classes in the library. If I remove the library from gradle, it works again.
I'm compiling with sdk version 33. If I use a previous one, it fails during compilation
The stack trace is:
FATAL EXCEPTION: OkHttp Dispatcher
Process: com.avellanedaaltoque.aat, PID: 29942
java.lang.NoSuchFieldError: No field Companion of type Lokhttp3/internal/platform/Platform$Companion; in class Lokhttp3/internal/platform/Platform; or its superclasses (declaration of 'okhttp3.internal.platform.Platform' appears in /data/app/~~AkWzuAMKjxOSCSmq4QKGPg==/com.avellanedaaltoque.aat-pLhdNmEmwAmgcIsRa6tqFQ==/base.apk!classes18.dex)
at okhttp3.logging.HttpLoggingInterceptor$Logger$Companion$DefaultLogger.log(HttpLoggingInterceptor.kt:116)
at okhttp3.logging.HttpLoggingInterceptor.intercept(HttpLoggingInterceptor.kt:168)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:257)
at okhttp3.RealCall$AsyncCall.execute(RealCall.java:201)
at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
at java.lang.Thread.run(Thread.java:1012)
0
Greg Katechis
Hello all! We have not yet published the release notes, but we have released version 2.8.0 which should contain the fix for this. Please update your projects and let us know if you're still seeing issues.
0
Permanently deleted user
Meanwhile, how do you manage to let the users create tickets? This is the first time I try to integrate Zendesk with my app. If I have to use an older SDK version please let me know. Otherwise I guess I'll have to make my own form and use the API to create mannually the tickets. Thanks!
0
Joseph Martian
It's the same issue for me as well. I'm still facing the same issue despite finding the new update. Anybody who has, please let me know.
0
Permanently deleted user
I was trying to set up the zendesk sdk for my app and I'm facing the same issue. Is there any workaround?
0
Alfonso Garza
Any update on this?
0
Greg Katechis
Hi all! We have a problem ticket opened up with our devs to look into this issue. No timeline at the moment, I'll keep you updated with any new information.
0
Jacques
Hi,
Thanks Oleksandr, but unfortunately the issue is also related to both Zendesk and another library we use having the same FileProvider name... I believe Zendesk should apply this fix you mentioned to also avoid Manifest Merging issues with other libraries.
1263169302390
0
Sign in to leave a comment.