Home > other >  Execution Failed for task :app:compileDebugJavaWithJavac in Android Studio 2
Execution Failed for task :app:compileDebugJavaWithJavac in Android Studio 2

Time:12-08

Execution Failed for task :app:compileDebugJavaWithJavac in Android Studio. Encountered this failing the build. The error message pointed to a method that I refactored > renamed, but also removed all instances of the method in some classes, which also removes the import. Javadoc complained that it wasn't finding the method for which the import was removed.

symbol: method oldMethodName() location: class MyClassTest /Filepath.java:420: error: cannot find symbol oldMethodName();

CodePudding user response:

I tried to answer the original question, but it wasn't accepting new answers and mine it pretty different. I encountered this issue when I refactored > renamed a method, but also removed instances of it. For some reason it wouldn't allow me to do both at the same time.

Answer: You can separate these actions into different commits or recreate an unused method of the original name only to delete it in a subsequent commit.

CodePudding user response:

You can separate these actions into different commits or recreate an unused method of the original name only to delete it in a subsequent commit.

  • Related