Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
@ContentView and Proguard
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
thierryd  
View profile  
 More options Feb 13 2012, 11:38 am
From: thierryd <thier...@gmail.com>
Date: Mon, 13 Feb 2012 08:38:40 -0800 (PST)
Local: Mon, Feb 13 2012 11:38 am
Subject: @ContentView and Proguard
Hi all,
I can't make @ContentView works when I use Proguard on my app.

For example:
@ContentView(R.layout.activity_foo)
public class Foo extends Activity {

}

Works during development, but as soon as I package my app for release,
the layout in empty. Furthermore, any @InjectView returns null.

I tried setting in "proguard.cfg":
-keepattributes **

Without success. I even see in the proguard log:
  + Runtime visible annotations attribute:
    + Annotation [Lroboguice/inject/ContentView;]:
      + Constant element value [value '73']
        + Integer [2130903067]

So it looks like proguard modifies the @ContentView annotation and the
result does not work. Any suggestions?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Craig Andrews  
View profile  
 More options Feb 13 2012, 11:42 am
From: "Craig Andrews" <candr...@integralblue.com>
Date: Mon, 13 Feb 2012 11:42:17 -0500
Local: Mon, Feb 13 2012 11:42 am
Subject: Re: [roboguice] @ContentView and Proguard
I had the same problem. I found that disabling a few optimizations fixes
the problem:

-optimizations
!code/simplification/arithmetic,!code/allocation/variable,!field/*,!class/m erging/*

Specifically, !code/allocation/variable and !field/* fixed this particular
problem. !class/merging/* fixed a problem where dex would error out with
an invalid opcode error in the Android support v4 library.

~Craig


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Stéphane Nicolas  
View profile  
 More options Sep 28 2012, 1:06 am
From: Stéphane Nicolas <snico...@octo.com>
Date: Thu, 27 Sep 2012 22:06:25 -0700 (PDT)
Local: Fri, Sep 28 2012 1:06 am
Subject: Re: [roboguice] @ContentView and Proguard

It doesn't work for me. I tried with

-optimizations
!code/simplification/arithmetic,!code/allocation/variable,!field/*,!class/m erging/*

and

-keepattributes **

But my first loaded layout fails on a null pointer exception when using the
first reference of the first view.

Am I the only one to face this problem ?

Could you publish more of your proguard files please ?

Thx

Le lundi 13 février 2012 17:42:17 UTC+1, candrews a écrit :


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Stéphane Nicolas  
View profile  
 More options Sep 28 2012, 1:14 am
From: Stéphane Nicolas <snico...@octo.com>
Date: Thu, 27 Sep 2012 22:14:52 -0700 (PDT)
Local: Fri, Sep 28 2012 1:14 am
Subject: Re: [roboguice] @ContentView and Proguard

But this worked :

-keepattributes *Annotation*,Signature  

-keep class com.google.inject.Binder    

-keep public class com.google.inject.Inject

 # keeps all fields and Constructors with @Inject

-keepclassmembers,allowobfuscation class * {

    @com.google.inject.Inject <fields>;

    @com.google.inject.Inject <init>(...);

}

Le vendredi 28 septembre 2012 07:06:25 UTC+2, Stéphane Nicolas a écrit :


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Manfred Moser  
View profile  
 More options Sep 28 2012, 3:48 pm
From: Manfred Moser <mosa...@gmail.com>
Date: Fri, 28 Sep 2012 12:48:29 -0700
Local: Fri, Sep 28 2012 3:48 pm
Subject: Re: [roboguice] @ContentView and Proguard
Optimizations are very hard to get working. I would try without as a
first step..


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »