NightWhistler / PageTurner

Android e-book reader with cloud synchronization
pageturner-reader.org
GNU General Public License v3.0
466 stars 222 forks source link

Error compiling AppCompat-v7 branch in Android Studio #589

Open mmrasheed opened 8 years ago

mmrasheed commented 8 years ago

Hi, The appcompat version of PageTurner compiles fine in terminal with "gradle assembleDebug" command. However, I get the following errors while compiling in Android Studio (v1.5 RC1) -

/Volumes/Projects/PageTurner/res/values/styles.xml
Error:(2) Error retrieving parent for item: No resource found that matches the given name '@style/Theme.AppCompat.Light.DarkActionBar'.
Error:(2) Error retrieving parent for item: No resource found that matches the given name '@style/Theme.AppCompat'.
Error:(2) Error retrieving parent for item: No resource found that matches the given name '@style/Theme.AppCompat.Light.DarkActionBar'.
Error:(2) Error retrieving parent for item: No resource found that matches the given name 'Widget.AppCompat.ActionBar'.

How can I solve this issue?

NightWhistler commented 8 years ago

Sounds like the import didn't correctly pick up the app-compat library dependency?

mmrasheed commented 8 years ago

Hi Alex, I tried several possible ways importing and/or opening project, but without luck. The master brunch works fine, but not appcompat brunch. Any suggestion on how to solve this issue?

Thanks.

AnaMariaB92 commented 8 years ago

Hello,

I have the same errors.Please tell us how to solve this issues,because i've made a lot of changes with no luck. I don't understand why this happens.

AnaMariaB92 commented 8 years ago

I've tried to do something like this:

dependencies {

compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support.appcompat-v7:19.+'

compile(

        [group: 'com.android.support', name: 'support-v4', version: '19.0+'],
     /*   [group: 'com.android.support', name: 'appcompat-v7', version: '19.+'],*/
        [group: 'com.google.code.findbugs', name: 'jsr305', version: '1.3.9'],
        [group: 'ch.acra', name: 'acra', version: '4.4.0'],
        [group: 'org.slf4j', name: 'slf4j-android', version: '1.6.1-RC1'],
        [group: 'org.codehaus.jedi', name: 'jedi-core', version: '3.0.5']
)

But also with no luck,i get the error : Failed to resolve: com.android.support.appcompat-v7:19.+

But my skd manager is up to date.I think it's something wrong with your grandle,because i've imported this lib in my projects many times and never got this problem.

NightWhistler commented 8 years ago

What I meant was that you may do some manual fixes on your project in Android Studio after importing it. Most likely the app-compat dependency isn't being picked up correctly.

AnaMariaB92 commented 8 years ago

I've done manual fixes. The app-compat it's imported from the android sdk,the path is correct,and the compile 'com.android.support.appcompat-v7:19.+' is correct also.

I've figured that the app-compat dependency isn't being picked up correctly...but why and where do i make the changes?

AnaMariaB92 commented 8 years ago

And how it's possible that i'm not the only one having this problem?

imnet4all commented 7 years ago

Anyone who found a working solution for this issue? None of the fixes mentioned above work and the AppCompat library is properly included in. Much appreciated in advance....