Unity's Google In-App Review plugin error: java.lang.ClassNotFoundException: com.google.android.play.core.review.ReviewManagerFactory

4.2k views Asked by At

I'm trying to integrate Google's In-app Review feature into my Unity application and getting the following runtime error message on logcat console. Anyone knows the solution to this problem?

AndroidJavaException: java.lang.ClassNotFoundException: com.google.android.play.core.review.ReviewManagerFactory (Filename: currently not available on il2cpp Line: -1)

3

There are 3 answers

2
Eric On BEST ANSWER

It turned out that the problem was introduced by a proguard obfuscation. In order to keep the symbols I had to add the following to the proguard definition file:

-keep class com.google.android.play.core.** { *; }

1
Sven On

For anyone that has this issue. For me, I had to force resolve Android external dependencies

0
Tony Tran On

Like Eric said in the response, it isn't Proguard that is causing it

It is the Minify. Disable that crap. Not only does Minify ruins your android core library, but possible other assets as well, including Mirror Network. There is no workaround it.

Trust me. I spent all day debugging it for you all thoroughly so you wouldn't have to: Just disable Minify and keep Proguard.

By disabling minify, which doesn't do much for you anyways, you WOULD NOT need to include this line in your Proguard file:

-keep class com.google.android.play.core.** { *; }

You can just leave this out, keep the proguard setting to its default and it'll work perfectly