Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App crashes on android L (API v21) #9

Open
lovesh opened this issue Nov 26, 2014 · 9 comments
Open

App crashes on android L (API v21) #9

lovesh opened this issue Nov 26, 2014 · 9 comments

Comments

@lovesh
Copy link

lovesh commented Nov 26, 2014

I cloned your github repo and tried to run MaterialWeather app in android studio and the app crashes on API 21(Android L) with a runtime exception java.lang.RuntimeException: Unable to start activity ComponentInfo{com.survivingwithandroid.materialweather/com.survivingwithandroid.materialweather.WeatherActivity}: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity. But it works on a lower API like Kitkat.

@GautamDMan
Copy link

I think if the application is running on API 21, u may have to update the app compat library.

I am also new to Android. So please correct my mistakes. I am also observing this repo.

--- Original Message ---

From: "Lovesh Harchandani" [email protected]
Sent: 26 November 2014 21:21
To: "survivingwithandroid/Surviving-with-android" [email protected]
Subject: [Surviving-with-android] App crashes on android L (API v21) (#9)

I cloned your github repo and tried to run MaterialWeather app in android studio and the app crashes on API 21(Android L) with a runtime exception java.lang.RuntimeException: Unable to start activity ComponentInfo{com.survivingwithandroid.materialweather/com.survivingwithandroid.materialweather.WeatherActivity}: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity. But it works on a lower API like Kitkat.


Reply to this email directly or view it on GitHub:
#9

@lovesh
Copy link
Author

lovesh commented Nov 26, 2014

How would i update the app compat library. You are already using appcompatv7-21 which is ok. I am new to android too. Still to build my first non Hello World app.

@GautamDMan
Copy link

Ok. In that case, understanding gradle and dependency resolution will be helpful for you. Google gradle for Android l.. That would be a good starting point. Make sure that the dependency is { compile 'com. Android. Support:appcompat-v7:21.0.0'}

--- Original Message ---

From: "Lovesh Harchandani" [email protected]
Sent: 26 November 2014 22:34
To: "survivingwithandroid/Surviving-with-android" [email protected]
Cc: "Gautam Divekar" [email protected]
Subject: Re: [Surviving-with-android] App crashes on android L (API v21) (#9)

How would i update the app compat library. You are already using appcompatv7-21 which is ok. I am new to android too. Still to build my first non Hello World app.


Reply to this email directly or view it on GitHub:
#9 (comment)

@lovesh
Copy link
Author

lovesh commented Nov 26, 2014

The dependency is 'com.android.support:appcompat-v7:21.0.0'. U dont need to change it. I think if you are using the action bar and app compat library 21 you dont have to use android:Theme.Material.Light in values-v21/styles.xml

@GautamDMan
Copy link

Yes. Make sure that compileSDKVersion is 21 and buildtoolversion is 21.0.*

Will that be helpful? If the project is recompiled for the correct version of SDK it should refer to the correct appcompat-v library as well.

--- Original Message ---

From: "Lovesh Harchandani" [email protected]
Sent: 26 November 2014 23:04
To: "survivingwithandroid/Surviving-with-android" [email protected]
Cc: "Gautam Divekar" [email protected]
Subject: Re: [Surviving-with-android] App crashes on android L (API v21) (#9)

The dependency is 'com.android.support:appcompat-v7:21.0.0'. U dont need to change it. I think if you are using the action bar and app compat library 21 you dont have to use 'MaterialTheme' in values-v21/styles.xml


Reply to this email directly or view it on GitHub:
#9 (comment)

@lovesh
Copy link
Author

lovesh commented Nov 26, 2014

I havent made any change to your app. Its as it is on github. I cloned it a few hours ago. So the buildtoolsversion and compileSDKVersion is same as in github

@GautamDMan
Copy link

Hi,

I will take a look into it and get back at you as soon as possible. Fyi, I am not the author of the surviving_with_android. I am a watcher for the repo. But I will check it out and reply.

--- Original Message ---

From: "Lovesh Harchandani" [email protected]
Sent: 27 November 2014 01:11
To: "survivingwithandroid/Surviving-with-android" [email protected]
Cc: "Gautam Divekar" [email protected]
Subject: Re: [Surviving-with-android] App crashes on android L (API v21) (#9)

@GautamDMan Have a look here http://stackoverflow.com/questions/27155867/using-theme-material-light-darkactionbar-with-theme-appcompat-light-darkactionba


Reply to this email directly or view it on GitHub:
#9 (comment)

@survivingwithandroid
Copy link
Owner

@lovesh I will check the App i will let u know if i find something wrong updating the repo. Thx for your support!

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

No branches or pull requests

3 participants