2010-07-08 19 views
5

मैं एक नमस्ते दुनिया एप्लिकेशन बनाया है, लेकिन यह अजीब त्रुटि मिलती है:ग्रहण - हैलोवर्ल्ड - एंड्रॉइड त्रुटि?

The project cannot be built until the build path errors are resolved 

मैं परियोजना को नहीं बदला है, बहर यह बनाया है और इसे चलाने के लिए कोशिश की।

+1

मैंने आईडीई को रीबूट किया और अब यह काम करता है .... हालांकि मैंने कुछ भी स्पर्श नहीं किया। –

+0

अच्छा बिंदु। मैंने उस प्रक्रिया को शामिल करने के लिए अपना जवाब अपडेट कर दिया है। – VonC

उत्तर

2

बनाया समाधान जो मेरे लिए काम करते थे।

समाधान 1)

delete your generated R.java file inside your gen/ folder

समाधान 2)

a)Delete your project from Eclipse (i said ONLY from Eclipse, uncheck option: Delete project contents on disk)

b) import your project to Eclipse: file > Import > Existing Projects into Workspace (Look for your project previously deleted from Eclipse) > Finish.

समाधान 3)

make Solution 1 then Solution 2

1

लगता है जैसे आप एक आयात या एक जार गायब हैं। प्रोजेक्ट एक्सप्लोरर में आपकी प्रोजेक्ट में फ़ाइल आइकन पर एक लाल एक्स होना चाहिए जिसमें त्रुटि है।

2

यह या तो एक नकली संदेश आपके द्वारा forcing Eclipse to recompute its library paths

I found the resolution for this at Scott D. Strader's blog .
To summarize the solution I only needed to add a library to my project and then remove it to force Eclipse to perform the necessary actions to resolve the problem. I would post the detailed steps here but I don't want to steal his content.

The resolution was to force a resave of the selected projects (and their .classpath files):

  • Open the project properties
  • Select Java Build Path > Libraries
  • Add a new, arbitrary library (to be deleted later) > OK
  • Wait for the workspace to refresh (or force a refresh of the project)
  • The error(s) will go away
  • Remove the dummy library

नोट का समाधान कर सकते हैं: के रूप में ओ पी का उल्लेख है, आईडीई का एक सरल पुनः आरंभ करने के लिए पर्याप्त हो सकता है।


या आप वास्तव में एक महत्वपूर्ण पुस्तकालय like a JRE library याद आती है:

I needed to add the JRE library to the project for it to run. Not sure if this was due to the updated version or something else…. Any way this fixed the issue:

  • Project > Properties
  • Java Build Path
  • Libraries tab
  • Click add library
  • Select JRE System Library
  • Next
  • Finish
1

सूचीबद्ध उत्तर के अलावा, वहाँ एक अन्य परिदृश्य मैंने देखा है जब नमूना परियोजनाओं के साथ शामिल का उपयोग कर इस त्रुटि दिखाई है एंड्रॉइड एसडीके। किसी कारण से, जेनरेट की गई R.java फ़ाइल अमान्य या दूषित हो सकती है। आप पैकेज एक्सप्लोरर में "जेन" फ़ोल्डर का विस्तार करके और R.java फ़ाइल को हटाकर इसे प्राप्त कर सकते हैं। यह तुरंत पुनर्जन्म मिलेगा और त्रुटि दूर हो जाएगी।

1

सही अपनी परियोजना पर क्लिक करें, चुनें "पथ का निर्माण", "कॉन्फ़िगर बिल्ड पथ" -> और चुनें Android 2.2, या कि लक्ष्य आपके द्वारा निर्दिष्ट जब आप उस कष्टप्रद समस्या मेरे पास है 3 से बचने के लिए अपनी परियोजना

0

मैं इसी तरह के मुद्दों पड़ा है। मेरे लिए बस एमुलेटर बंद करना और प्रोजेक्ट कामों को फिर से चलाने के लिए

संबंधित मुद्दे