i m build signed apk and i have android studio 2.1.2
my build.gradle file as below
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
defaultConfig {
applicationId "com.my.pkg"
minSdkVersion 15
targetSdkVersion 22
versionCode 1
versionName "1.0"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
dexOptions {
preDexLibraries = false
javaMaxHeapSize "4g"
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile files('libs/apache-mime4j-0.6.jar')
compile files('libs/gson-2.1.jar')
compile files('libs/httpmime-4.0.1.jar')
compile files('libs/json_simple-1.1.jar')
compile 'com.android.support:cardview-v7:22.+'
compile 'com.github.ksoichiro:android-observablescrollview:1.5.0'
compile 'com.android.support:appcompat-v7:22+'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.android.support:design:22.+'
compile 'de.hdodenhof:circleimageview:2.0.0'
compile 'com.android.support:recyclerview-v7:22.+'
compile 'com.google.android.gms:play-services:7.+'
compile 'com.android.support:multidex:1.0.0'
compile project(':cropper')
}
When i build apk i get following error ExternalSystemException: String index out of range: -97
String index out of range: -97
com.intellij.openapi.externalSystem.model.ExternalSystemException: String index out of range: -97
at org.jetbrains.plugins.gradle.service.project.GradleExecutionHelper.execute(GradleExecutionHelper.java:238)
at com.android.tools.idea.gradle.invoker.GradleTasksExecutor.invokeGradleTasks(GradleTasksExecutor.java:416)
at com.android.tools.idea.gradle.invoker.GradleTasksExecutor.run(GradleTasksExecutor.java:222)
at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:563)
at com.intellij.openapi.progress.impl.CoreProgressManager$2.run(CoreProgressManager.java:142)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:446)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:392)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:127)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$1.run(ProgressManagerImpl.java:126)
at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:366)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
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)
at org.jetbrains.ide.PooledThreadExecutor$1$1.run(PooledThreadExecutor.java:55)
any idea how can i solve this ? you all suggestions are appreciable
I think this question is answered here basically look at gradle console it will show you where the problem.
This is usually caused by missing translation strings
to see the error run
from your project root. you will see something like this
If your string is not translatable like fb app id, then just set translatable attribute to false
In other case, make sure you have translations in all languages you specified