There's a File menu command "Invalidate caches and restart". Try that. If
that doesn't work, I'll try to find a workaround. The basic problem is that
it's doing a lint pass on the build files before it imports them to try to
spot major problems that would prevent the import from working correctly,
and it's having trouble even determining the line number of the error. I
think it might be because IntelliJ uses cached versions of filesystem
files, and I think that cache may be out of date. But because of this
problem, you can't even see the error that's stopping the import. If
clearing caches doesn't help, perhaps you could try building from the
command line and see if the lint step of build finds it.


On Thu, Jul 24, 2014 at 11:31 AM, Benjamin Cooley <[email protected]>
wrote:

> Since its a clean install of studio and an import of a project, I don't
> think there are any caches to clear. I even tried wiping all .idea files in
> my tree.
>
>
> On Wednesday, July 23, 2014 4:58:15 PM UTC-7, sbarta wrote:
>
>> The only thing I can think of is to clear caches and restart.
>>
>>
>> On Wed, Jul 23, 2014 at 4:07 PM, Benjamin Cooley <[email protected]>
>> wrote:
>>
>>> I recently updated our project to 12.1 and decided I wanted to try
>>> AndroidStudio again (Had it working a while back, but haven't tried
>>> recently). I downloaded a new version of studio and tried importing our
>>> project, and got an IndexOutOfBoundsException. The error on screen was
>>> "Wrong offset: 958: Should be in range: [0,115]"
>>>
>>> Top of stack trace:
>>> [  72156]  ERROR - .project.GradleProjectImporter - Wrong offset: 958.
>>> Should be in range: [0, 115]
>>> java.lang.IndexOutOfBoundsException: Wrong offset: 958. Should be in
>>> range: [0, 115]
>>>     at com.intellij.openapi.editor.ex.util.SegmentArray.
>>> offsetOutOfRange(SegmentArray.java:92)
>>>     at com.intellij.openapi.editor.ex.util.SegmentArray.
>>> findSegmentIndex(SegmentArray.java:102)
>>>     at com.intellij.openapi.editor.impl.LineSet.findLineIndex(
>>> LineSet.java:40)
>>>     at com.intellij.openapi.editor.impl.DocumentImpl.
>>> getLineNumber(DocumentImpl.java:888)
>>>     at com.android.tools.idea.gradle.project.ProjectValidator$
>>> MyLintClient.report(ProjectValidator.java:144)
>>>     at com.android.tools.lint.client.api.LintDriver$
>>> LintClientWrapper.report(LintDriver.java:1999)
>>>     at com.android.tools.lint.detector.api.Context.report(
>>> Context.java:286)
>>>
>>>
>>> I tried running as root, as well as both 0.8.0, and 0.8.2. No luck.
>>>
>>> Is my project just too big/Lintastic? :(
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "adt-dev" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>>
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>  --
> You received this message because you are subscribed to the Google Groups
> "adt-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"adt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to