2016-05-31 54 views
2

我試圖生成的Android Studio分配APK,但得到這個錯誤:分配了產生APK字符串索引超出範圍

當然我也會用離子。

String index out of range: -75 
com.intellij.openapi.externalSystem.model.ExternalSystemException: String index out of range: -75 
    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) 
+0

寶可以複製:http://stackoverflow.com/questions/32575778/android-externalsystemexception-string-index-out-of-range-130-building-relea – Jehy

+0

我看到了..但它不工作... – user2918057

+0

至少,指定你已經嘗試過的東西。 – Jehy

回答

0

如果你碰巧使用的API串像谷歌地圖API,它是在像相同的值,但不同的字符串名稱某種方式複製或出現在一個以上的strings.xml即(語言字符串)的這個錯誤會發生,什麼是需要被剛做完使用默認語言字符串的API密鑰字符串,並將其標記爲不可翻譯

<string name="map_api_key" translatable="false">AIzaSyCZc********U9KVUf**2f</string> 

和任何其他API相關的字符串