Android: ExternalSystemException: String index out of range: -130 building release

后端 未结 8 1169
时光取名叫无心
时光取名叫无心 2020-12-06 15:48

So, just updated to Android Studio 1.4 Beta 4 and having trouble building a release build. I can build a debug build fine. This is the error I get:

ExternalS         


        
相关标签:
8条回答
  • 2020-12-06 16:22

    I had the same problem with Android Studio 1.4 Build on September 28, 2015 What I did was :

    1. Started a build on the main gradle script - that created a run configuration in the menu.

    2. Edited the run configuration by adding ":app:assembleRelease" on the script parameters row. and started it.

    3. The gradle build showed me that I had missing translations in the main strings.xml file.

    After fixing this. Generate Signed APK finished without problem.

    0 讨论(0)
  • 2020-12-06 16:29

    So I reverted back to Android Studio 1.3 and the issue went away.

    0 讨论(0)
  • 2020-12-06 16:29

    Although this is an old thread, however the following info might be useful for some people. I was getting a bit different message (but similar, googling for the following message redirects me to this thread.)

    Execution failed for task ':app:mergeReleaseResources'.
    > String index out of range: 0
    

    For me the problem was the string.xml was missing the name for a string resource as mentioned below.

    <string name="">Some strings...</string>
    

    Adding the proper resource name resolved the issue.

    <string name="some_string">Some strings...</string>
    
    0 讨论(0)
  • 2020-12-06 16:42

    My error is

    ExternalSystemException: String index out of range:-

    My app support Turkish and English language. My English strings.xml contains

     <string name="hello_world">Hello world!</string>
    

    and my Turkish strings.xml do not contains

    <string name="hello_world">Bla bla!</string>
    

    When i add <string name="hello_world">Bla bla!</string> to Turkish strings.xml file the problem solved.

    Note: Please look Android Studio's Gradle Console

    0 讨论(0)
  • 2020-12-06 16:42

    I have same problem. my Android Studio version is ver2.1.1

    My strings.xml contains

    <string name="title_connecting">connecting...</string>
    

    then I change to the following statement. the problem solved.

    <string name="title_connecting">connecting..</string>
    
    0 讨论(0)
  • 2020-12-06 16:45

    Worked By adding this in build.gradle

     lintOptions {
            checkReleaseBuilds false
        }
    
    0 讨论(0)
提交回复
热议问题