Search code examples
androideclipseadteclipse-adt

New Android project fails to create successfully


I want to create an android project in eclipse. Seems simple enough. I downloaded and installed:

eclipse version:

Version: Luna Service Release 1 (4.4.1)
Build id: 20140925-1800

ADT version latest from:

https://dl-ssl.google.com/android/eclipse/

On windows 64 bit.

When I create a new project I follow the wizard with the following settings:

Application Name: DemoProject Project Name: DemoProject Package Name:com.example.demoproject Min SDK: API8 Target: API21 Compile with API21 Theme: Holo light with dark action bar

Create customer launcher icon, create activity, create project in the workspace

Icon is text, ImF,full padding and circle option.

I then choose Blank Activity and leave defaults on the next page. I then press finish. The wizard page remains open and the following appear in the console view:

[2014-11-25 22:39:15 - DemoProject] C:\Users\Andy\workspace\DemoProject\res\values\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'.
[2014-11-25 22:39:15 - DemoProject] 
[2014-11-25 22:39:15 - DemoProject] C:\Users\Andy\workspace\DemoProject\res\values-v11\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'.
[2014-11-25 22:39:15 - DemoProject] 
[2014-11-25 22:39:15 - DemoProject] C:\Users\Andy\workspace\DemoProject\res\values-v14\styles.xml:8: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'.
[2014-11-25 22:39:15 - DemoProject] 
[2014-11-25 22:39:16 - DemoProject] C:\Users\Andy\workspace\DemoProject\res\values\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'.
[2014-11-25 22:39:16 - DemoProject] 
[2014-11-25 22:39:16 - DemoProject] C:\Users\Andy\workspace\DemoProject\res\values-v11\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'.
[2014-11-25 22:39:16 - DemoProject] 
[2014-11-25 22:39:16 - DemoProject] C:\Users\Andy\workspace\DemoProject\res\values-v14\styles.xml:8: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'.
[2014-11-25 22:39:16 - DemoProject] 
[2014-11-25 22:39:21 - DemoProject] C:\Users\Andy\workspace\DemoProject\res\values\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'.
[2014-11-25 22:39:21 - DemoProject] 
[2014-11-25 22:39:21 - DemoProject] C:\Users\Andy\workspace\DemoProject\res\values-v11\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'.
[2014-11-25 22:39:21 - DemoProject] 
[2014-11-25 22:39:21 - DemoProject] C:\Users\Andy\workspace\DemoProject\res\values-v14\styles.xml:8: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'.
[2014-11-25 22:39:21 - DemoProject] 

Really not sure what the next step is!?


Solution

  • Go to Android SDK Manager and download Android Support Library like explained here: No resource found that matches the given name '@style/Theme.AppCompat.Light'.

    Since you want to support Api from level 8, and from that themes changes a lot, you need some libraries to do "retro compatibility".. Also pay attention when you code, to manage different versions and to import correct package.