我正在尝试使用Tinker。当我使用Gradle订单“ buildTinkerPatchRelease”时,但是启动后出现了问题。并且停止了。
在类型为com.android.build.gradle.internal.res.LinkApplicationAndroidResourcesTask的任务':app:processReleaseResources'上找不到参数[]的方法getAaptOptions()。
因此,我无法制作补丁APK来继续Tinker。
”“我尝试更改buildToolsVersion并更新我的buildTool,最新版本为29.0.2,但仍然无法正常工作。 “
> Task :app:preBuild UP-TO-DATE
> Task :app:preReleaseBuild UP-TO-DATE
> Task :app:compileReleaseAidl NO-SOURCE
> Task :app:checkReleaseManifest
> Task :app:compileReleaseRenderscript NO-SOURCE
> Task :app:generateReleaseBuildConfig
> Task :app:mainApkListPersistenceRelease
> Task :app:generateReleaseResValues
> Task :app:generateReleaseResources
> Task :app:createReleaseCompatibleScreenManifests
> Task :app:processReleaseManifest
C:\Users\ODM\Documents\GitHub\android-databinding\TinkerDemo\app\src\main\AndroidManifest.xml:23:9-27:56 Warning:
activity#com.tencent.bugly.beta.ui.BetaActivity@tools:name was tagged at AndroidManifest.xml:23 to replace other declarations but no other declaration present
C:\Users\ODM\Documents\GitHub\android-databinding\TinkerDemo\app\src\main\AndroidManifest.xml:23:9-27:56 Warning:
activity#com.tencent.bugly.beta.ui.BetaActivity@tools:configChanges was tagged at AndroidManifest.xml:23 to replace other declarations but no other declaration present
C:\Users\ODM\Documents\GitHub\android-databinding\TinkerDemo\app\src\main\AndroidManifest.xml:23:9-27:56 Warning:
activity#com.tencent.bugly.beta.ui.BetaActivity@tools:theme was tagged at AndroidManifest.xml:23 to replace other declarations but no other declaration present
C:\Users\ODM\Documents\GitHub\android-databinding\TinkerDemo\app\src\main\AndroidManifest.xml:29:9-39:20 Warning:
provider#com.tencent.bugly.beta.utils.BuglyFileProvider@tools:name was tagged at AndroidManifest.xml:29 to replace other declarations but no other declaration present
C:\Users\ODM\Documents\GitHub\android-databinding\TinkerDemo\app\src\main\AndroidManifest.xml:29:9-39:20 Warning:
provider#com.tencent.bugly.beta.utils.BuglyFileProvider@tools:authorities was tagged at AndroidManifest.xml:29 to replace other declarations but no other declaration present
C:\Users\ODM\Documents\GitHub\android-databinding\TinkerDemo\app\src\main\AndroidManifest.xml:29:9-39:20 Warning:
provider#com.tencent.bugly.beta.utils.BuglyFileProvider@tools:exported was tagged at AndroidManifest.xml:29 to replace other declarations but no other declaration present
C:\Users\ODM\Documents\GitHub\android-databinding\TinkerDemo\app\src\main\AndroidManifest.xml:29:9-39:20 Warning:
provider#com.tencent.bugly.beta.utils.BuglyFileProvider@tools:grantUriPermissions was tagged at AndroidManifest.xml:29 to replace other declarations but no other declaration present
C:\Users\ODM\Documents\GitHub\android-databinding\TinkerDemo\app\src\main\AndroidManifest.xml Warning:
meta-data#android.support.FILE_PROVIDER_PATHS@tools:name was tagged at AndroidManifest.xml:0 to replace other declarations but no other declaration present
C:\Users\ODM\Documents\GitHub\android-databinding\TinkerDemo\app\src\main\AndroidManifest.xml Warning:
meta-data#android.support.FILE_PROVIDER_PATHS@tools:resource was tagged at AndroidManifest.xml:0 to replace other declarations but no other declaration present
> Task :app:tinkerProcessReleaseManifest
tinker add tinker_id_patch-1.0.0 to your AndroidManifest.xml C:\Users\ODM\Documents\GitHub\android-databinding\TinkerDemo\app\build\intermediates\merged_manifests\release\AndroidManifest.xml
tinker add com.example.odm.tinkerdemo.application.MyApplication to dex loader pattern
tinker gen AndroidManifest.xml in build/intermediates/tinker_intermediates/AndroidManifest.xml
> Task :app:tinkerProcessReleaseResourceId
we build app apk with apply resource mapping file C:\Users\ODM\Documents\GitHub\android-databinding\TinkerDemo\app\build\bakApk/app-0915-20-24-52/app-release-R.txt
> Task :app:tinkerSupportProcessReleaseManifest
manifestPath: C:\Users\ODM\Documents\GitHub\android-databinding\TinkerDemo\app\build\intermediates\merged_manifests\release\AndroidManifest.xml
app version:1.0.0.1
Remove TINKER_ID tinker_id_patch-1.0.0
tinkerSupport add com.example.odm.tinkerdemo.application.MyApplication to dex loader pattern
tinkerSupport gen AndroidManifest.xml in build/intermediates/bugly_intermediates/AndroidManifest.xml
> Task :app:mergeReleaseResources
> Task :app:processReleaseResources FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processReleaseResources'.
> Could not find method getAaptOptions() for arguments [] on task ':app:processReleaseResources' of type com.android.build.gradle.internal.res.LinkApplicationAndroidResourcesTask.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
我希望我可以解决该问题!有人可以帮我吗?
答案 0 :(得分:0)
您可以尝试一下, 依赖项{
classpath 'com.tencent.bugly:tinker-support:1.2.0'
}
答案 1 :(得分:0)
应用构建等级:
implementation 'com.tencent.tinker:tinker-android-lib:1.9.14'
root buildgradle:
classpath 'com.android.tools.build:gradle:3.5.1'
classpath "com.tencent.bugly:tinker-support:1.2.0"
希望有帮助吗?