简体   繁体   中英

Android: Eclipse can't build projects

days ago I opened ADT and it suggested to update 2-3 things. I did without even looking what they were, and after it all gen folders are empty. I have about 40 little projects, and they all don't have R and BuildConfig classes. I can't create a new project, "Compile With: " field stays empty. When I open "Android -> Properties -> Android" then everything is empty there, no Project Build Target and no Library, and no possibility to add. I cleaned many times, Built manually and automatically, insatlled Build Tools in SDK Manager. no error in any layout file. what else to do? Help please.

There are two parts to the tools necessary to build an Android project, the version numbers of each part need to match. I suspect that from your description, that you have only updated one, namely the Android SDK Tools

To check the version of this component, click on the Android SDK Manager icon in the toolbar and in the popped up window you will probably see "Android ADK Tools rev 22.6.2" near the top.

Now check the other necessary part, ( the plugin ), version number by selecting Help, Install new software , click ' what is already installed ". At the top you will see the 4 plugin Android components. These need to be version 22.6.2 as well. If they are not then add the repository https://dl-ssl.google.com/android/eclipse and update it if necessary.

In Eclipse , Open Android Sdk Manager and install or update required Android SDK Build-Tools .

Then restart Eclipse .

Goto windows -> preferences -> android -> sdk location and browse your updated sdk and ok. Hope this will solve your issue

Eclipse has Android SDK manager option Top on left side. go to Android SDK Manager and Install Android API packages.

I had same problem yesterday and this is how I solved it : 1.Check if your SDK Manager Works if it says that tools folder is missing it means you dont have any SDK installed if you have then go to : Window -> Preferences -> Android -> and browse to find SDK in my case it is
...Documents\\ADT\\adt-bundle-windows-x86_64-20131030\\sdk
then click Apply to refresh if it found sdk chose it then do same for your project to make sure it has sdk assigned to use and about R
In each class u will have to go to import section and delete R import because eclipse changed it to R.android, then just import your R. class.

If that doesn't help please list more information and what you tried so far.
Good luck

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