renaudcerrato / static-maps-api

Fluent and clean Google Static Maps API Java interface.
Apache License 2.0
165 stars 21 forks source link

Run app error with Java 8 #1

Closed hasanmumin closed 8 years ago

hasanmumin commented 8 years ago

Information:Gradle tasks [:app:assembleDebug] :app:preBuild UP-TO-DATE :library:compileJava :app:preDebugBuild UP-TO-DATE :app:checkDebugManifest :app:preReleaseBuild UP-TO-DATE :app:preDebugAndroidTestBuild UP-TO-DATE :app:generateDebugBuildConfig UP-TO-DATE :app:generateDebugAssets UP-TO-DATE :app:generateDebugResValues UP-TO-DATE :library:compileJava UP-TO-DATE :app:compileDebugNdk UP-TO-DATE :app:processDebugJavaRes UP-TO-DATE :app:validateDebugSigning :library:processResources UP-TO-DATE :library:classes UP-TO-DATE :library:jar UP-TO-DATE :app:prepareComAndroidSupportAppcompatV72311Library UP-TO-DATE :app:prepareComAndroidSupportCardviewV72311Library UP-TO-DATE :app:prepareComAndroidSupportDesign2311Library UP-TO-DATE :app:prepareComAndroidSupportMultidex101Library UP-TO-DATE :app:prepareComAndroidSupportRecyclerviewV72311Library UP-TO-DATE :app:prepareComAndroidSupportSupportV42311Library UP-TO-DATE :app:prepareDebugDependencies :app:compileDebugAidl UP-TO-DATE :app:compileDebugRenderscript UP-TO-DATE :app:mergeDebugAssets UP-TO-DATE :app:generateDebugResources UP-TO-DATE :app:mergeDebugResources UP-TO-DATE :app:processDebugManifest UP-TO-DATE :app:processDebugResources UP-TO-DATE :app:generateDebugSources UP-TO-DATE :app:compileDebugJavaWithJavac Note: /Users/xxx/AndroidStudioProjects/static-maps-api/app/src/main/java/com/mypopsy/staticmaps/demo/ui/DemoFragment.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. :app:compileDebugSources :app:transformClassesWithJarMergingForDebug :app:collectDebugMultiDexComponents :app:transformClassesWithMultidexlistForDebug ProGuard, version 5.2.1 Reading program jar [/Users/xxx/AndroidStudioProjects/static-maps-api/app/build/intermediates/transforms/jarMerging/debug/jars/1/1f/combined.jar] Reading library jar [/Users/xxx/Library/Android/sdk/build-tools/23.0.2/lib/shrinkedAndroid.jar] Note: android.support.design.widget.CoordinatorLayout calls 'Class.getAnnotation' Note: butterknife.internal.BindingClass calls 'Field.getAnnotation' Note: butterknife.internal.ButterKnifeProcessor calls 'Class.getAnnotation' Note: butterknife.internal.ButterKnifeProcessor calls 'Field.getAnnotation' Note: android.support.v4.app.NotificationCompatJellybean calls 'Field.getType' Note: butterknife.internal.BindingClass calls 'Class.getEnclosingClass' Note: android.support.v4.app.NotificationCompatJellybean: can't find dynamically referenced class android.app.Notification$Action Note: android.support.v4.text.ICUCompatApi23: can't find dynamically referenced class libcore.icu.ICU Note: android.support.v4.text.ICUCompatIcs: can't find dynamically referenced class libcore.icu.ICU Note: android.support.v7.widget.DrawableUtils: can't find dynamically referenced class android.graphics.Insets Note: android.support.multidex.MultiDexExtractor accesses a method 'apply()' dynamically Note: android.support.v4.app.NotificationCompatJellybean accesses a declared field 'icon' dynamically Maybe this is program field 'android.support.design.R$attr { int icon; }' Maybe this is program field 'android.support.design.R$id { int icon; }' Maybe this is program field 'android.support.v4.app.NotificationCompat$Action { int icon; }' Maybe this is program field 'android.support.v7.appcompat.R$attr { int icon; }' Maybe this is program field 'android.support.v7.appcompat.R$id { int icon; }' Maybe this is program field 'com.mypopsy.maps.StaticMap$Marker$Style { java.lang.String icon; }' Maybe this is program field 'com.mypopsy.maps.StaticMap$Marker$Style$Builder { java.lang.String icon; }' Maybe this is program field 'com.mypopsy.staticmaps.demo.R$attr { int icon; }' Maybe this is program field 'com.mypopsy.staticmaps.demo.R$id { int icon; }' Maybe this is program field 'com.mypopsy.staticmaps.demo.ui.DemoFragment$Model { com.mypopsy.maps.StaticMap$GeoPoint icon; }' Note: android.support.v4.app.NotificationCompatJellybean accesses a declared field 'title' dynamically Maybe this is program field 'android.support.design.R$attr { int title; }' Maybe this is program field 'android.support.design.R$id { int title; }' Maybe this is program field 'android.support.v4.app.NotificationCompat$Action { java.lang.CharSequence title; }' Maybe this is program field 'android.support.v7.appcompat.R$attr { int title; }' Maybe this is program field 'android.support.v7.appcompat.R$id { int title; }' Maybe this is program field 'com.mypopsy.staticmaps.demo.R$attr { int title; }' Maybe this is program field 'com.mypopsy.staticmaps.demo.R$id { int title; }' Maybe this is program field 'com.mypopsy.staticmaps.demo.ui.DemoFragment$Model { java.lang.CharSequence title; }' Note: android.support.v4.app.NotificationCompatJellybean accesses a declared field 'actionIntent' dynamically Maybe this is program field 'android.support.v4.app.NotificationCompat$Action { android.app.PendingIntent actionIntent; }' Note: android.support.v4.text.ICUCompatApi23 accesses a method 'addLikelySubtags(java.util.Locale)' dynamically Maybe this is program method 'android.support.v4.text.ICUCompatIcs { java.lang.String addLikelySubtags(java.util.Locale); }' Note: android.support.v4.text.ICUCompatIcs accesses a method 'getScript(java.lang.String)' dynamically Maybe this is program method 'android.support.v4.text.ICUCompatIcs { java.lang.String getScript(java.lang.String); }' Note: android.support.v4.text.ICUCompatIcs accesses a method 'addLikelySubtags(java.lang.String)' dynamically Note: android.support.v7.widget.DrawableUtils accesses a method 'getOpticalInsets()' dynamically Note: android.support.v7.widget.ViewUtils accesses a method 'makeOptionalFitsSystemWindows()' dynamically Note: butterknife.internal.ButterKnifeProcessor accesses a declared method 'value()' dynamically Maybe this is program method 'android.support.annotation.IntDef { long[] value(); }' Maybe this is program method 'android.support.annotation.RequiresPermission { java.lang.String value(); }' Maybe this is program method 'android.support.annotation.RequiresPermission$Read { android.support.annotation.RequiresPermission value(); }' Maybe this is program method 'android.support.annotation.RequiresPermission$Write { android.support.annotation.RequiresPermission value(); }' Maybe this is program method 'android.support.annotation.Size { long value(); }' Maybe this is program method 'android.support.annotation.StringDef { java.lang.String[] value(); }' Maybe this is program method 'android.support.design.widget.CoordinatorLayout$DefaultBehavior { java.lang.Class value(); }' Maybe this is program method 'butterknife.Bind { int[] value(); }' Maybe this is program method 'butterknife.BindBool { int value(); }' Maybe this is program method 'butterknife.BindColor { int value(); }' Maybe this is program method 'butterknife.BindDimen { int value(); }' Maybe this is program method 'butterknife.BindDrawable { int value(); }' Maybe this is program method 'butterknife.BindInt { int value(); }' Maybe this is program method 'butterknife.BindString { int value(); }' Maybe this is program method 'butterknife.OnCheckedChanged { int[] value(); }' Maybe this is program method 'butterknife.OnClick { int[] value(); }' Maybe this is program method 'butterknife.OnEditorAction { int[] value(); }' Maybe this is program method 'butterknife.OnFocusChange { int[] value(); }' Maybe this is program method 'butterknife.OnItemClick { int[] value(); }' Maybe this is program method 'butterknife.OnItemLongClick { int[] value(); }' Maybe this is program method 'butterknife.OnItemSelected { int[] value(); }' Maybe this is program method 'butterknife.OnLongClick { int[] value(); }' Maybe this is program method 'butterknife.OnPageChange { int[] value(); }' Maybe this is program method 'butterknife.OnTextChanged { int[] value(); }' Maybe this is program method 'butterknife.OnTouch { int[] value(); }' Maybe this is program method 'javax.annotation.MatchesPattern { java.lang.String value(); }' Maybe this is program method 'javax.annotation.Syntax { java.lang.String value(); }' Maybe this is program method 'javax.annotation.concurrent.GuardedBy { java.lang.String value(); }' Maybe this is program method 'javax.annotation.meta.TypeQualifierDefault { java.lang.annotation.ElementType[] value(); }' Note: butterknife.internal.ButterKnifeProcessor accesses a declared method 'callback()' dynamically Maybe this is program method 'butterknife.OnItemSelected { butterknife.OnItemSelected$Callback callback(); }' Maybe this is program method 'butterknife.OnPageChange { butterknife.OnPageChange$Callback callback(); }' Maybe this is program method 'butterknife.OnTextChanged { butterknife.OnTextChanged$Callback callback(); }' Note: there were 4 classes trying to access annotations using reflection. You should consider keeping the annotation attributes (using '-keepattributes Annotation'). (http://proguard.sourceforge.net/manual/troubleshooting.html#attributes) Note: there were 1 classes trying to access generic signatures using reflection. You should consider keeping the signature attributes (using '-keepattributes Signature'). (http://proguard.sourceforge.net/manual/troubleshooting.html#attributes) Note: there were 1 classes trying to access enclosing classes using reflection. You should consider keeping the inner classes attributes (using '-keepattributes InnerClasses'). (http://proguard.sourceforge.net/manual/troubleshooting.html#attributes) Note: there were 4 unresolved dynamic references to classes or interfaces. You should check if you need to specify additional program jars. (http://proguard.sourceforge.net/manual/troubleshooting.html#dynamicalclass) Note: there were 11 accesses to class members by means of introspection. You should consider explicitly keeping the mentioned class members (using '-keep' or '-keepclassmembers'). (http://proguard.sourceforge.net/manual/troubleshooting.html#dynamicalclassmember) Note: you're ignoring all warnings! Preparing output jar [/Users/xxx/AndroidStudioProjects/static-maps-api/app/build/intermediates/multi-dex/debug/componentClasses.jar] Copying resources from program jar [/Users/xxx/AndroidStudioProjects/static-maps-api/app/build/intermediates/transforms/jarMerging/debug/jars/1/1f/combined.jar] :app:transformClassesWithDexForDebug UNEXPECTED TOP-LEVEL EXCEPTION: Error:com.android.dx.cf.iface.ParseException: bad class file magic (cafebabe) or version (0034.0000) at com.android.dx.cf.direct.DirectClassFile.parse0(DirectClassFile.java:472) at com.android.dx.cf.direct.DirectClassFile.parse(DirectClassFile.java:406) at com.android.dx.cf.direct.DirectClassFile.parseToInterfacesIfNecessary(DirectClassFile.java:388) at com.android.dx.cf.direct.DirectClassFile.getMagic(DirectClassFile.java:251) at com.android.dx.command.dexer.Main.parseClass(Main.java:764) at com.android.dx.command.dexer.Main.access$1500(Main.java:85) at com.android.dx.command.dexer.Main$ClassParserTask.call(Main.java:1684) at com.android.dx.command.dexer.Main.processClass(Main.java:749) ... 12 more UNEXPECTED TOP-LEVEL EXCEPTION: Error:com.android.dx.cf.iface.ParseException: bad class file magic (cafebabe) or version (0034.0000) at com.android.dx.cf.direct.DirectClassFile.parse0(DirectClassFile.java:472) at com.android.dx.cf.direct.DirectClassFile.parse(DirectClassFile.java:406) at com.android.dx.cf.direct.DirectClassFile.parseToInterfacesIfNecessary(DirectClassFile.java:388) at com.android.dx.cf.direct.DirectClassFile.getMagic(DirectClassFile.java:251) at com.android.dx.command.dexer.Main.parseClass(Main.java:764) at com.android.dx.command.dexer.Main.access$1500(Main.java:85) at com.android.dx.command.dexer.Main$ClassParserTask.call(Main.java:1684) at com.android.dx.command.dexer.Main.processClass(Main.java:749) ... 12 more 2 errors; aborting Error:Execution failed for task ':app:transformClassesWithDexForDebug'.

com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_40.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1 Information:BUILD FAILED Information:Total time: 12.97 secs Information:3 errors Information:0 warnings Information:See complete output in console

using java 1.8 Can you help me ?

renaudcerrato commented 8 years ago

The error is almost self-explanatory : don't use Java 8 to compile Android sources (bad class file magic (cafebabe) or version). Be sure your path and/or Android Studio is pointing to your Java 7.