Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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.