title: Package does not exist - android/java
body: <p>I ran into this weird problem that happens when i try to run a unit test for one of my app classes: "package does not exist".</p>
  
  <p>If i run the app i get the same error, but if i press "run" again it compiles and works just fine, i have also made another unit test for another class and the same process repeats i run it the first time, get the error, run it again and it compiles. But for some reason when i run this new unit test in particular i get the same error and does not compile.</p>
  
  <p>Here is the particular code generating the error:</p>
  
  <pre><code>package chess_game;
  import org.junit.Test;
  import pieces.*;
  import static org.junit.Assert.*;
  public class GameTest {
      @Test
      public void enPassantLegalMoves(){
  
          ...
  
          Piece bking = new King(PieceColour.BLACK);
          bd[3][2].setPiece(bking);
  
          Piece bpawn = new Pawn(PieceColour.BLACK);
          bpawn.setHasMovedAlready(true);
          bd[4][4].setPiece(bpawn);
  
          Piece wking = new King(PieceColour.WHITE);
          bd[7][4].setPiece(wking);
  
          Piece wpawn = new Pawn(PieceColour.WHITE);
          wpawn.setHasMovedAlready(true);
          bd[4][3].setPiece(wpawn);
  
          ...
      }
  }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/jKJxP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jKJxP.png" alt="enter image description here"></a> <a href="https://i.stack.imgur.com/5U2lF.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5U2lF.png" alt="The error"></a></p>
  
  <p><strong>Note:</strong> I dont know if its relevant but i am using android studio and the IDE doesn`t give any warnings besided the compiling error.</p>
  
  <p>Thanks in advance.</p>