Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions docs/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,18 @@ You recently downloaded or updated XCode.
2. Choose `Legacy Build System`
3. Remove `node_modules/react-native/third-party` and
`node_modules/react-native/third-party-podspecs`

## I get Android crashes when using the Reader SDK
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be more specific about when the crash occurs (when the crash is triggered, it crashes with a specific error, etc.) as there are likely other reasons why Android may crash when building with Reader SDK and we want folks to be able to distinguish which use case matches the problem they are seeing.


### The problem

When there are different versions of Google Play Services, crashes can occur like
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@goblinhorde , can you please take a final check?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem description is frustratingly nondescript. Can we be more specific about when the crash occurs and why having different versions of the Play Service causes a conflict? Also, "like" implies there are other possible errors that could occur? If that's true, we should provide a list of known errors that occur with this issue. If that's not true, rephrase to make the problem description definitive. For example: "When there are different versions of Google Play Services on the same device, , and Android will crash with an error."

`java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/common/api/Api$zzf;`

### Likely cause

You are using other libraries that use `googlePlayServicesVersion` at something other than "12.0.1"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This plugin take "googlePlayServiceVersion" (no 's' after 'Service'), do you have other dependencies are actually overridden by 'googlePlayServicesVersion' ? How about you try to override the 'googlePlayServiceVersion'(no 's') to a newer version and see if that works?

I'm asking to do this because I don't think we should introduce another build variable that this plug doesn't depend on.

Alternatively, can you just list your dependencies that conflict with reader sdk, and provide a solution based on that?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 to providing specific details about the environment in which the conflict occurs so it's easier for folks to tell if the possible solution applies to their environment as well.


### Solution

Set `googlePlayServicesVersion = "12.0.1"` in your `android/build.gradle` file.