1. Are you ready for the Galaxy S20? Here is everything we know so far!

Any change in file requires second compile

Discussion in 'Android Development' started by Rascalsailor, Apr 15, 2020.

  1. Rascalsailor

    Rascalsailor Lurker
    Thread Starter

    Hi all. I am still learning and have a project involving a few buttons and a spinner as a simple test. All is working, but a problem came about when I added a new class file (myClass.java), just to practice using and accessing classes in other files. I also have a inner class in another file to spilt the onclick handler in another file also as a test - this is based on this suggestion: https://stackoverflow.com/questions...ultiple-files-for-better-organizatio/27285678
    Whenever I make any change to the myClass.java file (even if it's just typing a space), then when I compile I get errors (cannot find symbol... and others) As soon as I hit compile again, all is well.
    I can even make a file change (e.g. hit space) after the error-prone compile and then if I hit compile again all is ok.
    So I assume it's a synchronization error with the project. I've tried invalidating caches/restart.
    I'll send the code if need be. Any ideas would be great. Using 3.6.2
    Thanks and regards
    Russell
     


  2. Rascalsailor

    Rascalsailor Lurker
    Thread Starter

    No Ideas anyone ? - All I do is make any change in the new class file and then I need to compile twice - first time i get an error, second time is fine.
     
Loading...

Share This Page

Loading...