You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 26, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Feb 26, 2023. It is now read-only.
public MyActivity_.IntentBuilder_ menu_id(int menu_id) {
return super.extra(MENU_ID_EXTRA, menu_id);
}
But in Android annotation 4.0
the same code
but in MyActivity_.class
/**
*
* ���ݴ�����
* @param menu_id
* the value for this extra
* @return
* the IntentBuilder to chain calls
*/
public DetailListActivity_.IntentBuilder_ menu_id(int menu_id) {
return super.extra(MENU_ID_EXTRA, menu_id);
}
and this cause some error in Android Studio
like this
looks like Android Annotations does not generate UTF-8 files or has some other problems with your UTF-8 comments.
as a workarounnd it should be able to fix the issue when you change your comment to
/*
* 获取布局
*/
@Extra("menu")
int menu_id;
note that there is only one star in the first line of the comment. so it is just a multiline comment and no javadoc comment and AA should not try to copy the value to the generated class.
@dodgex i recall there was a similar issue to this, but i cannot find it. I think there i suggested to add a new processing flag, which modifies the encoding of the generated source files. Currently we use the platform default encoding, but that can be problematic, like in this case.
@dodgex i totally agree, but if somebody uses encoding "something", then the generated UTF-8 files will not be properly recognised by the compiler.
Maybe we should set the default to UTF-8, and add the option to change it.
Activity
dodgex commentedon Apr 11, 2016
looks like Android Annotations does not generate UTF-8 files or has some other problems with your UTF-8 comments.
as a workarounnd it should be able to fix the issue when you change your comment to
note that there is only one star in the first line of the comment. so it is just a multiline comment and no javadoc comment and AA should not try to copy the value to the generated class.
@WonderCsabo any idea how we could fix that?
WonderCsabo commentedon Apr 11, 2016
First, @CrazyClownSola you should try the following:
android { ... compileOptions { encoding "UTF-8" ... } }CrazyClownSola commentedon Apr 12, 2016
@WonderCsabo
I do like this
But it still cause some error in Android Studio
WonderCsabo commentedon Apr 12, 2016
@dodgex i recall there was a similar issue to this, but i cannot find it. I think there i suggested to add a new processing flag, which modifies the encoding of the generated source files. Currently we use the platform default encoding, but that can be problematic, like in this case.
dodgex commentedon Apr 12, 2016
i can't remember of such an issue. but maybe use UTF-8 instead of the default? i think UTF-8 should be used for source files.
WonderCsabo commentedon Apr 12, 2016
@dodgex i totally agree, but if somebody uses
encoding "something", then the generated UTF-8 files will not be properly recognised by the compiler.Maybe we should set the default to UTF-8, and add the option to change it.
dodgex commentedon Apr 12, 2016
that sounds like a good solution
WonderCsabo commentedon Apr 12, 2016
@CrazyClownSola as a workaround, you can try to change your platform default encoding to UTF-8. Not sure if it is possible in your case.
WonderCsabo commentedon Apr 13, 2016
Implemented. @CrazyClownSola you can try the snapshot build.