Re: .apt_generated folder is empty after successfully building the maven project

1,193 views
Skip to first unread message

Joan Zapata

unread,
Apr 4, 2013, 4:35:45 AM4/4/13
to androidan...@googlegroups.com
Have you tried the "Error Log" view (not "Problems") in Eclipse ?
Does anything relevant show up ?

Le jeudi 4 avril 2013 09:40:47 UTC+2, Aswathy P Krishnan a écrit :
I had reported this issue in GitHub recently. My project is building and running without any problem, but in my .apt_generated folder there are no *_.java files generated and also no R.java file in my gen folder. This is resulting in my entire project classes showing R.java file missing and also i am not able to import the *_.java files making it difficult to code further. As the project is working fine, I hope these files are created somewhere else (maybe!). 

These files were getting created and everything was working fine before until recently out of nowhere, this weird behavior started. 

Alexandre THOMAS

unread,
Apr 4, 2013, 4:53:09 AM4/4/13
to androidan...@googlegroups.com
Hi, 

If I understand correctly, you can compile et run your project whereas your .apt_generated is empty and there is no R file. It's a very weird problem!
I had a problem that looked like that. It seemed that Eclipse kept some old generated AA classes somewhere else and it didn't want to generate again.
My solution was => get a new Eclipse and put my project in a clean and new workspace. As a rule I create a workspace for each project.

I hope it will help you.



--
You received this message because you are subscribed to the Google Groups "androidannotations" group.
To unsubscribe from this group and stop receiving emails from it, send an email to androidannotati...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Alexandre THOMAS
Consultant JEE/iOS/Android chez Ebusiness Information

Aswathy P Krishnan

unread,
Apr 4, 2013, 4:59:45 AM4/4/13
to androidan...@googlegroups.com
My error log is showing nothing except some messages like this:


menu.xml: Failed to convert ?attr/settingsIconBackground into a drawable 
java.lang.NumberFormatException: Color value '?attr/settingsIconBackground' must start with #
at com.android.layoutlib.bridge.impl.ResourceHelper.getColor(ResourceHelper.java:71)
at com.android.layoutlib.bridge.impl.ResourceHelper.getDrawable(ResourceHelper.java:248)
at android.content.res.BridgeTypedArray.getDrawable(BridgeTypedArray.java:782)
at android.widget.ImageView.<init>(ImageView.java:120)
at android.widget.ImageView.<init>(ImageView.java:110)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at android.view.LayoutInflater.createView(LayoutInflater.java:587)
at android.view.BridgeInflater.onCreateView(BridgeInflater.java:86)
at android.view.LayoutInflater.onCreateView(LayoutInflater.java:660)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:685)
at android.view.BridgeInflater.createViewFromTag(BridgeInflater.java:131)
at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:746)
at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:718)
at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:749)
at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:718)
at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:749)
at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:718)
at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:749)
at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:718)
at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
at android.view.LayoutInflater.inflate(LayoutInflater.java:372)
at com.android.layoutlib.bridge.impl.RenderSessionImpl.inflate(RenderSessionImpl.java:385)
at com.android.layoutlib.bridge.Bridge.createSession(Bridge.java:332)
at com.android.ide.common.rendering.LayoutLibrary.createSession(LayoutLibrary.java:325)
at com.android.ide.eclipse.adt.internal.editors.layout.gle2.RenderService.createRenderSession(RenderService.java:440)
at com.android.ide.eclipse.adt.internal.editors.layout.gle2.GraphicalEditorPart.renderWithBridge(GraphicalEditorPart.java:1545)
at com.android.ide.eclipse.adt.internal.editors.layout.gle2.GraphicalEditorPart.recomputeLayout(GraphicalEditorPart.java:1302)
at com.android.ide.eclipse.adt.internal.editors.layout.gle2.GraphicalEditorPart.activated(GraphicalEditorPart.java:1059)
at com.android.ide.eclipse.adt.internal.editors.layout.LayoutEditorDelegate.delegatePageChange(LayoutEditorDelegate.java:686)
at com.android.ide.eclipse.adt.internal.editors.common.CommonXmlEditor.pageChange(CommonXmlEditor.java:360)
at org.eclipse.ui.part.MultiPageEditorPart$2.widgetSelected(MultiPageEditorPart.java:292)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)

But these were implemented when this issue was not there. and also this is not affecting the running of my project. ( :( ?)

Aswathy P Krishnan

unread,
Apr 4, 2013, 5:09:48 AM4/4/13
to androidan...@googlegroups.com


Hi,

Thanks a lot for your feedback. :) 
I also think that it should be an eclipse problem(no other way that my project works perfectly). I will certainly try out your solution!

But in between, I can see the *_.java files inside my project in the following path : \target\generated-sources\annotations\"project-package-name" and these are getting updated when I add a new class file into my project and run it. 



On Thursday, April 4, 2013 2:23:09 PM UTC+5:30, Alexandre THOMAS wrote:
Hi, 

If I understand correctly, you can compile et run your project whereas your .apt_generated is empty and there is no R file. It's a very weird problem!
I had a problem that looked like that. It seemed that Eclipse kept some old generated AA classes somewhere else and it didn't want to generate again.
My solution was => get a new Eclipse and put my project in a clean and new workspace. As a rule I create a workspace for each project.

I hope it will help you.

On Thu, Apr 4, 2013 at 10:35 AM, Joan Zapata <jza...@excilys.com> wrote:
Have you tried the "Error Log" view (not "Problems") in Eclipse ?
Does anything relevant show up ?

Le jeudi 4 avril 2013 09:40:47 UTC+2, Aswathy P Krishnan a écrit :
I had reported this issue in GitHub recently. My project is building and running without any problem, but in my .apt_generated folder there are no *_.java files generated and also no R.java file in my gen folder. This is resulting in my entire project classes showing R.java file missing and also i am not able to import the *_.java files making it difficult to code further. As the project is working fine, I hope these files are created somewhere else (maybe!). 

These files were getting created and everything was working fine before until recently out of nowhere, this weird behavior started. 

--
You received this message because you are subscribed to the Google Groups "androidannotations" group.
To unsubscribe from this group and stop receiving emails from it, send an email to androidannotations+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.
 
 

Joan Zapata

unread,
Apr 4, 2013, 5:16:53 AM4/4/13
to androidan...@googlegroups.com
I know i'm a bit stubborn but can you try removing the "?attr/settingsIconBackground" thing in your menu.xml just to see if it works after that?
A problem during XML parsing is a common reason for the R file not to be generated.

2013/4/4 Aswathy P Krishnan <asw...@cellapp.in>
To unsubscribe from this group and stop receiving emails from it, send an email to androidannotati...@googlegroups.com.

Aswathy P Krishnan

unread,
Apr 4, 2013, 7:04:52 AM4/4/13
to androidan...@googlegroups.com
OMG!! I am afraid that is not possible because it is not the single attribute which is present in the project. There are lots and lots of them as my project is based on different themes. 

Also, as an extension to what I have replied to @Alexandre THOMAS, there are annotated java files getting created inside my target folder, and when I copied and pasted those files into my .apt_generated folder and also R.java file from target folder into gen folder all the errors were gone.
I know it is not the correct method but I had to do it as I had to continue with my coding. ;)

But I really wish I solve it through the correct method..! :(

On Thursday, April 4, 2013 2:46:53 PM UTC+5:30, Joan Zapata wrote:
I know i'm a bit stubborn but can you try removing the "?attr/settingsIconBackground" thing in your menu.xml just to see if it works after that?
A problem during XML parsing is a common reason for the R file not to be generated.

2013/4/4 Aswathy P Krishnan <asw...@cellapp.in>


Hi,

Thanks a lot for your feedback. :) 
I also think that it should be an eclipse problem(no other way that my project works perfectly). I will certainly try out your solution!

But in between, I can see the *_.java files inside my project in the following path : \target\generated-sources\annotations\"project-package-name" and these are getting updated when I add a new class file into my project and run it. 



On Thursday, April 4, 2013 2:23:09 PM UTC+5:30, Alexandre THOMAS wrote:
Hi, 

If I understand correctly, you can compile et run your project whereas your .apt_generated is empty and there is no R file. It's a very weird problem!
I had a problem that looked like that. It seemed that Eclipse kept some old generated AA classes somewhere else and it didn't want to generate again.
My solution was => get a new Eclipse and put my project in a clean and new workspace. As a rule I create a workspace for each project.

I hope it will help you.

On Thu, Apr 4, 2013 at 10:35 AM, Joan Zapata <jza...@excilys.com> wrote:
Have you tried the "Error Log" view (not "Problems") in Eclipse ?
Does anything relevant show up ?

Le jeudi 4 avril 2013 09:40:47 UTC+2, Aswathy P Krishnan a écrit :
I had reported this issue in GitHub recently. My project is building and running without any problem, but in my .apt_generated folder there are no *_.java files generated and also no R.java file in my gen folder. This is resulting in my entire project classes showing R.java file missing and also i am not able to import the *_.java files making it difficult to code further. As the project is working fine, I hope these files are created somewhere else (maybe!). 

These files were getting created and everything was working fine before until recently out of nowhere, this weird behavior started. 

--
You received this message because you are subscribed to the Google Groups "androidannotations" group.
To unsubscribe from this group and stop receiving emails from it, send an email to androidannotations+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Alexandre THOMAS
Consultant JEE/iOS/Android chez Ebusiness Information
Reply all
Reply to author
Forward
0 new messages