liuzheng9110 / android-lockpattern

clone form googlecode android-lockpattern
https://code.google.com/p/android-lockpattern/
Apache License 2.0
0 stars 0 forks source link

Including it in target = 8 app #8

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. I've included lockpattern into my app that has minSDK 8 and target SDK 8 
(cannot change that)

What is the expected output? What do you see instead?

I get such console output and the app won't run. 
[2013-08-12 11:53:28 - PP MyApp] /Users/user/Documents/MyApp/nPP 
Android/android-lockpattern/res/values-v11/styles.xml:20: error: Error 
retrieving parent for item: No resource found that matches the given name 
'@android:style/Theme.Holo'.
[2013-08-12 11:53:28 - PP MyApp] /Users/user/Documents/MyApp/nPP 
Android/android-lockpattern/res/values-v14/styles.xml:20: error: Error 
retrieving parent for item: No resource found that matches the given name 
'@android:style/Theme.DeviceDefault'.
[2013-08-12 11:53:28 - PP MyApp] /Users/user/Documents/MyApp/nPP 
Android/android-lockpattern/res/values-v11/styles.xml:27: error: Error 
retrieving parent for item: No resource found that matches the given name 
'@android:style/Theme.Holo.Light'.
[2013-08-12 11:53:28 - PP MyApp] /Users/user/Documents/MyApp/nPP 
Android/android-lockpattern/res/values-v14/styles.xml:24: error: Error 
retrieving parent for item: No resource found that matches the given name 
'@android:style/Theme.DeviceDefault.Light'.
[2013-08-12 11:53:28 - PP MyApp] /Users/user/Documents/MyApp/nPP 
Android/android-lockpattern/res/values-v11/styles.xml:34: error: Error 
retrieving parent for item: No resource found that matches the given name 
'@android:style/Theme.Holo.Dialog'.
[2013-08-12 11:53:28 - PP MyApp] /Users/user/Documents/MyApp/nPP 
Android/android-lockpattern/res/values-v14/styles.xml:22: error: Error 
retrieving parent for item: No resource found that matches the given name 
'@android:style/Theme.DeviceDefault.Dialog'.
[2013-08-12 11:53:28 - PP MyApp] /Users/user/Documents/MyApp/nPP 
Android/android-lockpattern/res/values/styles.xml:92: error: Error: No resource 
found that matches the given name: attr 'android:windowActionBar'.
[2013-08-12 11:53:28 - PP MyApp] /Users/user/Documents/MyApp/nPP 
Android/android-lockpattern/res/values/styles.xml:93: error: Error: No resource 
found that matches the given name: attr 'android:windowActionModeOverlay'.
[2013-08-12 11:53:28 - PP MyApp] /Users/user/Documents/MyApp/nPP 
Android/android-lockpattern/res/values/styles.xml:94: error: Error: No resource 
found that matches the given name: attr 'android:windowCloseOnTouchOutside'.
[2013-08-12 11:53:28 - PP MyApp] /Users/user/Documents/MyApp/nPP 
Android/android-lockpattern/res/values-v11/styles.xml:41: error: Error 
retrieving parent for item: No resource found that matches the given name 
'@android:style/Theme.Holo.Light.Dialog'.
[2013-08-12 11:53:28 - PP MyApp] /Users/user/Documents/MyApp/nPP 
Android/android-lockpattern/res/values-v14/styles.xml:26: error: Error 
retrieving parent for item: No resource found that matches the given name 
'@android:style/Theme.DeviceDefault.Light.Dialog'.

Original issue reported on code.google.com by jacek.kw...@gmail.com on 12 Aug 2013 at 9:56

GoogleCodeExporter commented 9 years ago
Hi Jacek,

You can keep your project's target SDK as 8. But in order to compile the 
library, please use latest SDK for project build target. You can change it by 
right clicking on your project, select Properties, select tab Android and check 
Android 4.3 (API 18). Or you can change it by opening your `project.properties` 
file and make this change:

    ...
    target=android-18

If you're using Google APIs SDK then change it respectively.

I hope this helps  :-)

Hai,

Original comment by haibison...@gmail.com on 12 Aug 2013 at 10:07

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Do you use the tag `<uses-sdk>` in AndroidManifest.xml? For example it could be:

    <uses-sdk
        android:minSdkVersion="7"
        android:targetSdkVersion="8" />

I meant your project's build target -- it should be latest SDK. The 
`targetSdkVersion` in manifest *can* be different to the project build target. 
Could you check it again? Note that the library just needs normal Android SDK 
(API 18), it doesn't need Google APIs...

Original comment by haibison...@gmail.com on 12 Aug 2013 at 10:18

GoogleCodeExporter commented 9 years ago
I've set android-lockpattern target to Google APIs 18
and my project target is Google APIs 8

With this configuration I still getting those errors in the console.

If I set my project to Android 2.2 API Level 8 I don't get those erors in 
console, but it messes up with my google maps sdk. So I have to set it to 
Google APIs API level 8.

Original comment by jacek.kw...@gmail.com on 12 Aug 2013 at 10:18

GoogleCodeExporter commented 9 years ago
My project Manifest.xml 

    <uses-sdk
        android:minSdkVersion="8"
        android:targetSdkVersion="10" />

I have to use Google APIs as a buil target, does that mean I can't use this 
library?

Original comment by jacek.kw...@gmail.com on 12 Aug 2013 at 10:21

GoogleCodeExporter commented 9 years ago
Ok then, here is what I did:

I have left this part of my manifest untouched:
    <uses-sdk
        android:minSdkVersion="8"
        android:targetSdkVersion="10" />

And set lockpattern and my project buuild target to Google APIs level 18. Seems 
to be working now

Original comment by jacek.kw...@gmail.com on 12 Aug 2013 at 10:30

GoogleCodeExporter commented 9 years ago
Your manifest is fine.

I've never used Google Maps SDK before. But I think you can use latest SDK for 
your project build target. You just need to be careful with using methods, make 
sure those are supported in APIs 8-10. You can check it by their Javadocs (with 
tag `@since`).

Either Android SDK or Google APIs SDK are fine for the library.

I'm glad it works  :-)

Have a nice day.

Original comment by haibison...@gmail.com on 12 Aug 2013 at 10:39