【发布时间】:2016-01-26 21:49:21
【问题描述】:
我想通过引用site 将Google Plus 集成到Eclipse4.4.1 的android 应用程序中。但面临非常令人沮丧的错误
转换为 Dalvik 格式失败,出现错误 1
在控制台中
GooglePlus] Dx 未捕获的翻译错误: java.util.concurrent.ExecutionException:java.lang.OutOfMemoryError: Java 堆空间 GooglePlus] Dx 未捕获的翻译错误:java.util.concurrent.ExecutionException:java.lang.OutOfMemoryError: Java 堆空间 GooglePlus] Dx 2 错误;中止 GooglePlus] 转换为 Dalvik 格式失败,出现错误 1
当我在我们的项目中添加 google-play-services_lib 作为库时
和库
MainActivity.java
private GoogleApiClient mGoogleApiClient;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
mGoogleApiClient = new GoogleApiClient.Builder(this)
.addConnectionCallbacks(this)
.addOnConnectionFailedListener(this).addApi(Plus.API)
.addScope(new Scope(Scopes.PROFILE)).addScope(new Scope(Scopes.EMAIL)).build();
}
我在 stackoverflow 中尝试了很多勾号(如清理项目、重建),但没有运气。
请指导我。
【问题讨论】:
-
跳转到
Android Studio -
显示你在构建路径中添加的jar文件
-
删除不必要的 jar 并取消选中自动构建。清理您的项目并自动检查构建。然后尝试运行您的项目。
-
@MD 但先生,请为日食打勾......
-
@Materazzi06 我试过了,但没用....
标签: android eclipse google-plus google-play-services