Skip to content
This repository was archived by the owner on Mar 18, 2018. It is now read-only.

Sample project doesn't work once OsmDroid project is added #7

Open
kjeremy opened this issue Oct 29, 2014 · 6 comments
Open

Sample project doesn't work once OsmDroid project is added #7

kjeremy opened this issue Oct 29, 2014 · 6 comments

Comments

@kjeremy
Copy link
Contributor

kjeremy commented Oct 29, 2014

I have a sample project that pulls in a bindings project called ColorPicker (from https://code.google.com/p/color-picker-view/) this works great with Xamguard. Once I add OsmDroid bindings as a reference Proguard fails to work.

Sample project is at: https://www.dropbox.com/s/bo3zh8662gv1t6q/ColorPickerDemo.zip?dl=0

To trigger the bug you can build in release and notice that everything works. If you then add a reference to OsmDroid for the ColorPickerDemo project ProGuard will give you errors about not being able to find the color picker.

@Cheesebaron
Copy link

If you need a C# color picker look here: https://github.com/Cheesebaron/MonoDroid.ColorPickers :) Might need a bit of time to get to work in Xamarin.Android as it has been left untouched for quite a while.

@kjeremy
Copy link
Contributor Author

kjeremy commented Oct 30, 2014

That's fine but it isn't the issue I'm having. Once you add the reference
you can't build the project.

On Thu, Oct 30, 2014 at 7:57 AM, Tomasz Cielecki [email protected]
wrote:

If you need a C# color picker look here:
https://github.com/Cheesebaron/MonoDroid.ColorPickers :) Might need a bit
of time to get to work in Xamarin.Android as it has been left untouched for
quite a while.


Reply to this email directly or view it on GitHub
#7 (comment).

@Cheesebaron
Copy link

So it is a problem with multiple binding project references? Or is it directly related to OSM? Would be awesome if you narrowed it down a bit more :)

@kjeremy
Copy link
Contributor Author

kjeremy commented Oct 30, 2014

I THINK It's multiple binding project references but I'm not sure.
There's a link to the sample project in the issue.

On Thu, Oct 30, 2014 at 9:37 AM, Tomasz Cielecki [email protected]
wrote:

So it is a problem with multiple binding project references? Or is it
directly related to OSM? Would be awesome if you narrowed it down a bit
more :)


Reply to this email directly or view it on GitHub
#7 (comment).

@roosmaa
Copy link
Owner

roosmaa commented Oct 31, 2014

For me Proguard is failing with the following error message:

    Target _RunProguard:
        Moving library project jar ColorPicker/library_project_imports/bin/classes.jar to obj/Release/android/proguard/tmp/library_projects/ColorPicker/library_project_imports/bin
        Tool /Users/mart/Android/SDK/tools/proguard/bin/proguard.sh execution started with arguments: -injars obj/Release/android/bin/classes -outjar obj/Release/android/proguard/java -injars obj/Release/android/proguard/tmp/library_projects -outjar obj/Release/android/proguard/library_projects -libraryjars /Users/mart/Android/SDK/platforms/android-15/android.jar -libraryjars /Library/Frameworks/Mono.framework/External/xbuild-frameworks/MonoAndroid/v4.0.3/mono.android.jar -include obj/Release/proguard-generated.cfg -include Proguard.cfg 
        ProGuard, version 4.7
        Reading program directory [/tmp/ColorPickerDemo/ColorPickerDemo/obj/Release/android/bin/classes]
        Error: Can't read [/tmp/ColorPickerDemo/ColorPickerDemo/obj/Release/android/bin/classes] (Can't process class [afzkl/development/colorpickerview/R$attr.class] (Unsupported class version number [52.0] (maximum 51.0, Java 1.7)))
/tmp/ColorPickerDemo/packages/XamGuard.1.0.2/Proguard.targets: error : Tool exited with code: 1. Output: ProGuard, version 4.7
Reading program directory [/tmp/ColorPickerDemo/ColorPickerDemo/obj/Release/android/bin/classes]
Error: Can't read [/tmp/ColorPickerDemo/ColorPickerDemo/obj/Release/android/bin/classes] (Can't process class [afzkl/development/colorpickerview/R$attr.class] (Unsupported class version number [52.0] (maximum 51.0, Java 1.7)))

    Task "Proguard" execution -- FAILED

This seems to be related to the Java SDK version. I'm guessing the ColorPicker binding project uses Java code compiled with Java 8, whereas Proguard (and most of Android?) expects Java 7 (or was it 6 even?).

Anyway, as the OsmDroid project wasn't referenced by the ColorPickerDemo, I'm guessing this is not what is happening at your end.

Can you post the Proguard output you're getting [from the Build Output tab/window]? (Like the one I posted above)

@kjeremy
Copy link
Contributor Author

kjeremy commented Oct 31, 2014

Odd. I only have Java 7 installed.

On Thu, Oct 30, 2014 at 8:59 PM, Mart Roosmaa [email protected]
wrote:

For me Proguard is failing with the following error message:

Target _RunProguard:
    Moving library project jar ColorPicker/library_project_imports/bin/classes.jar to obj/Release/android/proguard/tmp/library_projects/ColorPicker/library_project_imports/bin
    Tool /Users/mart/Android/SDK/tools/proguard/bin/proguard.sh execution started with arguments: -injars obj/Release/android/bin/classes -outjar obj/Release/android/proguard/java -injars obj/Release/android/proguard/tmp/library_projects -outjar obj/Release/android/proguard/library_projects -libraryjars /Users/mart/Android/SDK/platforms/android-15/android.jar -libraryjars /Library/Frameworks/Mono.framework/External/xbuild-frameworks/MonoAndroid/v4.0.3/mono.android.jar -include obj/Release/proguard-generated.cfg -include Proguard.cfg
    ProGuard, version 4.7
    Reading program directory [/tmp/ColorPickerDemo/ColorPickerDemo/obj/Release/android/bin/classes]
    Error: Can't read [/tmp/ColorPickerDemo/ColorPickerDemo/obj/Release/android/bin/classes] (Can't process class [afzkl/development/colorpickerview/R$attr.class] (Unsupported class version number [52.0] (maximum 51.0, Java 1.7)))

/tmp/ColorPickerDemo/packages/XamGuard.1.0.2/Proguard.targets: error : Tool exited with code: 1. Output: ProGuard, version 4.7
Reading program directory [/tmp/ColorPickerDemo/ColorPickerDemo/obj/Release/android/bin/classes]
Error: Can't read [/tmp/ColorPickerDemo/ColorPickerDemo/obj/Release/android/bin/classes](Can't process class [afzkl/development/colorpickerview/R$attr.class] %28Unsupported class version number [52.0] %28maximum 51.0, Java 1.7%29%29)

Task "Proguard" execution -- FAILED

This seems to be related to the Java SDK version. I'm guessing the
ColorPicker binding project uses Java code compiled with Java 8, whereas
Proguard (and most of Android?) expects Java 7 (or was it 6 even?).

Anyway, as the OsmDroid project wasn't referenced by the ColorPickerDemo,
I'm guessing this is not what is happening at your end.

Can you post the Proguard output you're getting [from the Build Output
tab/window]? (Like the one I posted above)


Reply to this email directly or view it on GitHub
#7 (comment).

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

No branches or pull requests

3 participants