I have ported my project from Eclipse to Android Studio.But my Application class "AppController.java" alone showing as a text file.I deleted the file and created again but getting following error message.
Unable to parse template "class" Error message: Selected class file name mapped 'AppController.java' to not java file type 'Textfiles'
Note: I have double checked the file types but no luck. File->Settings->File Types the file type for Java source files, Java class files and Text files
You can find them in the build/intermediates/classes/debug/* directory. Save this answer. Show activity on this post. Rename the following .
In Java application, the entry point is the main() method. The javac command is used to convert the Java source file into the class file. The java command is used to run a Java program stored in a . class file.
Java FileWriter class in java is used to write character-oriented data to a file as this class is character-oriented class because of what it is used in file handling in java.
Java source files are American Standard Code for Information Interchange (ASCII) text files in the integrated file system. You can create and edit a Java source file with IBM i Access for Windows and a workstation-based editor.
I have also encountered the same issue and from your suggestion went to File->Settings->File Types and saw the file name I am trying to create say xyz.java is registered in the "recognized file types" list. As soon as I deleted the entry from that list xyz.java is recognized properly.
Deleted the Android studio's ".AndroidStudio" In the following path from my system C:\Users\user.
Started the Android Studio and configured freshly. That worked for me!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With