Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8858499
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T14:50:37+00:00 2026-06-14T14:50:37+00:00

I am using GREE sdk for social stuff in my game. While exporting signed

  • 0

I am using GREE sdk for social stuff in my game. While exporting signed apk, proguard messes up some custom annotations in GREE sdk. (I am using GREE sdk as a library project in my game)

If I add nothing to proguard config. It obfuscate GREE SDK as well and it throws me “Inject (Custom annotation in gree sdk)” missing annotation exception, when I try to install and run game.

First I added this keep statement to skip obfuscation of whole GREE SDK.

-keep class net.gree.** {
  public protected private *;
}

This helped me avoiding sdk code from being obfuscate but ‘Annotations’ were still removed and I am still receiving same exception.

then I tried adding this -keepattributes statements one by one but non of them helped me.

a) -keepattributes *Annotation*
b) -keepattributes Inject
c) -keepattributes net.gree.asdk.core.inject.Inject
d) -keepattributes @net.gree.asdk.core.inject.Inject

(d) option throws cannot find file /CLASSPATH OF PRJECT/net.gree.asdk.core.inject.Inject

Here is my proguard config file:

-optimizationpasses 5
-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-dontpreverify
-verbose
-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
-keepattributes *Annotation*

-keep public class * extends android.app.Activity
-keep public class * extends android.app.Application
-keep public class * extends android.app.Service
-keep public class * extends android.content.BroadcastReceiver
-keep public class * extends android.content.ContentProvider
-keep public class * extends android.app.backup.BackupAgentHelper
-keep public class * extends android.preference.Preference
-keep public class com.android.vending.licensing.ILicensingService

-dontwarn org.mockito.cglib.**
-dontwarn sun.reflect.**
-dontwarn android.test.**


-keepclasseswithmembernames class * {
    native <methods>;
}

-keepclasseswithmembers class * {
    public <init>(android.content.Context, android.util.AttributeSet);
}

-keepclasseswithmembers class * {
    public <init>(android.content.Context, android.util.AttributeSet, int);
}

-keepclassmembers class * extends android.app.Activity {
   public void *(android.view.View);
}

-keepclassmembers enum * {
    public static **[] values();
    public static ** valueOf(java.lang.String);
}

-keep class * implements android.os.Parcelable {
  public static final android.os.Parcelable$Creator *;
}

-keep class net.gree.** {
  public protected private *;
}

Exception that I am trying to get rid of:

11-06 12:25:41.718: E/AndroidRuntime(10764): java.lang.RuntimeException: Unable to create application com.mygame.Application: java.lang.RuntimeException: Could not find a suitable constructor in net.gree.asdk.core.track.TrackItemStorageImpl. Classes must have either one (and only one) constructor annotated with @Inject or a zero-argument constructor that is not private.
11-06 12:25:41.718: E/AndroidRuntime(10764):    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4154)
11-06 12:25:41.718: E/AndroidRuntime(10764):    at android.app.ActivityThread.access$1300(ActivityThread.java:130)
11-06 12:25:41.718: E/AndroidRuntime(10764):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1255)
11-06 12:25:41.718: E/AndroidRuntime(10764):    at android.os.Handler.dispatchMessage(Handler.java:99)
11-06 12:25:41.718: E/AndroidRuntime(10764):    at android.os.Looper.loop(Looper.java:137)
11-06 12:25:41.718: E/AndroidRuntime(10764):    at android.app.ActivityThread.main(ActivityThread.java:4745)
11-06 12:25:41.718: E/AndroidRuntime(10764):    at java.lang.reflect.Method.invokeNative(Native Method)
11-06 12:25:41.718: E/AndroidRuntime(10764):    at java.lang.reflect.Method.invoke(Method.java:511)
11-06 12:25:41.718: E/AndroidRuntime(10764):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
11-06 12:25:41.718: E/AndroidRuntime(10764):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
11-06 12:25:41.718: E/AndroidRuntime(10764):    at dalvik.system.NativeStart.main(Native Method)
11-06 12:25:41.718: E/AndroidRuntime(10764): Caused by: java.lang.RuntimeException: Could not find a suitable constructor in net.gree.asdk.core.track.TrackItemStorageImpl. Classes must have either one (and only one) constructor annotated with @Inject or a zero-argument constructor that is not private.
11-06 12:25:41.718: E/AndroidRuntime(10764):    at net.gree.asdk.core.inject.Binder.getConstructorOf(Unknown Source)
11-06 12:25:41.718: E/AndroidRuntime(10764):    at net.gree.asdk.core.inject.Binder.createInstance(Unknown Source)
11-06 12:25:41.718: E/AndroidRuntime(10764):    at net.gree.asdk.core.inject.Binder.getOrCreateInstance(Unknown Source)
11-06 12:25:41.718: E/AndroidRuntime(10764):    at net.gree.asdk.core.inject.Binder.createInstance(Unknown Source)
11-06 12:25:41.718: E/AndroidRuntime(10764):    at net.gree.asdk.core.inject.Binder.finishBinding(Unknown Source)
11-06 12:25:41.718: E/AndroidRuntime(10764):    at net.gree.asdk.core.inject.InternalInjector.createInjector(Unknown Source)
11-06 12:25:41.718: E/AndroidRuntime(10764):    at net.gree.asdk.core.Injector.init(Unknown Source)
11-06 12:25:41.718: E/AndroidRuntime(10764):    at net.gree.asdk.core.Core.initialize(Unknown Source)
11-06 12:25:41.718: E/AndroidRuntime(10764):    at net.gree.asdk.api.GreePlatform.initialize(Unknown Source)
11-06 12:25:41.718: E/AndroidRuntime(10764):    at com.aqif.speedymind.application.SpeedyApplication.onCreate(Unknown Source)
11-06 12:25:41.718: E/AndroidRuntime(10764):    at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:999)
11-06 12:25:41.718: E/AndroidRuntime(10764):    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4151)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T14:50:38+00:00Added an answer on June 14, 2026 at 2:50 pm

    This worked for me

    ################### GREE SDK ##################
    -keepclassmembers,allowobfuscation class * {
        @net.gree.asdk.core.inject.Inject <fields>;
        @net.gree.asdk.core.inject.Inject <init>(...);
    }
    
    
    ##################### GSON #####################
    -keepattributes Signature
    -keep class sun.misc.Unsafe { *; }
    
     # Model classes parsed by GSON
    -keep class net.gree.asdk.** {
        public protected private *;
    }
    

    It is similar to another response but using GREE specific annotation.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am creating a game in Unity3d using the GREE c# API. I am
Using C# .NET 3.5 and WCF, I'm trying to write out some of the
Using the Exiv2 library to write some exif tags to an image i'm running
Using the C# Facebook SDK 5.0.3 everything works fine whit the client.Get(/me). But when
Using Meteor, I'm attempting to understand when to use server-side Meteor.methods() while still retaining
Using a CSS image sprite, I'm creating an 'interactive' image where hovering over certain
Using a populated Table Type as the source for a TSQL-Merge. I want to
using this http://bl.ocks.org/950642 we can see how to add images to nodes, the question
Using SQL Server 2008 R2 we are looking for a way to select the
Using CI for the first time and i'm smashing my head with this seemingly

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.