Before the Theme theme in the inventory file is always changed to the theme @style/theme.appcompat.light defined in the library project, you can only use the default theme @style/apptheme
<ApplicationAndroid:name= "Com.example.googleplay.global.GooglePlayApplication"Android:allowbackup= "true"Android:icon= "@drawable/ic_launcher"Android:label= "@string/app_name"Android:theme= "@style/theme.appcompat.light" > <ActivityAndroid:name= "Com.example.googleplay.ui.activity.MainActivity"Android:label= "@string/app_name" > <Intent-filter> <ActionAndroid:name= "Android.intent.action.MAIN" /> <categoryAndroid:name= "Android.intent.category.LAUNCHER" /> </Intent-filter> </Activity> </Application>
Looking for a long while did not find any problem, the library project also imported Ah, why can not use the library project definition of Things
Originally I used the Java build Path method to import the library project, the error is as follows
The original Android import library project with the General Java Import Project method is different, the method of the introduction of Android (right-click on the project, select Properties, and then select Android, in the Library Add Libraries Project can be):
The way Android is imported is different because Android also needs to use the resources (layout,themes,strings,dimens,colors,styles, etc.) that are already in the library project in addition to the code references, and the Java Import Project is just for the purpose of using the methods in the Library project.
The right way to introduce a library project to Android