Could not find method getAaptOptions() for arguments [] on task - android-gradle-plugin
I am trying to use the Tinker.When I use the Gradle order "buildTinkerPatchRelease",but after it started,something goes wrong.And it stop.
Could not find method getAaptOptions() for arguments [] on task ':app:processReleaseResources' of type com.android.build.gradle.internal.res.LinkApplicationAndroidResourcesTask.
Because of this , I cannot make a patch apk to continue Tinker.
"I've tried change the buildToolsVersion and update my buildTool ,the latest version is 29.0.2,but it still didn't work.
"
> 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.
I expect I can fix the stange problem! May someone can give me a hand?
You can try this,
dependencies {
classpath 'com.tencent.bugly:tinker-support:1.2.0'
}
app buildgradle:
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"
Hope it helps?
Related
How to decipher Erlang runtime error message
When I run an Erlang function using IntelliJ's "Run Configuration", I am getting the following error message. The error message contains lot of nested brackets. Please help me in understanding the message. "C:\Program Files\Erlang OTP\bin\erl.exe" -pa F:/1TB/P/workspace-IntelliJ-Erlang2/netconfClient/out/production/netconfClient -pa F:/1TB/P/workspace-IntelliJ-Erlang2/netconfClient -eval netconfManager:open2(). -s init stop -noshell init terminating in do_boot ({badarg,[{ets,select,[ct_attributes,[_]],[{_}]},{ct_config,get_key_from_name,1,[{_},{_}]},{ct_util,does_connection_exist,3,[{_},{_}]},{ct_gen_conn,do_start,4,[{_},{_}]},{ct_netconfc,open,4,[{_},{_}]},{erl_eval,do_apply,7,[{_},{_}]},{init,start_it,1,[{_},{_}]},{init,start_em,1,[{_},{_}]}]}) Crash dump is being written to: erl_crash.dump...{"init terminating in do_boot",{badarg,[{ets,select,[ct_attributes,[{{ct_conf,'$1','_','_','_',undefined,'_'},[],['$1']}]],[{error_info,#{cause=>id,module=>erl_stdlib_errors}}]},{ct_config,get_key_from_name,1,[{file,"ct_config.erl"},{line,578}]},{ct_util,does_connection_exist,3,[{file,"ct_util.erl"},{line,577}]},{ct_gen_conn,do_start,4,[{file,"ct_gen_conn.erl"},{line,281}]},{ct_netconfc,open,4,[{file,"ct_netconfc.erl"},{line,424}]},{erl_eval,do_apply,7,[{file,"erl_eval.erl"},{line,744}]},{init,start_it,1,[{file,"init.erl"},{line,1234}]},{init,start_em,1,[{file,"init.erl"},{line,1220}]}]}} done Right click on a function in a .erl file and click on "Run ."
The error message consists of Error code and Stack trace. Error code is badarg. Please refer to Exit Reasons for the list of error code. The stack trace contains one entry for each function call. Each call provides file name, function name, line number. For example, {init,start_em,1,[{file,"init.erl"},{line,1220}]} indicates that init.erl is the file, start_em is the function and 1220 is line #. After manual indentation, we could better visualize the stacktrace as follows. {badarg,[ {ets,select,[ct_attributes,[_]],[{_}]}, {ct_config,get_key_from_name,1,[{_},{_}]}, {ct_util,does_connection_exist,3,[{_},{_}]}, {ct_gen_conn,do_start,4,[{_},{_}]}, {ct_netconfc,open,4,[{_},{_}]}, {erl_eval,do_apply,7,[{_},{_}]}, {init,start_it,1,[{_},{_}]}, {init,start_em,1,[{_},{_}]} ]} {badarg,[ {ets,select,[ct_attributes,[{{ct_conf,'$1','_','_','_',undefined,'_'},[],['$1']}]],[{error_info,#{cause=>id,module=>erl_stdlib_errors}}]}, {ct_config,get_key_from_name,1,[{file,"ct_config.erl"},{line,578}]}, {ct_util,does_connection_exist,3,[{file,"ct_util.erl"},{line,577}]}, {ct_gen_conn,do_start,4,[{file,"ct_gen_conn.erl"},{line,281}]}, {ct_netconfc,open,4,[{file,"ct_netconfc.erl"},{line,424}]}, {erl_eval,do_apply,7,[{file,"erl_eval.erl"},{line,744}]}, {init,start_it,1,[{file,"init.erl"},{line,1234}]}, {init,start_em,1,[{file,"init.erl"},{line,1220}]} ]}
An error occurred when executing Randomwalk2dmobility in NS3
I am a newbie to NS3. I want to understand the execution status of handover in the Randomwalk2d module and visualize it. The default is two Ue and two enb, but errors will always occur during execution. Can anyone help me solve the problem? This is my code link:https://drive.google.com/file/d/163NQOyvs0bTh2J4P9_vpS4Y7iqocB3HJ/view?usp=sharing When I execute the command : ./waf --run scratch/lte_handover --visualize, the following error appear ../scratch/lte_handover.cc:In funtion 'int main(int, char**)': ../scratch/lte_handover.cc:296:78: error: expected ')' before ';' token "Bounds",RectangleValue (Rectangle (0,2000,0,2000))); ^ Build failed ->task in 'lte_handover' failed with exit status 1 (run with -v to display more information) Follow the instructions to enter the command :./waf --run scratch/lte_handover -v, and the following information appears Several tasks use the same identifier. Please check the information on https://waf.io/apidocs/Task.html?highlight=uid#waflib.Task.Task.uid object 'SuidBuild_task'( {task 139759060979784: SuidBuild_task -> }) defined in 'tap-creator' object 'SuidBuild_task'( {task 139759060980008: SuidBuild_task -> }) defined in 'tap-creator' object 'SuidBuild_task'( {task 139759065638504: SuidBuild_task -> }) defined in 'tap-creator'
Seems that you have an extra ) in that line above. You are not closing this command as you commented all the lines ueMobility.SetPositionAllocator ("ns3::RandomRectanglePositionAllocator", // <-- close ueMobility.SetMobilityModel ("ns3::RandomWalk2dMobilityModel","Bounds", RectangleValue (Rectangle (0,2000,0,2000)));
What is the perl6 equivalent of #INC, please?
I go export PERL6LIB="/GitHub/perl6-Units/lib" and then echo $PERL6LIB /GitHub/perl6-Units/lib But when I run perl6 t/01-basic.t use v6; use Test; plan 3; lives-ok { use Units <m>; ok #Units::UNITS.elems > 0; ok (0m).defined; } done-testing; I still get an error ===SORRY!=== Could not find Units at line 8 in: /Users/--me--/.perl6 /usr/local/Cellar/rakudo-star/2018.01/share/perl6/site /usr/local/Cellar/rakudo-star/2018.01/share/perl6/vendor /usr/local/Cellar/rakudo-star/2018.01/share/perl6 CompUnit::Repository::AbsolutePath<140707489084448> CompUnit::Repository::NQP<140707463117264> CompUnit::Repository::Perl5<140707463117304> In Perl 5 I would have used print "#INC"; to see what paths are searched for the lib before the error is thrown. Using say flat $*REPO.repo-chain.map(*.loaded); either is before it loads or after it throws the exception. Any help would be much appreciated - or maybe a hint on what to put in ~/.perl6 as I can't get a symlink to work either.
The error message itself is telling you what the library paths available are. You are failing to print them because you are expecting a run time action ( say ) to take place before a compile time error -- you could print out $*REPO at compile time, but again the exception is already showing you what you wanted. $ PERL6LIB="/GitHub/perl6-Units/lib" perl6 -e 'BEGIN say $*REPO.repo-chain; use Foo;' (file#/GitHub/perl6-Units/lib inst#/Users/ugexe/.perl6 inst#/Users/ugexe/.rakudobrew/moar-2018.08/install/share/perl6/site inst#/Users/ugexe/.rakudobrew/moar-2018.08/install/share/perl6/vendor inst#/Users/ugexe/.rakudobrew/moar-2018.08/install/share/perl6 ap# nqp# perl5#) ===SORRY!=== Could not find Foo at line 1 in: /GitHub/perl6-Units/lib /Users/ugexe/.perl6 /Users/ugexe/.rakudobrew/moar-2018.08/install/share/perl6/site /Users/ugexe/.rakudobrew/moar-2018.08/install/share/perl6/vendor /Users/ugexe/.rakudobrew/moar-2018.08/install/share/perl6 CompUnit::Repository::AbsolutePath<140337382425072> CompUnit::Repository::NQP<140337350057496> CompUnit::Repository::Perl5<140337350057536> You can see /GitHub/perl6-Units/lib is showing up in the available paths, which is unlike your example. I'd question if your shell/env is actually setup correctly.
Does the MSBuild Exec task search STDOUT for the string "error"?
I have a small NUnit test suite with a single ignored test. I'm just now writing a simple MSBuild script to restore and publish and the like. I tried to get a dotnet test task working <Target Name="test" DependsOnTargets="restore"> <Exec Command="dotnet test" WorkingDirectory="test\Example.Tests" /> </Target> But, it exits with code -1 every time! PS> dotnet msbuild /t:test build.xml Microsoft (R) Build Engine version 15.3.409.57025 for .NET Core Copyright (C) Microsoft Corporation. All rights reserved. Restore completed in 50.88 ms for C:\...\src\Example\Example.csproj. Restore completed in 57.18 ms for C:\...\test\Example.Tests\Example.Tests.csproj. Build started, please wait... Build completed. Test run for C:\...\test\Example.Tests\bin\Debug\netcoreapp1.1\Example.Tests.dll(.NETCoreApp,Version=v1.1) Microsoft (R) Test Execution Command Line Tool Version 15.0.0.0 Copyright (c) Microsoft Corporation. All rights reserved. Starting test execution, please wait... NUnit Adapter 3.8.0.0: Test execution started Running all tests in C:\...\test\Example.Tests\bin\Debug\netcoreapp1.1\Example.Tests.dll NUnit3TestExecutor converted 26 of 26 NUnit test cases Skipped FilterEndpointWithCompletelyFilteredSystemsReturnsNotFound("foo") EXEC : error Message: [C:\...\build.xml] OneTimeSetUp: Having trouble constructing this scenario with the current command catalog NUnit Adapter 3.8.0.0: Test execution complete Total tests: 26. Passed: 25. Failed: 0. Skipped: 1. Test Run Successful. Test execution time: 2.8322 Seconds C:\...\build.xml(16,9): error MSB3073: The command "dotnet test" exited with code -1. If I run the command directly in my console, it's fine. PS> dotnet test Build started, please wait... Build completed. Test run for C:\...\test\Example.Tests\bin\Debug\netcoreapp1.1\Example.Tests.dll(.NETCoreApp,Version=v1.1) Microsoft (R) Test Execution Command Line Tool Version 15.0.0.0 Copyright (c) Microsoft Corporation. All rights reserved. Starting test execution, please wait... NUnit Adapter 3.8.0.0: Test execution started Running all tests in C:\...\test\Example.Tests\bin\Debug\netcoreapp1.1\Example.Tests.dll NUnit3TestExecutor converted 26 of 26 NUnit test cases Skipped FilterEndpointWithCompletelyFilteredSystemsReturnsNotFound("foo") Error Message: OneTimeSetUp: Having trouble constructing this scenario with the current command catalog NUnit Adapter 3.8.0.0: Test execution complete Total tests: 26. Passed: 25. Failed: 0. Skipped: 1. Test Run Successful. Test execution time: 3.6485 Seconds I searched around for help, but didn't quite find anything explicit. I got the impression that the Exec task searches STDOUT for some kind of error message, possibly just the word "error", in order to set the exit code/status. This does appear on my console (for some reason NUnit prints "Error Message" for ignored/skipped tests). Skipped FilterEndpointWithCompletelyFilteredSystemsReturnsNotFound("foo") Error Message: OneTimeSetUp: Having trouble constructing this scenario with the current command catalog If I comment out this test, the run passes (via msbuild). Am I correct about the Exec task? Would I "fix" the problem by overriding the CustomErrorRegularExpression parameter? I can't find any good info about this parameter... would I set it to an empty string?
If provided, Exec checks the output against CustomErrorRegularExpression and CustomWarningRegularExpression first. If those do not match or were not provided, Exec then uses the following RegEx: new Regex ( // Beginning of line and any amount of whitespace. #"^\s*" // Match a [optional project number prefix 'ddd>'], single letter + colon + remaining filename, or // string with no colon followed by a colon. + #"(((?<ORIGIN>(((\d+>)?[a-zA-Z]?:[^:]*)|([^:]*))):)" // Origin may also be empty. In this case there's no trailing colon. + "|())" // Match the empty string or a string without a colon that ends with a space + "(?<SUBCATEGORY>(()|([^:]*? )))" // Match 'error' or 'warning'. + #"(?<CATEGORY>(error|warning))" // Match anything starting with a space that's not a colon/space, followed by a colon. // Error code is optional in which case "error"/"warning" can be followed immediately by a colon. + #"( \s*(?<CODE>[^: ]*))?\s*:" // Whatever's left on this line, including colons. + "(?<TEXT>.*)$", RegexOptions.IgnoreCase | RegexOptions.Compiled ) That works out lines in the format of the following example being interpreted as errors or warnings (depending which of those two words are in the "Cat." part). Main.cs(17,20):Command line warning CS0168: The variable 'foo' is declared but never used -------------- ------------ ------- ------ ---------------------------------------------- Origin SubCategory Cat. Code Text Would I "fix" the problem by overriding the CustomErrorRegularExpression parameter? EDIT (Question for myself: Why on Earth did I say "Yup" initially when my second sentence directly contradicts this?) Nope. :) Set IgnoreStandardErrorWarningFormat to true. From the documentation you linked in your question: IgnoreStandardErrorWarningFormat: Optional Boolean parameter. If false, selects lines in the output that match the standard error/warning format, and logs them as errors/warnings. If true, disable this behavior. The default value is false.
TFS BUILD 2010: XAML: how to make double quotes within a double quotes
[String.Format("/build Debug "{0}\Sources\Source\Infrastructure\Infrastructure.Interface\Infrastructure.Interface.csproj"", BuildDirectory)] Say I want to have another double quotes from ===> {0}\Sources\Source\Infrastructure\Infrastructure.Interface\Infrastructure.Interface.csproj <===, but it can only allow once " within the String.Format()... What should I do? I tried => \", #" they are not working at all... === If I tried => """ <== this is what I got: The build process failed validation. Details: Validation Error: The private implementation of activity '1: DynamicActivity' has the following validation error: Compiler error(s) encountered processing expression "String.Format("/build Debug """{0}\Sources\Company.GOF.Win\Company.GOF.Win.Interface\Company.GOF.Win.Interface.csproj"""", BuildDirectory)". Comma, ')', or a valid expression continuation expected. Validation Error: The private implementation of activity '1: DynamicActivity' has the following validation error: Compiler error(s) encountered processing expression "String.Format("/build Debug """{0}\Sources\Source\Infrastructure\Infrastructure.Interface\Infrastructure.Interface.csproj"""", BuildDirectory)". Comma, ')', or a valid expression continuation expected. Validation Error: The private implementation of activity '1: DynamicActivity' has the following validation error: Compiler error(s) encountered processing expression "String.Format("/build Debug """{0}\Sources\Services\Services.Interface\Company.GOF.Win.Services.Interface.csproj"""", BuildDirectory)". Comma, ')', or a valid expression continuation expected.
You should be able to get what you need with """{0}\Sources\Source\Infrastructure\Infrastructure.Interface\Infrastructure.Interface.csproj""" EDIT Judging from your output you have set a: String.Format("/build Debug """{0}\Sources\Company.GOF.Win\Company.GOF.Win.Interface\Company.GOF.Win.Interface.csproj"""", BuildDirectory) It's reasonable this fails. This should work though: String.Format("/build Debug ""{0}\Sources\Company.GOF.Win\Company.GOF.Win.Interface\Company.GOF.Win.Interface.csproj"""", BuildDirectory) (The only difference is ""{0}\Sources\ instead of """{0}\Sources)