Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Android

Gian Lazzarini
Gian Lazzarini
3,263 Points

Getting "Cannot resolve symbol" error after converting android project form Eclipse to Android Studio with Gradle

I wrote an app on my phone using AIDE and didn't know what I was doing so I did it in an Eclipse format. Now I really want to us this code in Android Studio.

<?xml version="1.0" encoding="utf-8"?> <resources> <style name="AppTheme" parent="@android:style/Theme.Holo"> </style> </resources>

<?xml version="1.0" encoding="utf-8"?> <resources> <style name="AppTheme" parent="@android:style/Theme.Material.Light"> </style> </resources>

Error:(2) Error retrieving parent for item: No resource found that matches the given name '@android:style/Theme.Holo'.

Error:(2) Error retrieving parent for item: No resource found that matches the given name '@android:style/Theme.Material.Light'.

1 Answer

Gian Lazzarini
Gian Lazzarini
3,263 Points

Wow...

After hours of searching for a solution, I just found the answer right after asking this.

http://dominoc925.blogspot.com/2014/11/fixing-android-studio-cannot-resolve.html

  1. In the Android Studio IDE, select File | Project Structure.

  2. If not selected, choose the Project app module.

  3. Under the Properties tab, in the Compile Sdk Version field, choose the latest SDK .e.g API 21: Android 5.0 (Lollipop).

  4. In the Build Tools Version field, choose the latest version, e.g. 21.1.1.

  5. Click OK.