Summary of Eclipse error reporting and corresponding processing methods in Android development

  • 2020-11-26 18:59:04
  • OfStack

In this paper, Eclipse error reporting and corresponding processing methods in Android development are summarized in detail. To share for your reference, the details are as follows:

Error 1:

Conversion to Dalvik format failed with error 1

Reason for error: I accidentally imported mina of Java in the android project, and the result 1 was reported by the program.
Solution: Remove the mina package used in Java and leave it at OK.

Summary: in the future, when you encounter this kind of error, remember to remind yourself that it may be due to their own error guide package.

Attachment: Other online handling methods: "Lost Android system library or Conversion to Dalvik format failed with error 1 Error Solution"

Error 2:
Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory

Reasons for error:

The exception occurs in the main thread, main. This class cannot be found in the Javalang package. That is, no corresponding package has been imported.

This error occurred in an instance of Java using mina to implement a communication conversation because the following two packages were not imported.

Solution: Import packages slf4ES46en-ES47en-1.6.4. jar and slf4ES50en-ES51en-1.6.4en.

The mina packages used in android and Java are available in my blog resources. You can download them if you want.

Summary: Remember to import packages, especially if you are not using the package that comes with Java. Also, if something goes wrong, copy it directly to google to find the solution.

Error:

[2012-05-18 20:27:23 - Your project name is] The connection to adb is down, and a has has occured.
20:27:23 [2012-05-18] -... You must restart adb and Eclipse.
[2012-05-18 20:27:23 -... Please ensure adb correctly correctly :\Program Files\ platform_sdk \adb be executed.

Reason for error: A service error has occurred because the message is that the adb connection is closed. You should close the adb process and restart eclipse.

Solution: Turn on the task manager and kill the ES114en.exe process directly in the process. Note that there may be multiple ES116en.exe processes.

Summary: If an error occurs that you don't know how to handle, copying it to google should solve the problem.

Attachment: Other online processing methods: "The connection to adb is down down Android Programming Android adb is down Problem solution"

An error 4:

java.lang.NoClassDefFoundError: org.apache.mina.transport.socket.nio.NioSocketConnector

Reason for error: not yet known??

Solution: Create a new project, copy the contents of the project, pay attention to the package name.

Question 5:

eclipse Chinese annotation messy code how to solve?

Solution: 1 project to do, is done with UTF - 8 encoding, is the default encoding eclipse GBK, you, in a menu bar Window choose Preferences option, in item 1 General Workspace, selected the right after a Text file encoding, the default choice in Default (GBK), choose Other, optional list, choose UTF - 8 on the bottom of the application and then import or create a project will not be garbled words.

Question 6:

Eclipse Import package prompts Setting build has encountered a problem
Tips: "Setting build path" has a problem, Could not write :\\workspace\aaa\.classpath

Error cause: Path problem

Solution: Find the hidden.classpath file in the project and change its hidden properties to be visible.
This error is commonly seen in the probability of copying an Java project from one machine's Eclipse working environment to another machine's Eclipse working 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, only to know that the guided 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 inside

android:name=".MainActivity" >

To:
android:name="com.IpCamera.MainActivity" >

I hope this article has been helpful in Android programming.


Related articles: