Scalified / fab

Floating Action Button Library for Android
Apache License 2.0
849 stars 164 forks source link

Render issue #35

Closed mzdevmarco closed 9 years ago

mzdevmarco commented 9 years ago

HI, currently i am working with android studio and i update the FAB version from 1.1.0 to 1.1.2 and i get a render issue i dont know if it is an Android Studio issue or maybe an incompatibility but if i downgrade to 1.1.0 the render works and display the button on preview.

Btw on 1.1.1 version still the issue.

regards

java.lang.VerifyError: Expecting a stackmap frame at branch target 12 Exception Details: Location: com/software/shell/fab/ActionButton.isHidden()Z @5: if_icmpne Reason: Expected stackmap frame at this location. Bytecode: 0000000: 2ab6 0241 07a0 0007 04a7 0004 03ac

at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2585)
at java.lang.Class.getConstructor0(Class.java:2885)
at java.lang.Class.getConstructor(Class.java:1723)
at org.jetbrains.android.uipreview.ViewLoader.createNewInstance(ViewLoader.java:368)
at org.jetbrains.android.uipreview.ViewLoader.loadClass(ViewLoader.java:154)
at org.jetbrains.android.uipreview.ViewLoader.loadView(ViewLoader.java:93)
at com.android.tools.idea.rendering.LayoutlibCallbackImpl.loadView(LayoutlibCallbackImpl.java:190)
at android.view.BridgeInflater.loadCustomView(BridgeInflater.java:216)
at android.view.BridgeInflater.createViewFromTag(BridgeInflater.java:143)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)
at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:835)
at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:70)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:811)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798)
at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:838)
at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:70)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:811)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798)
at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:838)
at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:70)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:811)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798)
at android.view.LayoutInflater.inflate(LayoutInflater.java:515)
at android.view.LayoutInflater.inflate(LayoutInflater.java:394)
at com.android.layoutlib.bridge.impl.RenderSessionImpl.inflate(RenderSessionImpl.java:413)
at com.android.layoutlib.bridge.Bridge.createSession(Bridge.java:322)
at com.android.ide.common.rendering.LayoutLibrary.createSession(LayoutLibrary.java:350)
at com.android.tools.idea.rendering.RenderTask$2.compute(RenderTask.java:511)
at com.android.tools.idea.rendering.RenderTask$2.compute(RenderTask.java:499)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:888)
at com.android.tools.idea.rendering.RenderTask.createRenderSession(RenderTask.java:499)
at com.android.tools.idea.rendering.RenderTask.access$600(RenderTask.java:72)
at com.android.tools.idea.rendering.RenderTask$3.call(RenderTask.java:611)
at com.android.tools.idea.rendering.RenderTask$3.call(RenderTask.java:608)
at com.android.tools.idea.rendering.RenderService.runRenderAction(RenderService.java:363)
at com.android.tools.idea.rendering.RenderTask.render(RenderTask.java:608)
at com.android.tools.idea.rendering.RenderTask.render(RenderTask.java:630)
at com.intellij.android.designer.designSurface.AndroidDesignerEditorPanel$6.run(AndroidDesignerEditorPanel.java:480)
at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:320)
at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:310)
at com.intellij.util.ui.update.MergingUpdateQueue$2.run(MergingUpdateQueue.java:254)
at com.intellij.util.ui.update.MergingUpdateQueue.flush(MergingUpdateQueue.java:269)
at com.intellij.util.ui.update.MergingUpdateQueue.flush(MergingUpdateQueue.java:227)
at com.intellij.util.ui.update.MergingUpdateQueue.run(MergingUpdateQueue.java:217)
at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:238)
at com.intellij.util.Alarm$Request$1.run(Alarm.java:351)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
vbaidak commented 9 years ago

Hi mzdevmarco,

This is definitely not the application issue It says that one of the compiler verification was not passed

Firstly, please check the JDK version, that you are using in your IDE. I may assume, that you are using version 1.6. ActionButton uses Oracle JDK version 1.7, so you need to update it

If this didn't help, try to check your system environment variables to be sure that Oracle JDK version 1.7 is used by default. Additionally you can try to disable the check by adding JVM parameters specified here

Please check and let me know if that helps

vbaidak commented 9 years ago

any updates upon this?

mzdevmarco commented 9 years ago

HI I have verified the hint that you mentioned and currently i am using jdk1.7.0_79 and my environment too even i have tried to add the solucion mentioned on the forum but still the issue, i guess it is an issue related with android studio or maybe i need to downgrade the jdk.

regards

vbaidak commented 9 years ago

Hi, I don't think you have to downgrade your JDK. Also, I don't think the problem is in the IDE.

Check also the Android configuration within your build.gradle script:


android {

    compileSdkVersion 22
    buildToolsVersion '22.0.1'

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_7
        targetCompatibility JavaVersion.VERSION_1_7
    }

}

buildscript {

    repositories {
        jcenter()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:1.1.1'
    }

}
mzdevmarco commented 9 years ago

Hi

i just find how to solve the render issue , I was adding this property "org.gradle.jvmargs= -XX:-UseSplitVerifier " on gradle.properies to override the IDE Config but it not works so i had to modify the studio.exe.vmoptions and studio64.exe.vmoptions files located in C:\Program Files\Android\Android Studio\bin, then restart the IDE and sync gradle.

Regards and thanks

Fivehundredth commented 7 years ago

I'm having same issue, I'm using JDK 1.8 on Windows x64 System. I've tried to use embedded JDK or external in Android Studio (version of external JDK 1.8) but same exception is trown

java.lang.VerifyError: Expecting a stackmap frame at branch target 12 Exception Details: Location: com/scalified/fab/ActionButton.isHidden()Z @5: if_icmpne Reason: Expected stackmap frame at this location. Bytecode: 0x0000000: 2ab6 022b 07a0 0007 04a7 0004 03ac

I would appreciate if you will give me some advice what I should do since I've tried everything I'v found on web already.

1mohammad7 commented 4 years ago

Im having the same issue. I cant render the view but it wroks on app. here si the log: java.lang.VerifyError: Expecting a stackmap frame at branch target 12 Exception Details: Location: com/scalified/fab/ActionButton.isHidden()Z @5: if_icmpne Reason: Expected stackmap frame at this location. Bytecode: 0x0000000: 2ab6 022b 07a0 0007 04a7 0004 03ac   at java.lang.Class.getDeclaredConstructors0(Class.java:-2)   at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)   at java.lang.Class.getConstructor0(Class.java:3075)   at java.lang.Class.getConstructor(Class.java:1825)   at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:730)   at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:863)   at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:72)   at android.view.LayoutInflater.rInflate(LayoutInflater.java:837)   at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:824)   at android.view.LayoutInflater.inflate(LayoutInflater.java:515)   at android.view.LayoutInflater.inflate(LayoutInflater.java:394) Copy stack to clipboard