2014-08-27 66 views
0

我正在使用Azure移動服務快速啓動項目。 從Eclipse導入到Android Studio,它的構建和運行良好。Android Studio:構建失敗時,我添加一個空白任務

但只要我添加一個空白活動構建失敗:

Error:Execution failed for task ':dexDebug'. 
> com.android.ide.common.internal.LoggedErrorException: Failed to run command: 
... 
... 
UNEXPECTED TOP-LEVEL EXCEPTION: 
com.android.dex.DexException: Multiple dex files define  Landroid/support/v4/accessibilityservice/ 
AccessibilityServiceInfoCompat$AccessibilityServiceInfoVersionImpl; 

我也注意到,它添加了以下到的build.gradle

dependencies { 
compile fileTree(include: '*.jar', dir: 'libs') 
compile 'com.android.support:appcompat-v7:20.0.0' 
} 

如果我評論的除Gradle,我收到了很多錯誤......我很確定它屬於那裏。

如果我刪除我的活動,佈局和相關的菜單或字符串...它再次建立罰款。

我已經通過很多帖子,人們收到類似的錯誤,但無法找到我的問題的解決方案。

我也嘗試過,重新啓動,清理構建和重建。

我真的很感激一些幫助...感謝

+0

在你的libs文件夾罐子什麼工作? – Gak2 2014-08-27 21:00:01

+0

對不起,我忘了提及。在libs文件夾中,我有「android-support-v4.jar」,「gson-2.2.2.jar」,「mobileservices-1.1.5.jar」和「thirdpartynotices.rtf」 – Basquiat 2014-08-28 04:49:02

+0

我的Project文件夾下面還有一個包含「Android API 19 Platform」和「Support-Annotations-20.0.0」的「External Libraries」文件夾 – Basquiat 2014-08-28 07:44:40

回答

0

在我的應用程序目錄的下面的build.gradle評論後再次..它

dependencies { 
// compile 'com.android.support:support-v4:+' 
compile 'com.google.code.gson:gson:2.2.2' 
compile files('libs/mobileservices-1.1.5.jar') 
} 
相關問題