I Cant Build my app in Android Studio - android-studio

I have Just Installed Android Studio In Ubuntu but when I try to put any View in XML I got this Problem !
Rendering Problems The following classes could not be found:
- android.support.v7.internal.app.WindowDecorActionBar (Fix Build Path, Create Class)
Tip: Try to build the project. The following classes could not be instantiated:
- android.support.v7.app.WindowDecorActionBar (Open Class, Show Exception, Clear Cache)
Tip: Use View.isInEditMode() in your custom views to skip code or show sample data when shown in the IDE
java.lang.NullPointerException
at android.support.v7.app.WindowDecorActionBar.getDecorToolbar(WindowDecorActionBar.java:241)
at android.support.v7.app.WindowDecorActionBar.init(WindowDecorActionBar.java:198)
at android.support.v7.app.WindowDecorActionBar.(WindowDecorActionBar.java:190)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at org.jetbrains.android.uipreview.ViewLoader.createNewInstance(ViewLoader.java:458)
at org.jetbrains.android.uipreview.ViewLoader.loadClass(ViewLoader.java:170)
at org.jetbrains.android.uipreview.ViewLoader.loadView(ViewLoader.java:103)
at com.android.tools.idea.rendering.LayoutlibCallbackImpl.loadView(LayoutlibCallbackImpl.java:170)
at com.android.layoutlib.bridge.bars.AppCompatActionBar.(AppCompatActionBar.java:89)
at com.android.layoutlib.bridge.impl.Layout.createActionBar(Layout.java:237)
at com.android.layoutlib.bridge.impl.Layout.(Layout.java:151)
at com.android.layoutlib.bridge.impl.RenderSessionImpl.inflate(RenderSessionImpl.java:206)
at com.android.layoutlib.bridge.Bridge.createSession(Bridge.java:426)
at com.android.ide.common.rendering.LayoutLibrary.createSession(LayoutLibrary.java:350)
at com.android.tools.idea.rendering.RenderTask$2.compute(RenderTask.java:510)
at com.android.tools.idea.rendering.RenderTask$2.compute(RenderTask.java:498)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:888)
at com.android.tools.idea.rendering.RenderTask.createRenderSession(RenderTask.java:498)
at com.android.tools.idea.rendering.RenderTask.access$600(RenderTask.java:72)
at com.android.tools.idea.rendering.RenderTask$3.call(RenderTask.java:610)
at com.android.tools.idea.rendering.RenderTask$3.call(RenderTask.java:607)
at com.android.tools.idea.rendering.RenderService.runRenderAction(RenderService.java:362)
at com.android.tools.idea.rendering.RenderTask.render(RenderTask.java:607)
at com.android.tools.idea.rendering.RenderTask.render(RenderTask.java:629)
at org.jetbrains.android.uipreview.AndroidLayoutPreviewToolWindowManager.doRender(AndroidLayoutPreviewToolWindowManager.java:652)
at org.jetbrains.android.uipreview.AndroidLayoutPreviewToolWindowManager.access$1700(AndroidLayoutPreviewToolWindowManager.java:80)
at org.jetbrains.android.uipreview.AndroidLayoutPreviewToolWindowManager$7$1.run(AndroidLayoutPreviewToolWindowManager.java:594)
at com.intellij.openapi.progress.impl.CoreProgressManager$2.run(CoreProgressManager.java:152)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:452)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:402)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:137)
at org.jetbrains.android.uipreview.AndroidLayoutPreviewToolWindowManager$7.run(AndroidLayoutPreviewToolWindowManager.java:589)
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)
Do u have any Solution !??

Related

NullnessChecker Error: java.lang.NoSuchFieldError: RELEASE

I can't build my code with the checker framework anymore. When I comment out the checker framework annotation processor, my code compiles fine, so the problem isn't with my code. With the framework, I get this error message:
[ERROR] InvocationTargetException when invoking constructor for class
org.checkerframework.checker.nullness.KeyForAnnotatedTypeFactory; Underlying cause:
java.lang.NoSuchFieldError: RELEASE
Exception: java.lang.reflect.InvocationTargetException; Stack trace: sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
java.lang.reflect.Constructor.newInstance(Constructor.java:423)
org.checkerframework.common.basetype.BaseTypeChecker.invokeConstructorFor(BaseTypeChecker.java:275)
org.checkerframework.common.basetype.BaseTypeVisitor.createTypeFactory(BaseTypeVisitor.java:261)
...
(Full stack trace is at the bottom.)
This stack trace doesn't reference anything in my code. It appears to be a bug in the nullness checker.
I'm using the current version of maven (3.6.3) and the maven compiler plug-in (3.8.1). I'm using JDK 1.8.
To see the pom.xml file and the code, check out the repository at https://github.com/SwingGuy1024/CheckerNoSuchFieldErrorBug
Here's a link to the pom file: https://github.com/SwingGuy1024/CheckerNoSuchFieldErrorBug/blob/master/pom.xml
To reproduce the bug using Maven, download the repository and type mvn clean install
Here's the full stack trace:
[ERROR] InvocationTargetException when invoking constructor for class org.checkerframework.checker.nullness.KeyForAnnotatedTypeFactory; Underlying cause: java.lang.NoSuchFieldError: RELEASE
Exception: java.lang.reflect.InvocationTargetException; Stack trace: sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
java.lang.reflect.Constructor.newInstance(Constructor.java:423)
org.checkerframework.common.basetype.BaseTypeChecker.invokeConstructorFor(BaseTypeChecker.java:275)
org.checkerframework.common.basetype.BaseTypeVisitor.createTypeFactory(BaseTypeVisitor.java:261)
org.checkerframework.common.basetype.BaseTypeVisitor.<init>(BaseTypeVisitor.java:220)
org.checkerframework.common.basetype.BaseTypeVisitor.<init>(BaseTypeVisitor.java:209)
org.checkerframework.common.basetype.BaseTypeChecker.createSourceVisitor(BaseTypeChecker.java:224)
org.checkerframework.common.basetype.BaseTypeChecker.createSourceVisitor(BaseTypeChecker.java:85)
org.checkerframework.framework.source.SourceChecker.initChecker(SourceChecker.java:904)
org.checkerframework.common.basetype.BaseTypeChecker.initChecker(BaseTypeChecker.java:100)
org.checkerframework.common.basetype.BaseTypeChecker.initChecker(BaseTypeChecker.java:91)
org.checkerframework.framework.source.SourceChecker.typeProcessingStart(SourceChecker.java:860)
org.checkerframework.javacutil.AbstractTypeProcessor$AttributionTaskListener.finished(AbstractTypeProcessor.java:157)
com.sun.tools.javac.api.ClientCodeWrapper$WrappedTaskListener.finished(ClientCodeWrapper.java:681)
com.sun.tools.javac.api.MultiTaskListener.finished(MultiTaskListener.java:111)
com.sun.tools.javac.main.JavaCompiler.flow(JavaCompiler.java:1342)
com.sun.tools.javac.main.JavaCompiler.flow(JavaCompiler.java:1296)
com.sun.tools.javac.main.JavaCompiler.compile2(JavaCompiler.java:901)
com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:860)
com.sun.tools.javac.main.Main.compile(Main.java:523)
com.sun.tools.javac.api.JavacTaskImpl.doCall(JavacTaskImpl.java:129)
com.sun.tools.javac.api.JavacTaskImpl.call(JavacTaskImpl.java:138)
org.codehaus.plexus.compiler.javac.JavaxToolsCompiler.compileInProcess(JavaxToolsCompiler.java:126)
org.codehaus.plexus.compiler.javac.JavacCompiler.performCompile(JavacCompiler.java:174)
org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:1134)
org.apache.maven.plugin.compiler.CompilerMojo.execute(CompilerMojo.java:187)
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210)
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156)
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
org.apache.maven.cli.MavenCli.execute(MavenCli.java:957)
org.apache.maven.cli.MavenCli.doMain(MavenCli.java:289)
org.apache.maven.cli.MavenCli.main(MavenCli.java:193)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:498)
org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282)
org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225)
org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406)
org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347)
org.codehaus.classworlds.Launcher.main(Launcher.java:47)
Underlying Exception: java.lang.NoSuchFieldError: RELEASE; Stack trace: org.checkerframework.javacutil.PluginUtil.getReleaseValue(PluginUtil.java:617)
org.checkerframework.framework.stub.StubTypes.<init>(StubTypes.java:81)
org.checkerframework.framework.type.AnnotatedTypeFactory.<init>(AnnotatedTypeFactory.java:397)
org.checkerframework.framework.type.GenericAnnotatedTypeFactory.<init>(GenericAnnotatedTypeFactory.java:202)
org.checkerframework.checker.nullness.KeyForAnnotatedTypeFactory.<init>(KeyForAnnotatedTypeFactory.java:65)
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
java.lang.reflect.Constructor.newInstance(Constructor.java:423)
org.checkerframework.common.basetype.BaseTypeChecker.invokeConstructorFor(BaseTypeChecker.java:275)
org.checkerframework.common.basetype.BaseTypeVisitor.createTypeFactory(BaseTypeVisitor.java:261)
org.checkerframework.common.basetype.BaseTypeVisitor.<init>(BaseTypeVisitor.java:220)
org.checkerframework.common.basetype.BaseTypeVisitor.<init>(BaseTypeVisitor.java:209)
org.checkerframework.common.basetype.BaseTypeChecker.createSourceVisitor(BaseTypeChecker.java:224)
org.checkerframework.common.basetype.BaseTypeChecker.createSourceVisitor(BaseTypeChecker.java:85)
org.checkerframework.framework.source.SourceChecker.initChecker(SourceChecker.java:904)
org.checkerframework.common.basetype.BaseTypeChecker.initChecker(BaseTypeChecker.java:100)
org.checkerframework.common.basetype.BaseTypeChecker.initChecker(BaseTypeChecker.java:91)
org.checkerframework.framework.source.SourceChecker.typeProcessingStart(SourceChecker.java:860)
org.checkerframework.javacutil.AbstractTypeProcessor$AttributionTaskListener.finished(AbstractTypeProcessor.java:157)
com.sun.tools.javac.api.ClientCodeWrapper$WrappedTaskListener.finished(ClientCodeWrapper.java:681)
com.sun.tools.javac.api.MultiTaskListener.finished(MultiTaskListener.java:111)
com.sun.tools.javac.main.JavaCompiler.flow(JavaCompiler.java:1342)
com.sun.tools.javac.main.JavaCompiler.flow(JavaCompiler.java:1296)
com.sun.tools.javac.main.JavaCompiler.compile2(JavaCompiler.java:901)
com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:860)
com.sun.tools.javac.main.Main.compile(Main.java:523)
com.sun.tools.javac.api.JavacTaskImpl.doCall(JavacTaskImpl.java:129)
com.sun.tools.javac.api.JavacTaskImpl.call(JavacTaskImpl.java:138)
org.codehaus.plexus.compiler.javac.JavaxToolsCompiler.compileInProcess(JavaxToolsCompiler.java:126)
org.codehaus.plexus.compiler.javac.JavacCompiler.performCompile(JavacCompiler.java:174)
org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:1134)
org.apache.maven.plugin.compiler.CompilerMojo.execute(CompilerMojo.java:187)
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210)
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156)
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
org.apache.maven.cli.MavenCli.execute(MavenCli.java:957)
org.apache.maven.cli.MavenCli.doMain(MavenCli.java:289)
org.apache.maven.cli.MavenCli.main(MavenCli.java:193)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:498)
org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282)
org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225)
org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406)
org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347)
org.codehaus.classworlds.Launcher.main(Launcher.java:47)
The problem is an incorrect pom.xml file, caused by not following the instructions in the Checker Framework Manual.
Even after multiple fixes (see comments on the original post), the pom.xml file contains this nonsense line that overrides a correct line earlier in the file:
<errorProneJavac>.m2/repository/com/google/errorprone/${checkerVersion}:javac:jar</errorProneJavac>
When that line is present, the build yields java.lang.NoSuchFieldError: RELEASE.
Removing that line (that is, following the instructions in the manual) makes the project build.
Here is a diff that cleans up some of the wrong parts of the pom.xml file.

Chip component is crashing, gives error 'fail to instantiate class'

I'm trying to insert a chip into my project but I got the message: Fail to instantiate one or more classes. Look below to more details.
<com.robertlevonyan.views.chip.Chip
android:id="#+id/chip"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Basic test" />
I've tried with two versions, 1.2.4 and 2.0.3 (latest), but neither worked. I got this message on my Issues Message:
Failed to instantiate one or more classes.
This did not allow me to insert a chip into my project.
What did I try?
I tried cleaning the cache, installing another version, and restarting Android Studio IDE but they did not work.
I tried with robertlevonyan/materialChipView and Materialize Chip
Exception
java.lang.NoClassDefFoundError: com/robertlevonyan/views/chip/R$styleable at com.robertlevonyan.views.chip.Chip.initTypedArray(Chip.kt:113) at com.robertlevonyan.views.chip.Chip.<init>(Chip.kt:104) at com.robertlevonyan.views.chip.Chip.<init>(Chip.kt:102) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at org.jetbrains.android.uipreview.ViewLoader.createNewInstance(ViewLoader.java:403) at org.jetbrains.android.uipreview.ViewLoader.loadClass(ViewLoader.java:186) at org.jetbrains.android.uipreview.ViewLoader.loadView(ViewLoader.java:144) at com.android.tools.idea.rendering.LayoutlibCallbackImpl.loadView(LayoutlibCallbackImpl.java:309) at android.view.BridgeInflater.loadCustomView(BridgeInflater.java:418) at android.view.BridgeInflater.loadCustomView(BridgeInflater.java:429) at android.view.BridgeInflater.createViewFromTag(BridgeInflater.java:333) 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) at com.android.layoutlib.bridge.impl.RenderSessionImpl.inflate(RenderSessionImpl.java:323) at com.android.layoutlib.bridge.Bridge.createSession(Bridge.java:394) at com.android.tools.idea.layoutlib.LayoutLibrary.createSession(LayoutLibrary.java:200) at com.android.tools.idea.rendering.RenderTask.createRenderSession(RenderTask.java:572) at com.android.tools.idea.rendering.RenderTask.lambda$inflate$5(RenderTask.java:698) at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1590) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)
Thanks.
Edit: I tried to create my own drawable chip but I need to change the color dynamically so I really need to use this 3rd libs.

Android Studio Rendering Problems java.util.concurrent.TimeoutException

Can someone help me with thi errors.
First I had problems with design XML files, now this.
I didn't come further than just creating a project to practice for my first app....
java.util.concurrent.TimeoutException: Preview timed out while
rendering the layout. This typically happens when there is an infinite
loop or unbounded recursion in one of the custom views. at
java.util.zip.ZipFile.read(Native Method) at
java.util.zip.ZipFile.access$1400(ZipFile.java:60) at
java.util.zip.ZipFile$ZipFileInputStream.read(ZipFile.java:717) at
java.util.zip.ZipFile$ZipFileInflaterInputStream.fill(ZipFile.java:419)
at
java.util.zip.InflaterInputStream.read(InflaterInputStream.java:158)
at
com.intellij.openapi.util.io.FileUtilRt.loadBytes(FileUtilRt.java:627)
at
com.intellij.openapi.util.io.FileUtil.loadBytes(FileUtil.java:1604)
at com.intellij.util.lang.MemoryResource.load(MemoryResource.java:74)
at com.intellij.util.lang.JarLoader.getResource(JarLoader.java:134)
at
com.intellij.util.lang.ClassPath$ResourceStringLoaderIterator.process(ClassPath.java:342)
at
com.intellij.util.lang.ClassPath$ResourceStringLoaderIterator.process(ClassPath.java:332)
at
com.intellij.util.lang.ClasspathCache.iterateLoaders(ClasspathCache.java:98)
at com.intellij.util.lang.ClassPath.getResource(ClassPath.java:106)
at
com.intellij.util.lang.UrlClassLoader._findClass(UrlClassLoader.java:220)
at
com.intellij.ide.plugins.cl.PluginClassLoader.loadClassInsideSelf(PluginClassLoader.java:119)
at
com.intellij.ide.plugins.cl.PluginClassLoader.tryLoadingClass(PluginClassLoader.java:73)
at
com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.java:62)
at java.lang.ClassLoader.loadClass(ClassLoader.java:411) at
java.lang.ClassLoader.loadClass(ClassLoader.java:357) at
org.jetbrains.android.uipreview.ModuleClassLoader.loadClass(ModuleClassLoader.java:193)
at
android.support.v7.widget.VectorEnabledTintResources.shouldBeUsed(VectorEnabledTintResources.java:41)
at
android.support.v7.widget.TintContextWrapper.shouldWrap(TintContextWrapper.java:84)
at
android.support.v7.widget.TintContextWrapper.wrap(TintContextWrapper.java:45)
at
android.support.v7.widget.AppCompatImageView.(AppCompatImageView.java:60)
at
android.support.v7.widget.AppCompatImageView.(AppCompatImageView.java:56)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method) at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at
org.jetbrains.android.uipreview.ViewLoader.createNewInstance(ViewLoader.java:465)
at
org.jetbrains.android.uipreview.ViewLoader.loadClass(ViewLoader.java:172)
at
org.jetbrains.android.uipreview.ViewLoader.loadClass(ViewLoader.java:150)
at
com.android.tools.idea.rendering.LayoutlibCallbackImpl.loadClass(LayoutlibCallbackImpl.java:193)
at
android.view.BridgeInflater.loadCustomView(BridgeInflater.java:333)
at android.view.BridgeInflater.onCreateView(BridgeInflater.java:152)
at android.view.LayoutInflater.onCreateView(LayoutInflater.java:717)
at
android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:785)
at
android.view.BridgeInflater.createViewFromTag(BridgeInflater.java:222)
at
android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:727)
at
android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:858)
at
android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:70)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:834) at
android.view.LayoutInflater.inflate(LayoutInflater.java:492) at
com.android.layoutlib.bridge.bars.CustomBar.(CustomBar.java:95)
at
com.android.layoutlib.bridge.bars.NavigationBar.(NavigationBar.java:52)
at
com.android.layoutlib.bridge.bars.NavigationBar.(NavigationBar.java:46)
at
com.android.layoutlib.bridge.impl.Layout.createNavBar(Layout.java:281)
at com.android.layoutlib.bridge.impl.Layout.(Layout.java:137)
at
com.android.layoutlib.bridge.impl.RenderSessionImpl.inflate(RenderSessionImpl.java:301)
at com.android.layoutlib.bridge.Bridge.createSession(Bridge.java:429)
at
com.android.ide.common.rendering.LayoutLibrary.createSession(LayoutLibrary.java:389)
at
com.android.tools.idea.rendering.RenderTask$2.compute(RenderTask.java:548)
at
com.android.tools.idea.rendering.RenderTask$2.compute(RenderTask.java:533)
at
com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:966)
at
com.android.tools.idea.rendering.RenderTask.createRenderSession(RenderTask.java:533)
at
com.android.tools.idea.rendering.RenderTask.lambda$inflate$70(RenderTask.java:659)
at
com.android.tools.idea.rendering.RenderTask$$Lambda$169/554168569.call(Unknown
Source) at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Try this:
Build -> Rebuild Project
Try to Build APK, Rebuild Project, or close and re-open your project.

groovysh crashes under Java 1.7.0_75 (Windows XP)

Using the latest version of Groovy (as of this writing), 2.4.0, and Windows XP (sp3), I have encountered a familiar but perplexing error:
C:\>groovysh
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.groovy.tools.GroovyStarter.rootLoader(GroovyStarter.java
:106)
at org.codehaus.groovy.tools.GroovyStarter.main(GroovyStarter.java:128)
Caused by: groovy.lang.MissingPropertyException: No such property: leftPadding f
or class: org.codehaus.groovy.tools.shell.util.HelpFormatter
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptByteco
deAdapter.java:51)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.setGroovyObjectProp
erty(ScriptBytecodeAdapter.java:532)
at org.codehaus.groovy.tools.shell.util.HelpFormatter.<init>(HelpFormatt
er.groovy:39)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
orAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
onstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstru
ctor.java:77)
at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteN
oUnwrapNoCoerce.callConstructor(ConstructorSite.java:102)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstru
ctor(CallSiteArray.java:57)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor
(AbstractCallSite.java:230)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor
(AbstractCallSite.java:234)
at org.codehaus.groovy.tools.shell.Main.main(Main.groovy:68)
... 6 more
I experienced no difficulty using Groovy 2.3.9 so I was wondering if anyone had a constructive suggestion.
Thanks.
Your Error occurs in the HelpFormatter class. The sources can be found via google, i.e. here:
https://github.com/groovy/groovy-core/blob/master/subprojects/groovy-groovysh/src/main/groovy/org/codehaus/groovy/tools/shell/util/HelpFormatter.groovy
As you can see, class HelpFormatter extends org.apache.commons.cli.HelpFormatter
And expects the superclass to have a field leftPadding, but does not find one.
This could be the case if you have a different version of apache commons-cli.jar on your CLASSPATH when running groovysh.
Since I cannot reproduce your problem, this is the most likely cause I can see.
Run
echo %CLASSPATH
in Windows to see the CLASSPATh (I think).

java.lang.NoClassDefFoundError org.eclipse.jetty.server.Connector on Jetty

I have a java web app that uses Jetty embedded and when I try to run in a linux environment I have the following exception:
Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/jetty/server/Connector
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at br.com.teste.install.Launcher.work(Launcher.java:23)
at br.com.teste.install.Install.main(Install.java:14)
Caused by: java.lang.ClassNotFoundException: org.eclipse.jetty.server.Connector
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
... 4 more
When I run exactly the same app in a windows environment this works without any error.
I have no ideia for what happen this.
Thanks for any help.

Resources