升级到Android Studio 2.3后:transformNativeLibsWithStripDebugSymbolFor <build flavor =“”>失败

时间:2017-03-16 15:10:38

标签: android gradlew

我刚刚升级到Android Studio 2.3,这需要所有build.gradle使用至少buildToolsVersion 25.0.0

应用了以下设置: 我项目中所有build.gradle中的buildToolsVersion "25.0.2" targetSdkVersion 25 compile 'com.android.support:support-annotations:25.3.0' compile 'com.android.support:support-v4:25.3.0'

我现在从gradle收到以下错误:,因为gradlew assembleStgQa --stacktrace --info --debug

14:44:24.940 [INFO] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor] :app:transformNativeLibsWithStripDebugSymbolForStgQa (Thread[Daemon worker Thread 19,5,main]) started.
14:44:24.941 [LIFECYCLE] [class org.gradle.internal.buildevents.TaskExecutionLogger] :app:transformNativeLibsWithStripDebugSymbolForStgQa
14:44:24.941 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter] Starting to execute task ':app:transformNativeLibsWithStripDebugSymbolForStgQa'
14:44:24.948 [INFO] [org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter] Putting task artifact state for task ':app:transformNativeLibsWithStripDebugSymbolForStgQa' into context took 0.006 secs.
14:44:24.949 [DEBUG] [org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter] Determining if task ':app:transformNativeLibsWithStripDebugSymbolForStgQa' is up-to-date
14:44:24.950 [INFO] [org.gradle.api.internal.changedetection.rules.TaskTypeTaskStateChanges] Task :app:transformNativeLibsWithStripDebugSymbolForStgQa class loader hash: 11b60c4720882a56a8c400e1b81f58b4
14:44:24.950 [INFO] [org.gradle.api.internal.changedetection.rules.TaskTypeTaskStateChanges] Task :app:transformNativeLibsWithStripDebugSymbolForStgQa actions class loader hash: eabcad3980253fdc0853d644ac66901a
14:44:25.032 [INFO] [org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter] Executing task ':app:transformNativeLibsWithStripDebugSymbolForStgQa' (up-to-date check took 0.083 secs) due to:
  No history is available.
14:44:25.033 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter] Executing actions for task ':app:transformNativeLibsWithStripDebugSymbolForStgQa'.
14:44:25.033 [INFO] [org.gradle.api.internal.changedetection.changes.RebuildIncrementalTaskInputs] All input files are considered out-of-date for incremental task ':app:transformNativeLibsWithStripDebugSymbolForStgQa'.
14:44:25.142 [DEBUG] [org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter] Removed task artifact state for {} from context.
14:44:25.143 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter] Finished executing task ':app:transformNativeLibsWithStripDebugSymbolForStgQa'
14:44:25.143 [LIFECYCLE] [class org.gradle.internal.buildevents.TaskExecutionLogger] :app:transformNativeLibsWithStripDebugSymbolForStgQa FAILED
14:44:25.143 [INFO] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor] :app:transformNativeLibsWithStripDebugSymbolForStgQa (Thread[Daemon worker Thread 19,5,main]) completed. Took 0.202 secs.
14:44:25.144 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationWorkerRegistry] Worker root.87 completed (0 in use)
14:44:25.144 [DEBUG] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor] Task worker [Thread[Daemon worker Thread 19,5,main]] finished, busy: 28.622 secs, idle: 0.039 secs
14:44:25.146 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
14:44:25.147 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] FAILURE: Build failed with an exception.
14:44:25.147 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
14:44:25.147 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * What went wrong:
14:44:25.147 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Execution failed for task ':app:transformNativeLibsWithStripDebugSymbolForStgQa'.
14:44:25.147 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > java.lang.NullPointerException (no error message)
14:44:25.147 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
14:44:25.147 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Exception is:
14:44:25.148 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:transformNativeLibsWithStripDebugSymbolForStgQa'.
14:44:25.148 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:84)
14:44:25.148 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:55)
14:44:25.148 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:62)
14:44:25.149 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
14:44:25.149 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:88)
14:44:25.149 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:46)
14:44:25.149 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:51)
14:44:25.149 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
14:44:25.149 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
14:44:25.149 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)
14:44:25.149 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.execute(DefaultTaskGraphExecuter.java:236)
14:44:25.149 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.execute(DefaultTaskGraphExecuter.java:228)
14:44:25.149 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.Transformers$4.transform(Transformers.java:169)
14:44:25.149 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:106)
14:44:25.150 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:61)
14:44:25.150 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:228)
14:44:25.150 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:215)
14:44:25.150 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:77)
14:44:25.150 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:58)
14:44:25.150 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:32)
14:44:25.151 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:113)
14:44:25.151 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:37)
14:44:25.151 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)
14:44:25.151 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.execution.DefaultBuildExecuter.access$000(DefaultBuildExecuter.java:23)
14:44:25.151 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.execution.DefaultBuildExecuter$1.proceed(DefaultBuildExecuter.java:43)
14:44:25.151 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)
14:44:25.151 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)
14:44:25.151 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:30)
14:44:25.151 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.initialization.DefaultGradleLauncher$3.execute(DefaultGradleLauncher.java:196)
14:44:25.152 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.initialization.DefaultGradleLauncher$3.execute(DefaultGradleLauncher.java:193)
14:44:25.152 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.Transformers$4.transform(Transformers.java:169)
14:44:25.152 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:106)
14:44:25.152 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:56)
14:44:25.152 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:193)
14:44:25.152 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:119)
14:44:25.152 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:102)
14:44:25.152 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.exec.GradleBuildController.run(GradleBuildController.java:71)
14:44:25.152 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:28)
14:44:25.152 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
14:44:25.153 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:41)
14:44:25.153 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:26)
14:44:25.153 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:75)
14:44:25.153 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:49)
14:44:25.153 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.tooling.internal.provider.ServicesSetupBuildActionExecuter.execute(ServicesSetupBuildActionExecuter.java:44)
14:44:25.153 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.tooling.internal.provider.ServicesSetupBuildActionExecuter.execute(ServicesSetupBuildActionExecuter.java:29)
14:44:25.153 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:67)
14:44:25.153 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
14:44:25.153 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
14:44:25.154 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:47)
14:44:25.154 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
14:44:25.154 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:26)
14:44:25.154 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
14:44:25.154 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.java:34)
14:44:25.154 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
14:44:25.154 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:74)
14:44:25.154 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:72)
14:44:25.154 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.util.Swapper.swap(Swapper.java:38)
14:44:25.154 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:72)
14:44:25.154 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
14:44:25.154 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.daemon.server.exec.LogAndCheckHealth.execute(LogAndCheckHealth.java:55)
14:44:25.155 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
14:44:25.155 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:60)
14:44:25.155 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
14:44:25.155 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
14:44:25.155 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:72)
14:44:25.155 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
14:44:25.155 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
14:44:25.155 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:50)
14:44:25.155 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:297)
14:44:25.155 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54)
14:44:25.156 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40)
14:44:25.156 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Caused by: java.lang.NullPointerException
14:44:25.156 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at com.android.ide.common.process.ProcessInfoBuilder.setExecutable(ProcessInfoBuilder.java:97)
14:44:25.156 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at com.android.build.gradle.internal.transforms.StripDebugSymbolTransform.stripFile(StripDebugSymbolTransform.java:223)
14:44:25.156 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at com.android.build.gradle.internal.transforms.StripDebugSymbolTransform.transform(StripDebugSymbolTransform.java:187)
14:44:25.156 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at com.android.build.gradle.internal.pipeline.TransformTask$2.call(TransformTask.java:185)
14:44:25.156 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at com.android.build.gradle.internal.pipeline.TransformTask$2.call(TransformTask.java:181)
14:44:25.156 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:102)
14:44:25.156 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at com.android.build.gradle.internal.pipeline.TransformTask.transform(TransformTask.java:176)
14:44:25.156 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)
14:44:25.157 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$IncrementalTaskAction.doExecute(DefaultTaskClassInfoStore.java:163)
14:44:25.157 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:134)
14:44:25.157 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:123)
14:44:25.157 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:95)
14:44:25.157 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:76)
14:44:25.157 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   ... 70 more
14:44:25.157 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
14:44:25.158 [LIFECYCLE] [org.gradle.internal.buildevents.BuildResultLogger]
14:44:25.158 [LIFECYCLE] [org.gradle.internal.buildevents.BuildResultLogger] BUILD FAILED
14:44:25.158 [LIFECYCLE] [org.gradle.internal.buildevents.BuildResultLogger]
14:44:25.158 [LIFECYCLE] [org.gradle.internal.buildevents.BuildResultLogger] Total time: 38.651 secs
14:44:25.273 [INFO] [org.gradle.api.Project] PREDEX CACHE HITS:   2
14:44:25.273 [INFO] [org.gradle.api.Project] PREDEX CACHE MISSES: 1

请注意,StgQa中的assembleStgQa是构建变体名称。

如何修复此异常?

编辑:

的build.gradle

apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
apply plugin: 'realm-android'

repositories {
    maven {
        url 'https://maven.fabric.io/public'
    }
}

android {
    compileSdkVersion '"Symbol Technologies LLC":EMDK 4.2 (API 19):19'
    buildToolsVersion "25.0.2"

    defaultConfig {
        applicationId "com.company.handset"
        minSdkVersion 19
        targetSdkVersion 25
        versionCode 220001
        versionName "22.0.0"
        buildConfigField 'String', 'CLIENT_CREDENTIALS_USERNAME', '"xxx"'
        buildConfigField 'String', 'CLIENT_CREDENTIALS_PASSWORD', '"xxx"'
        buildConfigField 'boolean', 'DISABLE_CRASHLYTICS', 'false'
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_7
        targetCompatibility JavaVersion.VERSION_1_7
    }

    signingConfigs {
        debug {
            storeFile file("../store/debug.keystore")
            storePassword "xxx"
            keyAlias "xxx"
            keyPassword "xxx"
        }
        qa {
            storeFile file("../store/debug.keystore")
            storePassword "xxx"
            keyAlias "xxx"
            keyPassword "xxx"
        }
        release {
            storeFile file("../store/release.keystore")
            storePassword "xxx"
            keyAlias "xxx"
            keyPassword "xxx"
        }
    }

    buildTypes {
        debug {
            debuggable true
            zipAlignEnabled true
            minifyEnabled false
            shrinkResources false
            buildConfigField 'boolean', 'DISABLE_CRASHLYTICS', 'true'
            ext.enableCrashlytics = false
            signingConfig signingConfigs.debug
        }
        qa {
            debuggable true
            zipAlignEnabled true
            minifyEnabled false
            shrinkResources false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules-qa.pro'
            signingConfig signingConfigs.debug
        }
        release {
            debuggable false
            zipAlignEnabled true
            minifyEnabled false
            shrinkResources false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            signingConfig signingConfigs.release
        }
    }

    productFlavors {
        dev {
            applicationId "com.company.handset.dev"
        }
        stg {
            applicationId "com.company.handset.stg"
        }
        tst {
            applicationId "com.company.handset.tst"
        }
        prod {
            applicationId "com.company.handset"
            buildConfigField 'String', 'CLIENT_CREDENTIALS_USERNAME', '"xxx"'
            buildConfigField 'String', 'CLIENT_CREDENTIALS_PASSWORD', '"xxx"'
        }
    }
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    debugCompile project(path: ':shoppingSDK', configuration: 'debug')
    qaCompile project(path: ':shoppingSDK', configuration: 'debug')
    releaseCompile project(path: ':shoppingSDK', configuration: 'release')
    compile 'com.android.support:support-v4:25.3.0'
    // networking through cradle
    compile files('libs/wmqtt.jar')
    // Adobe Analytics
    compile files('libs/adobeMobileLibrary-4.11.0.jar')
    // Download and Cache images
    compile 'com.squareup.picasso:picasso:2.5.2'
    // Barcode scanner
    compile 'com.journeyapps:zxing-android-embedded:3.0.3@aar'
    compile 'com.google.zxing:core:3.2.1'
    // Butter knife (View injection)
    compile 'com.jakewharton:butterknife:7.0.1'
    // do not update butterknife to ver 8
    // crash reporting system (requires fabric)
    compile('com.crashlytics.sdk.android:crashlytics:2.6.5@aar') {
        transitive = true;
    }
    testCompile 'junit:junit:4.12'
    testCompile 'org.mockito:mockito-core:2.+'
}

2 个答案:

答案 0 :(得分:5)

我已经通过以下方式解决了这个问题:

build.gradle(app)中的

1)降级为使用buildToolsVersion '23.0.3'

build.gradle(project)中的

2)降级为classpath 'com.android.tools.build:gradle:2.1.2'

gradle-wrapper.properties中的

3)降级为gradle 2.10 distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip

更新6月7日,这也有效:

1)已更新至最新的Android Studio 2.3.2

A.S.中的

2),点击文件 - &gt;项目结构 - &gt;记下“Android NDK位置”的目录路径并打开该文件夹。走出/ sdk /文件夹并删除“ndk-bundle”文件夹。由于所有文件,这需要一些时间。

3)返回A.S.,删除“Android NDK位置”路径 - &gt;单击确定

4)重建项目并在没有恼人的构建错误的情况下进行部署。

7月11日更新:更多可能的修复......

1)更新以预览Android Studio 2.4

2)将compileVersion和TargetSdkVersion设置为25

答案 1 :(得分:0)

使用相同的基本问题transformNativeLibsWithStripDebugSymbolFor<flavor><type?Debug:Release>失败

结束重新安装Android Studio,SDK和NDK,然后终于能够重建。