2011-06-14 5 views
8

मैंने गलती से अपना जेन फ़ोल्डर हटा दिया और अब, अनुमान है कि, मेरे संसाधन सभी गड़बड़ हो गए हैं। मैंने अभी एक जेन फ़ोल्डर बनाया है और प्रोजेक्ट> क्लीन - काम नहीं किया। राइट-क्लिक प्रोजेक्ट का प्रयास किया और एंड्रॉइड टूल्स पर जाकर> परियोजना गुणों को ठीक करें - काम नहीं किया। अनचेकिंग को स्वचालित रूप से बनाने का प्रयास किया ... काम नहीं किया। साफ, बंद परियोजना, बंद ग्रहण, पुनरारंभ, इत्यादि। कुछ भी नहीं काम कर रहा है और मैं यह त्रुटि देख रखना: gen already exists but is not a source folder. Convert to a source folder or rename it.हटाए गए जेन फ़ोल्डर, ग्रहण अब इसे उत्पन्न नहीं कर रहा है :(

संपादित करें - ठीक है R.java उत्पन्न करने में सक्षम था, लेकिन अब मैं कंसोल में पागल सामान हो रही है:

[2011-06-14 17:06:11 - fastapp] Conversion to Dalvik format failed with error 1 [2011-06-14 17:06:42 - fastapp] Dx trouble processing "java/awt/font/NumericShaper.class":

Ill-advised or mistaken usage of a core class (java.* or javax.*) 
when not building a core library. 

This is often due to inadvertently including a core library file 
in your application's project, when using an IDE (such as 
Eclipse). If you are sure you're not intentionally defining a 
core class, then this is the most likely explanation of what's 
going on. 

However, you might actually be trying to define a class in a core 
namespace, the source of which you may have taken, for example, 
from a non-Android virtual machine project. This will most 
assuredly not work. At a minimum, it jeopardizes the 
compatibility of your app with future versions of the platform. 
It is also often of questionable legality. 

If you really intend to build a core library -- which is only 
appropriate as part of creating a full virtual machine 
distribution, as opposed to compiling an application -- then use 
the "--core-library" option to suppress this error message. 

If you go ahead and use "--core-library" but are in fact 
building an application, then be forewarned that your application 
will still fail to build or run, at some point. Please be 
prepared for angry customers who find, for example, that your 
application ceases to function once they upgrade their operating 
system. You will be to blame for this problem. 

If you are legitimately using some code that happens to be in a 
core package, then the easiest safe alternative you have is to 
repackage that code. That is, move the classes in question into 
your own package namespace. This means that they will never be in 
conflict with core system classes. JarJar is a tool that may help 
you in this endeavor. If you find that you cannot do this, then 
that is an indication that the path you are on will ultimately 
lead to pain, suffering, grief, and lamentation. 

[2011-06-14 17:06:42 - fastapp] Dx 1 error; aborting 
[2011-06-14 17:06:42 - fastapp] Conversion to Dalvik format failed with error 1 

And eclipse can't resolve the import of my resources import com.me.fastapp.R;

+1

तुम बस ग्रहण बताने के लिए कि फ़ोल्डर स्रोत कोड के लिए है की आवश्यकता हो सकती। इस जवाब http://stackoverflow.com/questions/5641072/eclipse-java-missing-required-source-folder-src – slezica

उत्तर

17
  1. सही अपनी परियोजना क्लिक
  2. गुण का चयन करें।
  3. करें जावा का निर्माण पथ
  4. क्लिक करें फ़ोल्डर जोड़ें
  5. जनरल फ़ोल्डर
  6. ठीक क्लिक करें का चयन करें।
+0

बहुत बढ़िया मिलते हैं! ऐसा लगता है कि जेन फ़ोल्डर को रखना जरूरी है, लेकिन आर। जावा उत्पन्न नहीं हो रहा है ... – LuxuryMode

+0

आपको परियोजना को पुनर्निर्माण करने की भी आवश्यकता हो सकती है। यदि आप डिफ़ॉल्ट सेटिंग्स का उपयोग कर रहे हैं, तो यह स्वचालित रूप से बनाता है, इसलिए प्रोजेक्ट को साफ़ करें। प्रोजेक्ट मेनू पर जाएं, साफ करें का चयन करें, सभी परियोजनाओं का चयन करें (या जो भी आपकी समस्या प्रोजेक्ट है)। – kabuko

+0

ऐसा लगता है कि मुझे अब मिल गया है। धन्यवाद! – LuxuryMode

1

शायद आर वर्ग की तैयारी (उदाहरण के लिए, कुछ लेआउट xml में त्रुटि के कारण) में कोई समस्या है। बिल्डर्स आउटपुट को प्राथमिकता से "वर्बोज़" पर बदलें और कंसोल में देखें जहां पीढ़ी टूट जाती है।

3

मुझे नहीं पता कि यह एक उत्तर के रूप में योग्य है, लेकिन अंततः मैंने अपने हाथों को फेंक दिया और बस मेरी आखिरी प्रतिबद्धता में वापस आ गया।

2

मैं नए संस्करण में v22 और एडीटी के लिए अपना SDK अपग्रेड करने के बाद ही इस मुद्दे को आज था। जाहिरा तौर पर अपना SDK प्रबंधक वहाँ भी एसडीके मंच-उपकरण में परिवर्तन कर रहे थे और हाल में शुरू की एसडीके बिल्ड-उपकरण तो यह उपकरण उन्नयन नहीं किया, मेरी एसडीके/ADT के बंडल के कारण भीतर/जनरल फ़ोल्डर की सामग्री को उत्पन्न नहीं करने का पता नहीं चला ग्रहण।

मुझे एसडीके और एडीटी दोनों को अपग्रेड करने के बाद एसडीके प्रबंधक पर वापस जाना पड़ा, इसलिए यह मुझे एसडीके प्लेटफार्म-टूल्स को 17 (16 में से) और एसडीके बिल्ड-टूल्स (17) को स्थापित/अपडेट करने का विकल्प भी प्रदान करेगा।)।

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