Some minor problems encountered in Ubuntu using Eclipse

Source: Internet
Author: User
In Ubuntu, directly copy the project directory back and put it in eclipse to the project directory. In fact, the error was reported in the previous days. No error was reported in the case of a project as large as the company... Amazing console error code Unabletoexecutedex: wrapperwasnotproperlyloadedfirstConversiontoDalvikformatfailed: Unabletoexecutedex: wrappe

Copy the project directory directly from Ubuntu and place it in eclipse to the project directory. An error is reported.

No error was reported for any of the company's big projects the other day... Amazing

Console error code

Unable to execute dex: wrapper was not properly loaded first
Conversion to Dalvik format failed: Unable to execute dex: wrapper was not properly loaded first

Check it.

Solution:

Sudo gedit/usr/program/eclipse. ini

Find the Eclipse. ini file in the eclipse directory and change the last two sentences
-Xms128m
-Xmx512m
Restart eclipse
Then, project-> clean will be OK.

The second problem is the de problem when TabHost is used.

Android study week, when two days with TabHost encountered two problems:

Question 1. When you run the Activity Your content must have a TabHost whose id attribute is 'android. R. id. tabhost'

Add a Layout time, xml with element selection TabHost, but the ADT did not add id attribute, running, will be prompted to Your content must have a TabHost whose id attribute is 'android. r. id. tabhost 'error, need to add the android: id = "@ android: id/tabhost", so on it.

Question 2. When you run the Activity Your TabHost must have a TabWidget whose id attribute is 'android. R. id. tabcontent'

Solution: Modify FrameLayout Add id attribute, ADT xml file automatically generated Id is the android: id = "@ + id/FrameLayout01", need to modify into the following format android: id = "@ android: id/tabcontent", this estimated to be troubled by a large number of beginners, who wocould have thought wocould change this place, see the error is easy to modify into tabcontent, but the prefix is not easy to think. but also in the ADT visual editing this document, the interface shows NullPointerException, this is ADT's a BUG.

Modified xml as follows:



Android: id = "@ android: id/tabhost"
Xmlns: android = "http://schemas.android.com/apk/res/android"
Android: layout_width = "fill_parent" android: layout_height = "fill_parent">






Note: If TabHost, then the above three marked red must be the same, this is Google's agreement. And a project can have only one TabHost.

 

TabHost, TabWidget, and FrameLayoutde

Android: The id label must be named according to the android standard, and then there is no problem.

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.