Skip to content
This repository has been archived by the owner on Dec 24, 2022. It is now read-only.

Which version of appcompat-v7 is used? #2

Closed
ghost opened this issue May 12, 2015 · 6 comments
Closed

Which version of appcompat-v7 is used? #2

ghost opened this issue May 12, 2015 · 6 comments
Assignees

Comments

@ghost
Copy link

ghost commented May 12, 2015

Could you provide actual version details of the used appcompat-v7 version? You currently use compile 'com.android.support:appcompat-v7:+' which should get the newest version available. This breaks reproducible builds (since building at different times will use different versions) as well as normal builds if you depend on a specific feature. E.g. if the build host does not server the latest appcompat version you require, it still builds without errors, but might fail on run. Also if Google yet again decides to push incompatible (beta) updates, which was done in the preface of android-L, this might be a problem as well.

The reason I am asking, because fdorid build crashes with

E/AndroidRuntime( 1249): java.lang.RuntimeException: Unable to start activity ComponentInfo{net.etuldan.sparss.floss/net.etuldan.sparss.activity.HomeActivity}: java.lang.IllegalArgumentException: AppCompat does not support the current theme features
E/AndroidRuntime( 1249):        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2325)
E/AndroidRuntime( 1249):        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2390)
E/AndroidRuntime( 1249):        at android.app.ActivityThread.access$800(ActivityThread.java:151)
E/AndroidRuntime( 1249):        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)
E/AndroidRuntime( 1249):        at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime( 1249):        at android.os.Looper.loop(Looper.java:135)
E/AndroidRuntime( 1249):        at android.app.ActivityThread.main(ActivityThread.java:5257)
E/AndroidRuntime( 1249):        at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime( 1249):        at java.lang.reflect.Method.invoke(Method.java:372)
E/AndroidRuntime( 1249):        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
E/AndroidRuntime( 1249):        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
E/AndroidRuntime( 1249): Caused by: java.lang.IllegalArgumentException: AppCompat does not support the current theme features
E/AndroidRuntime( 1249):        at android.support.v7.app.AppCompatDelegateImplV7.p(SourceFile:360)
E/AndroidRuntime( 1249):        at android.support.v7.app.AppCompatDelegateImplV7.a(SourceFile:246)
E/AndroidRuntime( 1249):        at android.support.v7.app.AppCompatActivity.setContentView(SourceFile:106)
E/AndroidRuntime( 1249):        at net.etuldan.sparss.activity.HomeActivity.onCreate(SourceFile:108)
E/AndroidRuntime( 1249):        at android.app.Activity.performCreate(Activity.java:5990)
E/AndroidRuntime( 1249):        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)
E/AndroidRuntime( 1249):        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2278)
E/AndroidRuntime( 1249):        ... 10 more
W/ActivityManager(  335):   Force finishing activity 1 net.etuldan.sparss.floss/net.etuldan.sparss.activity.HomeActivity

StackOverflow gives this solutions: https://stackoverflow.com/questions/29790070/upgraded-to-appcompat-v22-1-0-and-now-getting-illegalargumentexception-appcompa and https://stackoverflow.com/questions/29784124/java-lang-illegalargumentexception-appcompat-does-not-support-the-current-theme

@ghost
Copy link
Author

ghost commented May 12, 2015

I can confirm, forcing v7:21.0.0 produces a working build. I will disable the fdroid build, and re-enable it tomorrow with the fixes applied, but it should be fixed at your end for the next version.

@Etuldan
Copy link
Owner

Etuldan commented May 12, 2015

I was looking into the issue, and yes, my AndroidStudio+Gradle are using 21.0.3.
I'll do the necessary for the next version ;)

@Etuldan
Copy link
Owner

Etuldan commented May 13, 2015

If I set the "targetSdkVersion" to 21 (it was 22) and force the version of "com.android.support:appcompat-v7" to 21.+ , is it OK for you ?
(I think the targetSdkVersion = 22 was a mistake, I'll look further about it)

The current files (so the flym files) are using the appcompatv7 from the repository "jcenter/bintray" ( https://bintray.com/lukar1203/maven/appcompat-v7/view) which is in v21.0.3 .

@ghost
Copy link
Author

ghost commented May 13, 2015

The targetSdk shouldn't matter at all, but you can set it to 21 if you think that is more appropriated. Setting the appcompat-v7 to an actual version (or 21.+) will fix the issue.

The repo you mentioned is a personal repo at bintray, it's not jcenter. jcenter is hosted on bintray, but not every repo at bintray is part of jcenter :). However, we at fdroid strip such thirdparty repositories and build the libraries hosted there from source. Appcompat is comming from the android support-repo (a local maven repository installed and managed by the android sdk).

Etuldan pushed a commit that referenced this issue May 14, 2015
Force the appcompat-v7 library to version 21.*
@Etuldan
Copy link
Owner

Etuldan commented May 14, 2015

Should be fixed, as in the build.gradle , the appcompat-v7 version is set to 21.+

@Etuldan Etuldan closed this as completed May 14, 2015
@ghost
Copy link
Author

ghost commented May 14, 2015

Indeed, builds fine. Thanks for the quick response.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant