New Android Project not creating Layout or Java file

后端 未结 2 2020
既然无缘
既然无缘 2021-01-28 22:25

I have been trying, for 2 days now, to simply get past the first few pages of the first chapter of Big Nerd Ranch\'s Android Programming Book.

The gist of my problem is

2条回答
  •  情歌与酒
    2021-01-28 23:20

    I had this kind of "bug" the first time I used Eclipse ADT too. In my case uninstall and reinstalling fixed the problem.

    However as the comments told you, it's no big deal to have the files created automatically for you, except in the case you're totally new to Android and doesn't know what you may miss if you create the file from scratch.. which was also my case.

    But in case you are still bugged by the problem then this might help. Usually these 3 files are created automatically for you, but in case they would not, then make them on your own by copy-pasting these:

    AppNameHere\res\layout\activity_main.xml

    
    

    AppNameHere\res\layout\fragment_main.xml

    
    
        
    
    
    

    AppNameHere\src\com.anything.appnamehere\MainActivity.java

    package com.anything.appnamehere;
    public class MainActivity extends Activity{
    
    }
    

    These codes are for my app which is named com.anything.appnamehere, please modify to suit your need.

提交回复
热议问题