Closed dlmu2001 closed 7 years ago
Gradle console输出如下,仍然没有看到tinker_patch目录和log
Executing tasks: [:app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies, :base:generateReleaseSources, :base:prepareReleaseUnitTestDependencies, :base:mockableAndroidJar, :lib:generateReleaseSources, :lib:prepareReleaseUnitTestDependencies, :lib:mockableAndroidJar]
Configuration on demand is an incubating feature.
WARNING: The android.dexOptions.incremental
property is deprecated and it has no effect on the build process.
WARNING: The android.dexOptions.incremental
property is deprecated and it has no effect on the build process.
WARNING: The android.dexOptions.incremental
property is deprecated and it has no effect on the build process.
Incremental java compilation is an incubating feature.
----------------------tinker build warning ------------------------------------ tinker auto operation: excluding annotation processor and source template from app packaging. Enable dx jumboMode to reduce package size. enable dx jumboMode to reduce package size. disable preDexLibraries to prevent ClassDefNotFoundException when your app is booting.
tinker will change your build configs: we will add TINKER_ID=d5b3a1 in your build output manifest file build/intermediates/manifests/full/*
if minifyEnabled is true you will find the gen proguard rule file at build/intermediates/tinker_intermediates/tinker_proguard.pro and we will help you to put it in the proguardFiles.
if multiDexEnabled is true you will find the gen multiDexKeepProguard file at build/intermediates/tinker_intermediates/tinker_multidexkeep.pro and we will help you to put it in the MultiDexKeepProguardFile.
:app:preBuild UP-TO-DATE :app:preDebugBuild UP-TO-DATE :app:checkDebugManifest :app:preReleaseBuild UP-TO-DATE :base:preBuild UP-TO-DATE :base:preReleaseBuild UP-TO-DATE :base:checkReleaseManifest :base:preDebugAndroidTestBuild UP-TO-DATE :base:preDebugBuild UP-TO-DATE :base:preDebugUnitTestBuild UP-TO-DATE :base:preReleaseUnitTestBuild UP-TO-DATE :base:prepareComAndroidSupportMultidex101Library UP-TO-DATE :base:prepareComTencentTinkerTinkerAndroidLib177Library UP-TO-DATE :base:prepareComTencentTinkerTinkerAndroidLoader177Library UP-TO-DATE :base:prepareReleaseDependencies :base:compileReleaseAidl UP-TO-DATE :base:compileLint UP-TO-DATE :base:copyReleaseLint UP-TO-DATE :base:mergeReleaseShaders UP-TO-DATE :base:compileReleaseShaders UP-TO-DATE :base:generateReleaseAssets UP-TO-DATE :base:mergeReleaseAssets UP-TO-DATE :base:mergeReleaseProguardFiles UP-TO-DATE :base:packageReleaseRenderscript UP-TO-DATE :base:compileReleaseRenderscript UP-TO-DATE :base:generateReleaseResValues UP-TO-DATE :base:generateReleaseResources UP-TO-DATE :base:packageReleaseResources UP-TO-DATE :base:processReleaseManifest UP-TO-DATE :base:bundleRelease UP-TO-DATE :lib:preBuild UP-TO-DATE :lib:preReleaseBuild UP-TO-DATE :lib:checkReleaseManifest :lib:preDebugAndroidTestBuild UP-TO-DATE :lib:preDebugBuild UP-TO-DATE :lib:preDebugUnitTestBuild UP-TO-DATE :lib:preReleaseUnitTestBuild UP-TO-DATE :lib:prepareAlibc_trade_sdk3115Library UP-TO-DATE :lib:prepareComAliAuthSdkAlibabauth_ui1105Library UP-TO-DATE :lib:prepareComAndroidSupportAppcompatV72301Library UP-TO-DATE :lib:prepareComAndroidSupportMultidex101Library UP-TO-DATE :lib:prepareComAndroidSupportRecyclerviewV72301Library UP-TO-DATE :lib:prepareComAndroidSupportSupportV42321Library UP-TO-DATE :lib:prepareComFacebookFrescoDrawee0110Library UP-TO-DATE :lib:prepareComFacebookFrescoFbcore0110Library UP-TO-DATE :lib:prepareComFacebookFrescoFresco0110Library UP-TO-DATE :lib:prepareComFacebookFrescoImagepipeline0110Library UP-TO-DATE :lib:prepareComFacebookFrescoImagepipelineBase0110Library UP-TO-DATE :lib:prepareComFacebookFrescoImagepipelineOkhttp30110Library UP-TO-DATE :lib:prepareComFacebookReactReactNative0330Library UP-TO-DATE :lib:prepareComFacebookSoloaderSoloader010Library UP-TO-DATE :lib:prepareComTaobaoAndroidSecuritybodyaar35125Library UP-TO-DATE :lib:prepareComTaobaoAndroidSecurityguardaar35181Library UP-TO-DATE :lib:prepareComTencentTinkerTinkerAndroidLib177Library UP-TO-DATE :lib:prepareComTencentTinkerTinkerAndroidLoader177Library UP-TO-DATE :lib:prepareDidi_sdk_for_common_v110_12_08Library UP-TO-DATE :lib:prepareOrgWebkitAndroidJscR174650Library UP-TO-DATE :lib:prepareTrunkBaseUnspecifiedReleaseLibrary UP-TO-DATE :lib:prepareXiaonengchatLibrary UP-TO-DATE :lib:prepareReleaseDependencies :lib:compileReleaseAidl UP-TO-DATE :lib:compileLint UP-TO-DATE :lib:copyReleaseLint UP-TO-DATE :lib:mergeReleaseShaders UP-TO-DATE :lib:compileReleaseShaders UP-TO-DATE :lib:generateReleaseAssets UP-TO-DATE :lib:mergeReleaseAssets UP-TO-DATE :lib:mergeReleaseProguardFiles UP-TO-DATE :lib:packageReleaseRenderscript UP-TO-DATE :lib:compileReleaseRenderscript UP-TO-DATE :lib:generateReleaseResValues UP-TO-DATE :lib:generateReleaseResources UP-TO-DATE :lib:packageReleaseResources UP-TO-DATE :lib:processReleaseManifest UP-TO-DATE :lib:bundleRelease UP-TO-DATE :app:prepareAlibc_trade_sdk3115Library UP-TO-DATE :app:prepareComAliAuthSdkAlibabauth_ui1105Library UP-TO-DATE :app:prepareComAndroidSupportAppcompatV72311Library UP-TO-DATE :app:preDebugAndroidTestBuild UP-TO-DATE :app:prepareComAndroidSupportMultidex101Library UP-TO-DATE :app:prepareComAndroidSupportRecyclerviewV72301Library UP-TO-DATE :app:prepareComAndroidSupportSupportV42321Library UP-TO-DATE :app:prepareComFacebookFrescoDrawee0110Library UP-TO-DATE :app:prepareComFacebookFrescoFbcore0110Library UP-TO-DATE :app:prepareComFacebookFrescoFresco0110Library UP-TO-DATE :app:prepareComFacebookFrescoImagepipeline0110Library UP-TO-DATE :app:prepareComFacebookFrescoImagepipelineBase0110Library UP-TO-DATE :app:prepareComFacebookFrescoImagepipelineOkhttp30110Library UP-TO-DATE :app:prepareComFacebookReactReactNative0330Library UP-TO-DATE :app:prepareComFacebookSoloaderSoloader010Library UP-TO-DATE :app:prepareComTaobaoAndroidSecuritybodyaar35125Library UP-TO-DATE :app:prepareComTaobaoAndroidSecurityguardaar35181Library UP-TO-DATE :app:prepareComTencentTinkerTinkerAndroidLib177Library UP-TO-DATE :app:prepareComTencentTinkerTinkerAndroidLoader177Library UP-TO-DATE :app:prepareDidi_sdk_for_common_v110_12_08Library UP-TO-DATE :app:prepareOrgWebkitAndroidJscR174650Library UP-TO-DATE :app:prepareTrunkBaseUnspecifiedReleaseLibrary UP-TO-DATE :app:prepareTrunkLibUnspecifiedReleaseLibrary UP-TO-DATE :app:prepareXiaonengchatLibrary UP-TO-DATE :app:prepareDebugDependencies :app:compileDebugAidl UP-TO-DATE :app:compileDebugRenderscript UP-TO-DATE :app:generateDebugBuildConfig UP-TO-DATE :app:generateDebugResValues UP-TO-DATE :app:generateDebugResources UP-TO-DATE :app:mergeDebugResources UP-TO-DATE :app:processDebugManifest :app:tinkerProcessDebugManifest tinker add tinker_id_d5b3a1 to your AndroidManifest.xml /home/tom/fanli/fanli_app/trunk/app/build/intermediates/manifests/full/debug/AndroidManifest.xml tinker add com.fanli.android.application.NormalFanliApplication to dex loader pattern tinker add com.tencent.tinker.loader.* to dex loader pattern tinker gen AndroidManifest.xml in build/intermediates/tinker_intermediates/AndroidManifest.xml
:app:tinkerProcessDebugResourceId apply resource mapping file /home/tom/fanli/fanli_app/trunk/app/build/bakApk/ is illegal, just ignore
:app:processDebugResources :app:generateDebugSources :app:prepareComAndroidSupportMultidexInstrumentation101Library UP-TO-DATE :app:prepareDebugAndroidTestDependencies :app:compileDebugAndroidTestAidl UP-TO-DATE :app:processDebugAndroidTestManifest UP-TO-DATE :app:compileDebugAndroidTestRenderscript UP-TO-DATE :app:generateDebugAndroidTestBuildConfig UP-TO-DATE :app:generateDebugAndroidTestResValues UP-TO-DATE :app:generateDebugAndroidTestResources UP-TO-DATE :app:mergeDebugAndroidTestResources UP-TO-DATE :app:processDebugAndroidTestResources UP-TO-DATE :app:generateDebugAndroidTestSources UP-TO-DATE :app:mockableAndroidJar UP-TO-DATE :app:preDebugUnitTestBuild UP-TO-DATE :app:prepareDebugUnitTestDependencies :base:generateReleaseBuildConfig UP-TO-DATE :base:mergeReleaseResources UP-TO-DATE :base:processReleaseResources UP-TO-DATE :base:generateReleaseSources UP-TO-DATE :base:prepareReleaseUnitTestDependencies :base:mockableAndroidJar UP-TO-DATE :lib:generateReleaseBuildConfig UP-TO-DATE :lib:mergeReleaseResources UP-TO-DATE :lib:processReleaseResources UP-TO-DATE :lib:generateReleaseSources UP-TO-DATE :lib:prepareReleaseUnitTestDependencies :lib:mockableAndroidJar UP-TO-DATE
BUILD SUCCESSFUL
Total time: 2.62 secs
搞定了,是我自己设置的问题
你好,请问是什么问题?我这边也是不能生成tinkerPatch
环境:ubuntu 14.04 Android Studio 2.2.2 官方的sample可以正常生成patch
我自己的project 执行到 :app:tinkerPatchDebug 1ms
就没有什么更新了 没有在build目录下生成tinkerpatch目录,没有log
请教下,这个有什么思路从哪里查?
gradle配置 apply plugin: 'com.tencent.tinker.patch'
def bakPath = file("${buildDir}/bakApk/")
/**
add apk from the build/bakApk */ ext { //for some reason, you may want to ignore tinkerBuild, such as instant run debug build? tinkerEnabled = true
//for normal build //old apk file to build patch apk tinkerOldApkPath = "${bakPath}/app-release-0209-11-31-37.apk" //proguard mapping file to build patch apk tinkerApplyMappingPath = "${bakPath}/" //resource R.txt to build patch apk, must input if there is resource changed tinkerApplyResourcePath = "${bakPath}/"
//only use for build all flavor, if not, just ignore this field tinkerBuildFlavorDirectory = "${bakPath}/" }
def gitSha() { try { String gitRev = 'git rev-parse --short HEAD'.execute(null, project.rootDir).text.trim() if (gitRev == null) { throw new GradleException("can't get git rev, you should add git to system path or just input test value, such as 'testTinkerId'") } return gitRev } catch (Exception e) { throw new GradleException("can't get git rev, you should add git to system path or just input test value, such as 'testTinkerId'") } }
def javaVersion = JavaVersion.VERSION_1_7 def getOldApkPath() { return hasProperty("OLD_APK") ? OLD_APK : ext.tinkerOldApkPath }
def getApplyMappingPath() { return hasProperty("APPLY_MAPPING") ? APPLY_MAPPING : ext.tinkerApplyMappingPath }
def getApplyResourceMappingPath() { return hasProperty("APPLY_RESOURCE") ? APPLY_RESOURCE : ext.tinkerApplyResourcePath }
def getTinkerIdValue() { return hasProperty("TINKER_ID") ? TINKER_ID : gitSha() }
def buildWithTinker() { return hasProperty("TINKER_ENABLE") ? TINKER_ENABLE : ext.tinkerEnabled }
def getTinkerBuildFlavorDirectory() { return ext.tinkerBuildFlavorDirectory } tinkerPatch { /**
case 5: resources.arsc has changed, but we don't use applyResourceMapping to build */ ignoreWarning = true
/**
we will use the sign config with your build type */ useSign = true
/**
whether use tinker to build */ tinkerEnable = buildWithTinker()
/**
Warning, applyMapping will affect the normal android build! */ buildConfig { /**
It is nice to keep the resource id from R.txt file to reduce java changes */ applyResourceMapping = getApplyResourceMappingPath()
/**
we will gen the tinkerId in your manifest automatic / /tinkerId = getTinkerIdValue()*/ tinkerId = 'd5b3a1'
/**
dex { /**
or you want to save rom or check quicker, you can use raw mode also */ dexMode = "jar"
/**
*/ loader = [ //use sample, let BaseBuildInfo unchangeable with tinker "tinker.sample.android.app.BaseBuildInfo" ] }