Could not find com.google.games:gpgs-plugin-support:0.9.64 after enabling proguard.
Hello, my google play games service suddenly stopped working a few weeks ago, I didn't do anything it just stopped signing in. Even when i roll back to old git commits and build version where it used to work, it doesn't. After reading a lot.... It could seem that the unity editor is excluding some of the google play games dependencies while building, making the service not work anymore.
I found a recent post with other people facing the same thing, most upvoted answer was to enable proguard and add some lines to the proguard-user.txt file.
-keep class com.google.games.** { _; }
-keep interface com.google.games._* { *; }
This should tell the compiler to keep the google play games dependencies. Hopefully this will fix the issue with the games services not working.
However, ever since I enabled this proguard, I am facing other issues, currently I am getting an build error:
Could not resolve all files for configuration ':launcher:releaseCompileClasspath'.
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
Could not find com.google.games:gpgs-plugin-support:0.9.64.
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
I am clueless and have tried a lot, running low on ideas here... hope that someone here can point me in the right direction!
I'm using custom gradle template
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.0'
**BUILD_SCRIPT_DEPS**}
}
allprojects {
repositories {
google()
jcenter()
flatDir {
dirs 'libs'
}
}
}
// Android Resolver Repos Start
allprojects {
repositories {
maven {
url "https://maven.google.com"
}
maven {
url "file:///C:/Users/rasmus/Documents/UnityProjects/blowfish/unity/Assets/Extensions/GooglePlayGames/Editor/m2repository" // Assets/Extensions/GooglePlayGames/Editor/GooglePlayGamesPluginDependencies.xml:11
}
mavenLocal()
jcenter()
mavenCentral()
}
}
// Android Resolver Repos End
apply plugin: 'com.android.library'
**APPLY_PLUGINS**
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
// Android Resolver Dependencies Start
compile 'com.google.games:gpgs-plugin-support:0.9.64' // Assets/Extensions/GooglePlayGames/Editor/GooglePlayGamesPluginDependencies.xml:11
// Android Resolver Dependencies End
**DEPS**}
android {
compileSdkVersion **APIVERSION**
buildToolsVersion '**BUILDTOOLS**'
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
defaultConfig {
consumerProguardFiles 'proguard-unity.txt'**USER_PROGUARD**
minSdkVersion **MINSDKVERSION**
targetSdkVersion **TARGETSDKVERSION**
ndk {
abiFilters **ABIFILTERS**
}
versionCode **VERSIONCODE**
versionName '**VERSIONNAME**'
}
lintOptions {
abortOnError false
}
aaptOptions {
noCompress = ['.unity3d', '.ress', '.resource', '.obb'**STREAMING_ASSETS**]
ignoreAssetsPattern = "!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~"
}**SIGN**
buildTypes {
debug {
minifyEnabled **MINIFY_DEBUG**
useProguard **PROGUARD_DEBUG**
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-unity.txt'**USER_PROGUARD****SIGNCONFIG**
jniDebuggable true
}
release {
minifyEnabled true
useProguard true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-unity.txt', 'proguard-user.txt'
}
}**PACKAGING_OPTIONS**
**BUILT_APK_LOCATION**
**EXTERNAL_SOURCES**
}**REPOSITORIES****SOURCE_BUILD_SETUP**
This is what my progruad-user.txt look like
-keep class com.google.games.** { _; }
-keep interface com.google.games._* { *; }
-keepattributes *Annotation*
-keepattributes SourceFile,LineNumberTable
-keep public class * extends java.lang.Exception
-keep class com.crashlytics.** { *; }
-dontwarn com.crashlytics.**
I also recently updated to unity 2020! and I did click the resolve google dependencies button...