Why am I getting "Error getting parent of element: did not find a resource that matches the specified name" @android: style / Theme.Dialog.Alert "?

In my project properties, I have Android 2.2, and another guy in the team is able to build just fine. I get an error in the themes.xml file under res-> values

Error Retrieving parent for item: No resource found that matches the given name '@android:style/Theme.Dialog.Alert'. 

Therefore, I cannot create my project. This is the correct project that I get from the SVN repository and import into Eclipse.

 <!-- DA.Theme.Dialog.Alert.* defines custom theme for any alert dialogs --> <style name="DA.Dialog.Alert" parent="@android:style/Theme.Dialog.Alert"> <item name="android:textViewStyle">@style/DA.TextView</item> </style> 
+4
source share
2 answers

I had the same problem. Try increasing the min-sdk requirement in the manifest file. For me, this gave the same error in the res / values14 / styles.xml stylesheet in

 <style name="Widget.Sherlock.ActionBar" parent="android:Widget.Holo.ActionBar"> 

After likes of different trees, changing the min-sdk value from 8 to 13 in AndroidManifest.xml worked

 <uses-sdk android:minSdkVersion="13" android:targetSdkVersion="18"/> 

My advice starts with a value of 18 if it starts to decrease the value until it does.

0
source

I changed parent and it worked:

 <style name="DA.Dialog.Alert" parent="android:Theme.Dialog"> <item name="android:textViewStyle">@style/DA.TextView</item> </style> 
0
source

Source: https://habr.com/ru/post/1389534/


All Articles