Getting error while compiling appinventor

Hello Appinventors!

I made some components for my offline appinventor but i am getting some compile errors related to ComponentsTranslation.java

AiClientLib:
   [depend] Deleted 479 out of date files in 4 seconds
    [javac] Compiling 189 source files to E:\appinventor-sources\appinventor\appengine\build\war\WEB-INF\classes
    [javac] E:\appinventor-sources\appinventor\build\components\ComponentTranslation\src\com\google\appinventor\client\ComponentsTranslation.java:185: error: cannot find symbol
    [javac]     map.put("PARAM-adSize", MESSAGES.adSizeParams());
    [javac]                                     ^
    [javac]   symbol:   method adSizeParams()
    [javac]   location: variable MESSAGES of type OdeMessages
    [javac] E:\appinventor-sources\appinventor\build\components\ComponentTranslation\src\com\google\appinventor\client\ComponentsTranslation.java:329: error: cannot find symbol
    [javac]     map.put("PARAM-str", MESSAGES.strParams());
    [javac]                                  ^
    [javac]   symbol:   method strParams()
    [javac]   location: variable MESSAGES of type OdeMessages
    [javac] E:\appinventor-sources\appinventor\build\components\ComponentTranslation\src\com\google\appinventor\client\ComponentsTranslation.java:330: error: cannot find symbol
    [javac]     map.put("PARAM-i", MESSAGES.iParams());
    [javac]                                ^
    [javac]   symbol:   method iParams()
    [javac]   location: variable MESSAGES of type OdeMessages
    [javac] E:\appinventor-sources\appinventor\build\components\ComponentTranslation\src\com\google\appinventor\client\ComponentsTranslation.java:4075: error: cannot find symbol
    [javac]     map.put("PARAM-adsNumber", MESSAGES.adsNumberParams());
    [javac]                                        ^
    [javac]   symbol:   method adsNumberParams()
    [javac]   location: variable MESSAGES of type OdeMessages
    [javac] E:\appinventor-sources\appinventor\build\components\ComponentTranslation\src\com\google\appinventor\client\ComponentsTranslation.java:4076: error: cannot find symbol
    [javac]     map.put("PARAM-primaryImageSize", MESSAGES.primaryImageSizeParams());
    [javac]                                               ^
    [javac]   symbol:   method primaryImageSizeParams()
    [javac]   location: variable MESSAGES of type OdeMessages
    [javac] E:\appinventor-sources\appinventor\build\components\ComponentTranslation\src\com\google\appinventor\client\ComponentsTranslation.java:4077: error: cannot find symbol
    [javac]     map.put("PARAM-secondaryImageSize", MESSAGES.secondaryImageSizeParams());
    [javac]                                                 ^
    [javac]   symbol:   method secondaryImageSizeParams()
    [javac]   location: variable MESSAGES of type OdeMessages
    [javac] E:\appinventor-sources\appinventor\build\components\ComponentTranslation\src\com\google\appinventor\client\ComponentsTranslation.java:4116: error: cannot find symbol
    [javac]     map.put("PARAM-str", MESSAGES.strParams());
    [javac]                                  ^
    [javac]   symbol:   method strParams()
    [javac]   location: variable MESSAGES of type OdeMessages
    [javac] Note: Some input files use or override a deprecated API.
    [javac] Note: Recompile with -Xlint:deprecation for details.
    [javac] Note: Some input files use unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.
    [javac] 7 errors

Any help will be appreciated,
Thanks

2 Likes
  1. Did you make any changes in ComponentsTranslation.java?
  2. Is any code of your newly added components big?
    I mean is any of your components code too long?
1 Like

Actually i discovered it for first time :sweat_smile:

Yeah but not too big i have added 20 ads components code

2 Likes

You may have some issues if your java files are too big...
But for now I don't know anything
Sorry

1 Like

Did you add these messages in OdeMessages.java file?

1 Like

No i havent.. so that's why its causing errors?? if yes what is the correct way to add these messages

1 Like

Typically if you've added new components the component processor will add the entries automatically to the AutogeneratedOdeMessages file, which is a parent interface of OdeMessages, so it is unnecessary to manually add the entries to OdeMessages. Can you verify that AutogeneratedOdeMessages was updated in the build artifacts?

6 Likes

Follow @ewpatton 's suggestion or a temp fix may be

@DefaultMessage("")
  @Description("Just to make ai2 compile :D")
  String adSizeParams(); 

@DefaultMessage("")
  @Description("Just to make ai2 compile :D")
  String strParams(); 

@DefaultMessage("")
  @Description("Just to make ai2 compile :D")
  String iParams(); 

@DefaultMessage("")
  @Description("Just to make ai2 compile :D")
  String adsNumberParams(); 

@DefaultMessage("")
  @Description("Just to make ai2 compile :D")
  String primaryImageSizeParams(); 

@DefaultMessage("")
  @Description("Just to make ai2 compile :D")
  String secondaryImageSizeParams(); 

@DefaultMessage("")
  @Description("Just to make ai2 compile :D")
  String secondaryImageSizeParams();
1 Like

Now getting 100s of error ... i am showing only 1 for refernce

[javac]   symbol:   method appLovinInterstitialComponentPallette()
    [javac]   location: variable MESSAGES of type OdeMessages
    [javac] E:\appinventor-sources\appinventor\build\components\ComponentTranslation\src\com\google\appinventor\client\ComponentsTranslation.java:370: error: cannot find symbol
    [javac]     map.put("AppLovinInterstitial-helpString", MESSAGES.AppLovinInterstitialHelpStringComponentPallette());
    [javac]                                                        ^
    [javac]   symbol:   method AppLovinInterstitialHelpStringComponentPallette()
    [javac]   location: variable MESSAGES of type OdeMessages
    [javac] Note: Some input files use or override a deprecated API.
    [javac] Note: Recompile with -Xlint:deprecation for details.
    [javac] Note: Some input files use unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.
    [javac] 100 errors


is that because of this??

1 Like

make Strings for every one :laughing:

@DefaultMessage("")
@Description("Just to make ai2 compile :D")
String AppLovinInterstitialHelpStringComponentPallette();

after one error solved, others do display :grin:

1 Like

should i try replacing ode messages with the default and then try rebuilding??

well, same errors will come again, errors are because of auto generated stuff for params

2 Likes

as @ewpatton said

so i thought that if i will replace odemessages then it will work

I dont think so that its in odemessages.java as its occuring in components translation

well, my friend, components translation is dependent on OdeMessages

1 Like


i think problem is here as it cant access auto generated messages class

MESSAGES.BlaBla() takes value of specific string form odemessages.java, if its not found, compile will fail

well, did u modify autogeneratedodemessages.java?

AutoGenerated ones are generated automatically during compilation, just run ant clean to clean it

2 Likes