Eclipse error and corresponding processing method accumulation

Source: Internet
Author: User

Error 1:
Conversion to Dalvik format failed with error 1

The reason for the error: The reason is that I accidentally imported Java Mina in the Android project, the result of a running program reported this error.
Workaround: Remove the Mina package used in Java and just OK.
Summary: In the future when you encounter this error, remember to remind yourself that it may be due to their own guide to the wrong package.
Attached: Other online processing methods: http://android.blog.51cto.com/268543/406371

Error 2:
Exception in thread "main" java.lang.noclassdeffounderror:org/slf4j/loggerfactory

The reason for the error:
The exception occurs inside the main thread. This class is not found in the Javalang bag. That is, there are no packages to import accordingly.
This error, which I found in Java to implement a communication conversation with Mina, was due to the fact that the following two packages were not imported.
Workaround: Import the package Slf4j-api-1.6.4.jar and Slf4j-nop-1.6.4.jar two packages.
Android and Java inside the Mina bag I put in my blog resources have, want to use words can go to download.
Summary: Remember to import the package problem, especially when you are not with the Java package, you must remember. There is a mistake, directly copied to Google, find solutions.

Error 3:
[2012-05-18 20:27:23-Here is your project name] The connection to ADB are down, and a severe error has occured.
[2012-05-18 20:27:23-...] You must restart ADB and Eclipse.
[2012-05-18 20:27:23-... Please ensure the ADB is correctly located in ' E:\Program Files\andriod_sdk\platform-tools\adb.exe ' and can be executed.

The reason for the error: Because the hint is that the ADB connection has been closed, a service error has occurred. That is, you should close the ADB process and start eclipse anew.
Workaround: Open Task Manager, end the Adb.exe process directly in the process, note that there may be multiple adb.exe processes, and remember to close them all.
Summary: When you do not know how to deal with the error, copied to Google should be able to solve the problem.
Attached: Other online processing methods: http://logger.iteye.com/blog/911977

Error 4:
Java.lang.NoClassDefFoundError:org.apache.mina.transport.socket.nio.NioSocketConnector

The cause of the error: Do not know ....
Workaround: Create a new project, copy the contents of the past, and pay attention to the package name.

Question 5:
How to solve the Chinese annotation garbled in eclipse?
Solution: Do projects are usually encoded with UTF-8, Eclipse's default encoding is GBK, you are in the Menu bar window, select the Preferences option, the first general workspace, selected right there is a text file Encoding, the default is selected on GBK, choose Other, List optional, select the bottom of the UTF-8, after the application and then import or create the project will not appear garbled.
Question 6:
Eclipse Import Package prompts setting build path has encountered a problem
Tip: ' Setting build path ' has encountered a problem,could not write file D:\\workspace\aaa\.classpath
Error reason: is the path problem
Solution: Locate the hidden. classpath file in the project, and modify its hidden properties to be visible.

This type of error is common when you copy a Java project from a machine's eclipse workspace to another machine's eclipse work environment.
Question 7:
Java.lang.RuntimeException:Unable to instantiate activity ComponentInfo
Specific:
Java.lang.RuntimeException:Unable to instantiate activity componentinfo{com. Ipcamera/com. IpCamera.com.IpCamera.MainActivity}: Java.lang.ClassNotFoundException:com. IpCamera.com.IpCamera.MainActivity in Loader dalvik.system.pathclassloader[/data/app/com. IPCAMERA-1.APK]
Solution: Check the data, just know to lead in the project configuration file inside the path problem.
<activity
Android:label= "@string/app_name"
Android:name= ". Mainactivity ">
<intent-filter >
<action android:name= "Android.intent.action.MAIN"/>
<category android:name= "Android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<activity
Should be the inside of theandroid:name= ". Mainactivity "> instead: android:name= "com. Ipcamera.mainactivity ">Reference site: http://blog.csdn.net/id19870510/article/details/6310334











Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.