简体   繁体   中英

Hello world android - creation with errors

I'm trying to create my first app with Android but I've encountered some problems.

Following a tutorial and making: new android application -> blank activity

The default result should be:

在此处输入图片说明

With MainActivity.java and R.Java inside it.

But instead I've got this:

在此处输入图片说明

There are a lot of errors and the R.Java file is missing.

I can obtain a result similar to the tutorial one (with no errors), creating a new android application and unchecking create activity, but this time MainActivity.java under src is totally missing. Maybe I could copy the MainActivity.java of the first project and put into the second one, but I prefer understand why it doesn't work.

Thanks for the help. Best regards.

its import library problem

Right click on you application----->Android

under library view ,

check if you have this red error then remove the library and add it again

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM