简体   繁体   English

我得到这个错误..pls指导我解决它

[英]I m getting this error ..pls guide me to solve it

**Error:Execution failed for task ':app:transformClassesWithDexForDebug'. **错误:任务':app:transformClassesWithDexForDebug'的执行失败。

com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\\Program Files\\Java\\jdk1.7.0_79\\bin\\java.exe'' finished with non-zero exit value 3** com.android.build.api.transform.TransformException:com.android.ide.common.process.ProcessException:org.gradle.process.internal.ExecException:进程'命令'C:\\ Program Files \\ Java \\ jdk1.7.0_79 \\ bin \\ java.exe''以非零退出值3完成**

**My Girdle file ** **我的束带文件**

apply plugin: 'com.android.application'

 android {
  compileSdkVersion 23
  buildToolsVersion "23.0.2"

 defaultConfig {
    applicationId "com.app"
    minSdkVersion 15
    targetSdkVersion 23
    versionCode 16
    versionName "1.16"
    multiDexEnabled true
 }
 buildTypes {
    release {
        minifyEnabled false
        shrinkResources true
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
 }

 compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_7
    targetCompatibility JavaVersion.VERSION_1_7
 }

 packagingOptions {
    exclude 'META-INF/DEPENDENCIES.txt'
    exclude 'META-INF/LICENSE.txt'
    exclude 'META-INF/NOTICE.txt'
    exclude 'META-INF/NOTICE'
    exclude 'META-INF/LICENSE'
    exclude 'META-INF/notice.txt'
    exclude 'META-INF/license.txt'
    exclude 'META-INF/dependencies.txt'
  }
 }

 dependencies {
  compile fileTree(include: ['*.jar'], dir: 'libs')
  testCompile 'junit:junit:4.12'
  compile 'com.facebook.android:facebook-android-sdk:4.+'
  compile 'com.google.android.gms:play-services:8.4.0'
  compile 'com.google.android.gms:play-services-appinvite:8.4.0'
  compile 'com.google.android.gms:play-services-analytics:8.4.0'
  compile 'org.apache.httpcomponents:httpclient:4.5.1'
  compile 'com.android.support:multidex:1.0.0'
  compile 'com.android.support:support-v13:23.1.1'
  compile 'com.android.support:design:23.1.1'
  compile 'com.google.android.gms:play-services-ads:8.4.0'
  compile 'com.google.android.gms:play-services-identity:8.4.0'
  compile 'com.google.android.gms:play-services-gcm:8.4.0'
  compile 'com.android.support:support-v4:23.1.1'
  compile 'com.jayway.android.robotium:robotium-solo:5.5.4'
 }

1) First of all, try cleaning and restarting your Project. 1)首先,尝试清理并重新启动项目。 In most of the cases this will resolve the issues. 在大多数情况下,这将解决问题。

2) If problem still persists: 2)如果问题仍然存在:

Import multidex dependency: 导入multidex依赖项:

dependencies {
  compile 'com.android.support:multidex:1.0.1'
}

In your manifest add the MultiDexApplication class: 在清单中添加MultiDexApplication类:

    <application
        ...
        android:name="android.support.multidex.MultiDexApplication">
        ...
    </application>

If your app already extends the Application class, you can override the attachBaseContext() method and call MultiDex.install(this) to enable multidex . 如果您的应用程序已经扩展了Application类,则可以覆盖attachBaseContext()方法并调用MultiDex.install(this)以启用multidex

protected void attachBaseContext(Context base) {
    super.attachBaseContext(base);
    MultiDex.install(this);
}

Finally, update your build.gradle by adding multiDexEnabled true : 最后,更新您build.gradle加入multiDexEnabled true

defaultConfig {  
        ...
        multiDexEnabled true  
    }  

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用Netbeans时出现此错误pls 103103 - I'm getting this error pls 00103 when using netbeans IM 输出错误请帮助&gt;&gt;&gt;&gt; - I M getting wrong output pls help>>>>> 我收到 gradle 错误,我该如何解决? - I'm getting a gradle error, how can I solve it? 当条件为真时,我正在尝试显示图像。但我遇到了错误<img>请帮助我 - I am trying display image when condition is true.but i am getting error in <img> tage pls help me 我正在尝试访问文档 API 并且在身份验证中遇到错误如何解决? - I'm trying to access the docusign API and I'm getting an error in authentication how to solve this? 升级spring引导版本时,卡住如下错误。 请让我知道如何解决这个问题 - While upgrading the spring boot version, stuck with the following error. Pls let me know how to solve this 当我尝试使用 API 自动化的 rest 保证框架执行脚本时出现错误。 请指导我解决同样的问题 - I am getting error when I try to execute script with rest assured framework for API automation. Please guide me to resolve the same 得到 ***BeanCreationException*** 请提出解决此问题的解决方案 - getting ***BeanCreationException*** pls suggest a solution to solve this 我收到这个错误,如正文所示,在 ubuntu 中构建 apk 文件时,请帮我解决这个错误 - I am getting this error as shown in body, while building a apk file in ubuntu, please help me to solve this error 我正在尝试使用 runOnUiThread bu 出现错误,因为我使用的 String var 应该是最终的,我该如何解决? - I'm trying to use runOnUiThread bu getting error since the String var i'm using should be final how can i solve it?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM