0

I can create a normal apk for my android app but when I try to generate a signed apk, every time I get the error

15:33:13 Executing tasks: [:app:assembleRelease]
15:33:18 ExternalSystemException: String index out of range: -71

Here I also want to share my build.gradle file with you:

apply plugin: 'com.android.application'

android {
compileSdkVersion 23

buildToolsVersion "23.0.1"

defaultConfig {
    applicationId "altayatik.calcy6pro"
    minSdkVersion 19
    targetSdkVersion 23
    versionCode 1
    versionName "1.0"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:24.0.0'
}
Victor Sergienko
  • 13,115
  • 3
  • 57
  • 91
A.Atik
  • 3
  • 2
  • clear the project and generate it – kiran kumar Jul 18 '16 at 13:16
  • Same error; Executing tasks: [clean, :app:generateDebugSources, :app:prepareDebugUnitTestDependencies, :app:mockableAndroidJar, :app:generateDebugAndroidTestSources] Gradle build finished in 8s 195ms Executing tasks: [clean, :app:generateDebugSources, :app:prepareDebugUnitTestDependencies, :app:mockableAndroidJar, :app:generateDebugAndroidTestSources, :app:compileDebugSources, :app:compileDebugUnitTestSources, :app:compileDebugAndroidTestSources] Gradle build finished in 8s 102ms Executing tasks: [:app:assembleRelease] ExternalSystemException: String index out of range: -71 – A.Atik Jul 18 '16 at 15:26
  • `Gradle build finished in 8s 102ms` For me this sounds like the compilation finished without error. The exception was thrown at the `assembleRelease` stage. So even a CleanBuild wouldn't help anyways. I assume it's some error with your strings.xml (as described in this question: http://stackoverflow.com/questions/32575778/android-externalsystemexception-string-index-out-of-range-130-building-relea ). Could you please check the gradle console in AndroidStudio and look if there's something weird? – UeliDeSchwert Jul 19 '16 at 06:01

0 Answers0