gradle运行ransformClassesWithProfilers只能编译apk问题


* What went wrong:
Execution failed for task ':childgit:app:transformClassesWithProfilers-transformForDebug'.
> java.lang.NullPointerException (no error message)

* Try:

这个问题比较难搞,因为看不到任何错误,也不能通过清除无效缓存,或者重启电脑、或者重新编译、或者--info 或者--,或者--debug,或者--stackflow 或者--忘记了或者查看idea.log/或者查看项目目录错误文件或者修改gradle版本来辨别问题,不过又一个关键的信息,它出现的错误所处gradle任务为childgit:app:transformClassesWithProfilers
关键词profilers剖析,我最近做了一个操作就是分析oom,但是特么没分析出来只看到了内存暴涨和字符串飙升,也没有具体错误,后面发现日至控制台有一个红色的东西告诉我在哪一行才找到错误的。。。
所以根据这个任务名百度了一下发现也有人提问。但是我特么是犹豫了很久才选择百度的,因为着实没有具体错误信息啊,不知道百度应该如何百度了,就纠结了1个多小时啊,以后无解了,就谷歌提了问。然后躺了一下 然后决定百度看看
https://stackoverflow.com/questions/46969033/apptransform-classes-with-profilers-transform-for-debug-failed?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa
具体错误信息报告

https://issuetracker.google.com/issues/79668901

《gradle运行ransformClassesWithProfilers只能编译apk问题》 image.png

最后解决办法是取消勾选

Executing tasks: [:childgit:app:assembleDebug]

WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation'.
It will be removed at the end of 2018
WARNING: Configuration 'androidTestCompile' is obsolete and has been replaced with 'androidTestImplementation'.
It will be removed at the end of 2018
WARNING: Configuration 'androidTestApi' is obsolete and has been replaced with 'androidTestImplementation'.
It will be removed at the end of 2018
WARNING: Configuration 'testCompile' is obsolete and has been replaced with 'testImplementation'.
It will be removed at the end of 2018
WARNING: Configuration 'testApi' is obsolete and has been replaced with 'testImplementation'.
It will be removed at the end of 2018
Could not find google-services.json while looking in [src/nullnull/debug, src/debug/nullnull, src/nullnull, src/debug, src/nullnullDebug]
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
Could not find google-services.json while looking in [src/nullnull/release, src/release/nullnull, src/nullnull, src/release, src/nullnullRelease]
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
:robot_sdk:compileJava UP-TO-DATE
:robot_sdk:processResources NO-SOURCE
:robot_sdk:classes UP-TO-DATE
:robot_sdk:jar UP-TO-DATE
:childgit:app:preBuild UP-TO-DATE
:childgit:customcrashlibrary:preBuild UP-TO-DATE
:childgit:customcrashlibrary:preDebugBuild UP-TO-DATE
:childgit:customcrashlibrary:checkDebugManifest UP-TO-DATE
:childgit:customcrashlibrary:processDebugManifest UP-TO-DATE
:childgit:robotbiz:preBuild UP-TO-DATE
:childgit:robotbiz:preDebugBuild UP-TO-DATE
:childgit:robotbiz:checkDebugManifest UP-TO-DATE
:childgit:robotbiz:processDebugManifest UP-TO-DATE
:childgit:app:preDebugBuild UP-TO-DATE
:childgit:customcrashlibrary:compileDebugAidl UP-TO-DATE
:childgit:robotbiz:compileDebugAidl UP-TO-DATE
:childgit:app:compileDebugAidl UP-TO-DATE
:childgit:customcrashlibrary:packageDebugRenderscript NO-SOURCE
:childgit:robotbiz:packageDebugRenderscript NO-SOURCE
:childgit:app:compileDebugRenderscript UP-TO-DATE
:childgit:app:generateDebugResValues UP-TO-DATE
:childgit:app:generateDebugResources UP-TO-DATE
:childgit:app:processDebugGoogleServices
Parsing json file: /Users/aaa/Documents/dev/robot_project/childgit/app/google-services.json
:childgit:customcrashlibrary:compileDebugRenderscript UP-TO-DATE
:childgit:customcrashlibrary:generateDebugResValues UP-TO-DATE
:childgit:customcrashlibrary:generateDebugResources UP-TO-DATE
:childgit:customcrashlibrary:packageDebugResources UP-TO-DATE
:childgit:robotbiz:compileDebugRenderscript UP-TO-DATE
:childgit:robotbiz:generateDebugResValues UP-TO-DATE
:childgit:robotbiz:generateDebugResources UP-TO-DATE
:childgit:robotbiz:packageDebugResources UP-TO-DATE
:childgit:app:mergeDebugResources UP-TO-DATE
:childgit:app:transformDataBindingBaseClassLogWithDataBindingMergeGenClassesForDebug UP-TO-DATE
:childgit:app:dataBindingGenBaseClassesDebug UP-TO-DATE
:childgit:app:checkDebugManifest UP-TO-DATE
:childgit:app:generateDebugBuildConfig
:childgit:app:prepareLintJar UP-TO-DATE
:childgit:app:mainApkListPersistenceDebug UP-TO-DATE
:childgit:app:createDebugCompatibleScreenManifests UP-TO-DATE
:childgit:app:processDebugManifest
:childgit:app:splitsDiscoveryTaskDebug UP-TO-DATE
:childgit:customcrashlibrary:platformAttrExtractor UP-TO-DATE
:childgit:customcrashlibrary:generateDebugRFile UP-TO-DATE
:childgit:robotbiz:platformAttrExtractor UP-TO-DATE
:childgit:robotbiz:generateDebugRFile UP-TO-DATE
:childgit:app:processDebugResources UP-TO-DATE
:childgit:app:generateDebugSources
:childgit:customcrashlibrary:generateDebugBuildConfig UP-TO-DATE
:childgit:customcrashlibrary:prepareLintJar UP-TO-DATE
:childgit:customcrashlibrary:generateDebugSources UP-TO-DATE
:childgit:customcrashlibrary:javaPreCompileDebug UP-TO-DATE
:childgit:customcrashlibrary:compileDebugJavaWithJavac UP-TO-DATE
:childgit:customcrashlibrary:processDebugJavaRes NO-SOURCE
:childgit:customcrashlibrary:transformClassesAndResourcesWithPrepareIntermediateJarsForDebug UP-TO-DATE
:childgit:robotbiz:generateDebugBuildConfig UP-TO-DATE
:childgit:robotbiz:prepareLintJar UP-TO-DATE
:childgit:robotbiz:generateDebugSources UP-TO-DATE
:childgit:robotbiz:javaPreCompileDebug UP-TO-DATE
:childgit:robotbiz:compileDebugJavaWithJavac UP-TO-DATE
:childgit:robotbiz:processDebugJavaRes NO-SOURCE
:childgit:robotbiz:transformClassesAndResourcesWithPrepareIntermediateJarsForDebug UP-TO-DATE
:childgit:app:dataBindingExportBuildInfoDebug
:childgit:app:javaPreCompileDebug UP-TO-DATE
:childgit:app:transformDataBindingWithDataBindingMergeArtifactsForDebug UP-TO-DATE
注: 某些输入文件使用或覆盖了已过时的 API。
注: 有关详细信息, 请使用 -Xlint:deprecation 重新编译。
注: 某些输入文件使用了未经检查或不安全的操作。
注: 有关详细信息, 请使用 -Xlint:unchecked 重新编译。
:childgit:app:compileDebugJavaWithJavac
:childgit:app:compileDebugNdk NO-SOURCE
:childgit:app:compileDebugSources
:childgit:app:mergeDebugShaders UP-TO-DATE
:childgit:app:compileDebugShaders UP-TO-DATE
:childgit:app:generateDebugAssets UP-TO-DATE
:childgit:customcrashlibrary:mergeDebugShaders UP-TO-DATE
:childgit:customcrashlibrary:compileDebugShaders UP-TO-DATE
:childgit:customcrashlibrary:generateDebugAssets UP-TO-DATE
:childgit:customcrashlibrary:packageDebugAssets UP-TO-DATE
:childgit:robotbiz:mergeDebugShaders UP-TO-DATE
:childgit:robotbiz:compileDebugShaders UP-TO-DATE
:childgit:robotbiz:generateDebugAssets UP-TO-DATE
:childgit:robotbiz:packageDebugAssets UP-TO-DATE
:childgit:app:mergeDebugAssets UP-TO-DATE
:childgit:app:transformClassesWithDexBuilderForDebug
:childgit:app:transformDexArchiveWithExternalLibsDexMergerForDebug
:childgit:app:transformDexArchiveWithDexMergerForDebug
:childgit:app:mergeDebugJniLibFolders UP-TO-DATE
:childgit:customcrashlibrary:compileDebugNdk NO-SOURCE
:childgit:customcrashlibrary:mergeDebugJniLibFolders UP-TO-DATE
:childgit:customcrashlibrary:transformNativeLibsWithMergeJniLibsForDebug UP-TO-DATE
:childgit:customcrashlibrary:transformNativeLibsWithStripDebugSymbolForDebug UP-TO-DATE
:childgit:customcrashlibrary:transformNativeLibsWithIntermediateJniLibsForDebug UP-TO-DATE
:childgit:robotbiz:compileDebugNdk NO-SOURCE
:childgit:robotbiz:mergeDebugJniLibFolders UP-TO-DATE
:childgit:robotbiz:transformNativeLibsWithMergeJniLibsForDebug UP-TO-DATE
:childgit:robotbiz:transformNativeLibsWithStripDebugSymbolForDebug UP-TO-DATE
:childgit:robotbiz:transformNativeLibsWithIntermediateJniLibsForDebug UP-TO-DATE
:childgit:app:transformNativeLibsWithMergeJniLibsForDebug
:childgit:app:transformNativeLibsWithStripDebugSymbolForDebug
:childgit:app:processDebugJavaRes UP-TO-DATE
:childgit:app:transformResourcesWithMergeJavaResForDebug
:childgit:app:validateSigningDebug UP-TO-DATE
:childgit:app:packageDebug
:childgit:app:assembleDebug
    原文作者:情随事迁666
    原文地址: https://www.jianshu.com/p/036a14dac967
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞