有人可以告诉我为什么这样做什么都没有?我已经搞了两天了。永远不会打印文本,永远不会运行copyAAR。应该这么简单,但显然我错过了一些东西。这是一个主要" app"和一个名为" MY_Library"的模块。此代码位于My_Library的build.gradle文件中。谢谢!
Set Wb1 = Workbooks(Wb1name)
Sheetname = Wb1.ActiveSheet.Name
Set Wb2 = Workbooks("Worksheet2.xlsm")
'Find the last non-blank cell in row 1
l1Col = Wb1.Worksheets(Sheetname).Cells(1, Columns.Count).End(xlToLeft).Column
l1Row = Wb1.Worksheets(Sheetname).Cells(Rows.Count, 1).End(xlUp).Row
l2Col = Wb2.Worksheets(Sheetname).Cells(1, Columns.Count).End(xlToLeft).Column
l2Row = Wb2.Worksheets(Sheetname).Cells(Rows.Count, 1).End(xlUp).Row
For i = 1 To l1Col
For j = 1 To l2Col
If " " & Wb1.Worksheets(Sheetname).Cells(1, i).Value = Wb2.Worksheets(Sheetname).Cells(1, j).Value Then
'''If header matches in both excels then copy column to destination excel'''
'This is working but entire column copied
Wb2.Worksheets(Sheetname).Columns(j).Copy Destination:=Wb1.Worksheets(Sheetname).Columns(i)
'' This dosent work
'Wb2.Worksheets(Sheetname).Range(Cells(2, j), Cells(l2Row, j)).Copy Destination:=Wb1.Worksheets(Sheetname).Range(Cells(2, i), Cells(l1Row, i))
End If
Next j
Next i
也尝试过:
task copyAAR(dependsOn:'assembleDebug') << {
println "++++++ AAR COPIED ++++++: "
}
执行任务:[:MY_Library:assembleDebug]
按需配置并行执行是一项孵化功能。 不推荐使用Task.leftShift(Closure)方法,并计划在Gradle 5.0中删除它。请改用Task.doLast(Action)。 在build_bxaa81mwx93hvs7njvdit9vtz $ _run_closure1.doCall(C:\ zzz \ zzz \ zzz \ zzz \ MY_Library \ build.gradle:19) (使用--stacktrace运行以获取此弃用警告的完整堆栈跟踪。) :MY_Library:preBuild UP-TO-DATE :MY_Library:preDebugBuild UP-TO-DATE :MY_Library:compileDebugAidl UP-TO-DATE :MY_Library:compileDebugRenderscript UP-TO-DATE :MY_Library:checkDebugManifest UP-TO-DATE :MY_Library:generateDebugBuildConfig UP-TO-DATE :MY_Library:generateDebugResValues UP-TO-DATE :MY_Library:generateDbugResources UP-TO-DATE :MY_Library:packageDebugResources UP-TO-DATE :MY_Library:platformAttrExtractor UP-TO-DATE :MY_Library:processDebugManifest UP-TO-DATE :MY_Library:generateDebugRFile UP-TO-DATE :MY_Library:prepareLintJar UP-TO-DATE :MY_Library:generateDebugSources UP-TO-DATE :MY_Library:javaPreCompileDebug UP-TO-DATE :MY_Library:compileDebugJavaWithJavac UP-TO-DATE :MY_Library:extractDebugAnnotations UP-TO-DATE :MY_Library:mergeDebugConsumerProguardFiles UP-TO-DATE :MY_Library:mergeDebugShaders UP-TO-DATE :MY_Library:compileDebugShaders UP-TO-DATE :MY_Library:generateDebugAssets UP-TO-DATE :MY_Library:packageDebugAssets UP-TO-DATE :MY_Library:packageDebugRenderscript NO-SOURCE :MY_Library:processDebugJavaRes NO-SOURCE :MY_Library:transformResourcesWithMergeJavaResForDebug UP-TO-DATE :MY_Library:transformClassesAndResourcesWithSyncLibJarsForDebug UP-TO-DATE :MY_Library:compileDebugNdk NO-SOURCE :MY_Library:mergeDebugJniLibFolders UP-TO-DATE :MY_Library:transformNativeLibsWithMergeJniLibsForDebug UP-TO-DATE :MY_Library:transformNativeLibsWithSyncJniLibsForDebug UP-TO-DATE :MY_Library:bundleDebug UP-TO-DATE :MY_Library:compileDebugSources UP-TO-DATE :MY_Library:assembleDebug UP-TO-DATE
在0s内建立成功 23个可操作的任务:23个最新的
答案 0 :(得分:0)
嗯,我开始工作的唯一方法是:
afterEvaluate {
assembleDebug.finalizedBy(copyAAR)
}
为什么其他方式不起作用?!?!?