org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:transformClassesWithDexForDebug'

前端 未结 22 2206
暗喜
暗喜 2020-12-02 21:54

Due to 65K error in my project I need it to migrate to Android Studio . While running

./gradlew assembleDebug

I am

相关标签:
22条回答
  • 2020-12-02 22:27

    delete intermediates folder from app\build\intermediates. then rebuild the project. it will work

    0 讨论(0)
  • 2020-12-02 22:28

    For my case, I follow the steps from Firebase and by mistake I pated it in a wrong file.

    Then, I returned to the project from Project to Android. Once in the Android view I pasted the file /projectname/app/YOUR-FILE-HERE and now, you have to compile again.

    0 讨论(0)
  • 2020-12-02 22:29

    your manifest application name should contain application class name. Like

    <application
            android:name="your package name.MyApplication"
            android:allowBackup="true"
            android:icon="@drawable/ic_launcher"
            android:label="@string/app_name"
            android:largeHeap="true"
            android:theme="@style/AppTheme"> 
    
    0 讨论(0)
  • the steps I followed are:

    1. close Android Studio (or IntelliJ IDEA)
    2. in your project's directory:
      1. delete .idea directory
      2. delete .gradle directory
      3. delete all .iml files
        • find . | grep -e .iml$ | xargs rm
    3. use Android Studio to re-open the directory as a project

    Terminal commands:

    # close Android Studio
    cd "your project's directory"
    rm -rf ./.idea
    rm -rf ./.gradle
    find . | grep -e .iml$ | xargs rm
    # use Android Studio to re-open the directory as a project
    
    0 讨论(0)
  • 2020-12-02 22:32

    Just remove this line from build.gradle(Project folder)

    apply plugin: 'com.google.gms.google-services'
    

    Now rebuild the application. works fine Happy coding

    0 讨论(0)
  • 2020-12-02 22:34

    Just a simple solution is here...it worked for me:

    1. Clean Project
    2. Rebuild project
    3. Sync project with gradle file
    0 讨论(0)
提交回复
热议问题