java.lang.StringIndexOutOfBoundsException: String index out of range: -1

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

,
via GitHub by Omertron

You need to make sure that capitalisation of the case for the plugin in the properties file is exactly: "AllocinePlugin" and not "allocineplugin"

,
Expert tip

This is a bug when using Micromax devices with VideoView. You can either exclude these devices or look at this workaround: http://stackoverflow.com/a/31942841/4347859

Solutions on the web

via YouTrack by Unknown author, 1 year ago
via Google Groups by Tamas Papp, 5 months ago
String index out of range: -1
via chinaqianxi.com by Unknown author, 2 years ago
String index out of range: -1
via GitHub by Nyholm
, 2 years ago
String index out of range: -1
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:1967)
at android.databinding.tool.reflection.annotation.AnnotationTypeUtil.getDescription(AnnotationTypeUtil.java:87)
at android.databinding.tool.reflection.annotation.AnnotationTypeUtil.getDescription(AnnotationTypeUtil.java:47)
at android.databinding.tool.reflection.annotation.AnnotationMethod.getJniDescription(AnnotationMethod.java:159)
at android.databinding.tool.reflection.SdkUtil.getMinApi(SdkUtil.java:63)
at android.databinding.tool.reflection.annotation.AnnotationMethod.getMinApi(AnnotationMethod.java:152)
at android.databinding.tool.store.SetterStore$ModelMethodSetter.getMinApi(SetterStore.java:1412)
at android.databinding.tool.Binding.getMinApi(Binding.java:210)
at android.databinding.tool.writer.LayoutBinderWriter$executePendingBindings$1$1$7$1.invoke(LayoutBinderWriter.kt:956)
at android.databinding.tool.writer.LayoutBinderWriter$executePendingBindings$1$1$7$1.invoke(LayoutBinderWriter.kt:317)
at android.databinding.tool.writer.KCode.block(KCode.kt:94)
at android.databinding.tool.writer.LayoutBinderWriter$executePendingBindings$1$1.invoke(LayoutBinderWriter.kt:955)
at android.databinding.tool.writer.LayoutBinderWriter$executePendingBindings$1$1.invoke(LayoutBinderWriter.kt:317)
at android.databinding.tool.writer.KCode.block(KCode.kt:94)
at android.databinding.tool.writer.LayoutBinderWriter$executePendingBindings$1.invoke(LayoutBinderWriter.kt:909)
at android.databinding.tool.writer.LayoutBinderWriter$executePendingBindings$1.invoke(LayoutBinderWriter.kt:317)
at android.databinding.tool.writer.KCodeKt.kcode(KCode.kt:163)
at android.databinding.tool.writer.LayoutBinderWriter.executePendingBindings(LayoutBinderWriter.kt:907)
at android.databinding.tool.writer.LayoutBinderWriter$write$1$1.invoke(LayoutBinderWriter.kt:382)
at android.databinding.tool.writer.LayoutBinderWriter$write$1$1.invoke(LayoutBinderWriter.kt:317)
at android.databinding.tool.writer.KCode.block(KCode.kt:94)
at android.databinding.tool.writer.LayoutBinderWriter$write$1.invoke(LayoutBinderWriter.kt:362)
at android.databinding.tool.writer.LayoutBinderWriter$write$1.invoke(LayoutBinderWriter.kt:317)
at android.databinding.tool.writer.KCodeKt.kcode(KCode.kt:163)
at android.databinding.tool.writer.LayoutBinderWriter.write(LayoutBinderWriter.kt:352)
at android.databinding.tool.LayoutBinder.writeViewBinder(LayoutBinder.java:340)
at android.databinding.tool.DataBinder.writeBinders(DataBinder.java:101)
at android.databinding.tool.CompilerChef.writeViewBinders(CompilerChef.java:211)
at android.databinding.annotationprocessor.ProcessExpressions.writeResourceBundle(ProcessExpressions.java:154)
at android.databinding.annotationprocessor.ProcessExpressions.onHandleStep(ProcessExpressions.java:82)
at android.databinding.annotationprocessor.ProcessDataBinding$ProcessingStep.runStep(ProcessDataBinding.java:154)
at android.databinding.annotationprocessor.ProcessDataBinding$ProcessingStep.access$000(ProcessDataBinding.java:139)
at android.databinding.annotationprocessor.ProcessDataBinding.process(ProcessDataBinding.java:66)
at org.jetbrains.kotlin.annotation.AbstractAnnotationProcessingExtension.analysisCompleted(AnnotationProcessingExtension.kt:142)
at org.jetbrains.kotlin.resolve.jvm.TopDownAnalyzerFacadeForJVM.analyzeFilesWithJavaIntegration(TopDownAnalyzerFacadeForJVM.java:160)
at org.jetbrains.kotlin.resolve.jvm.TopDownAnalyzerFacadeForJVM.analyzeFilesWithJavaIntegrationWithCustomContext(TopDownAnalyzerFacadeForJVM.java:79)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler$analyze$1.analyze(KotlinToJVMBytecodeCompiler.kt:350)
at org.jetbrains.kotlin.cli.common.messages.AnalyzerWithCompilerReport.analyzeAndReport(AnalyzerWithCompilerReport.kt:126)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.analyze(KotlinToJVMBytecodeCompiler.kt:343)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.compileModules(KotlinToJVMBytecodeCompiler.kt:129)
at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:178)
at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:51)
at org.jetbrains.kotlin.cli.common.CLICompiler.exec(CLICompiler.java:199)
at org.jetbrains.kotlin.gradle.tasks.KotlinCompile.compileChanged(Tasks.kt:542)
at org.jetbrains.kotlin.gradle.tasks.KotlinCompile.callCompiler(Tasks.kt:458)
at org.jetbrains.kotlin.gradle.tasks.KotlinCompile.callCompiler(Tasks.kt:149)
at org.jetbrains.kotlin.gradle.tasks.AbstractKotlinCompile.execute(Tasks.kt:115)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:75)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$IncrementalTaskAction.doExecute(AnnotationProcessingTaskFactory.java:245)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:221)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$IncrementalTaskAction.execute(AnnotationProcessingTaskFactory.java:232)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:210)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35)
at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:66)
at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:52)
at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53)
at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:203)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:185)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:66)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:50)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54)
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)

Users with the same issue

4 times, 2 weeks ago
Once, 2 months ago
Once, 5 months ago
7 times, 6 months ago
2 times, 11 months ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.