Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
706 views
in Technique[技术] by (71.8m points)

android - Eclipse: Error in xml Graphical Layout after the new update

I updated the Android tools, etc from :

  • SDK Manager
  • help->check for updates
  • help-> Install new Software...

It is actually an improvement with fragment now included when creating an activity.

I get this error in each and every Graphical layout of every xmlenter image description here

Error Log:enter image description here

I added layoutlib-api-22.4.2.jar Add to build path in the project but didn't worked !

How to solve this issue ?

Thanks in advance

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

The new update has a lot of problems the easy way is create your project from command line then import it to eclipse to do that:

  1. Go to sdk folder for example mine is (The folder included android execute):

    $ cd Program/android/adt/sdk/tools/

  2. Get list of target:

    $ ./android list

    Available Android targets:

    id: 1 or "android-7" Name: Android 2.1 ...

  3. Choose one of the target in that list and put the id in this command to create android project:

    $ ./android create project --target 24 --name MyFirstApp --path MyFirstApp --activity Main --package com.mrg.myfirstapp

  4. Then it made for you. now in eclipse right click on project explorer: enter image description here

5.Select this:

enter image description here

6.Rename project name if you want and press Finish

enter image description here

then it may works


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...