AFNetworking Lexical or preprocessor issue Expected ':' - afnetworking-2

I downloaded the latest AFNetworking framework 2.5 and tried out the example project. However, my build has failed with the following error in AFNetworkReachabilityManager.h, AFURLConnectionOperation.h, AFHTTPRequestOperationManager.h.
Lexical or Preprocessor Issue Expected ':'
Can anyone help why this error occurs? How to resolve it? I am using xcode 5.1.1 with IOS 7.0 sdk.
Thanks a lot in advance.

For AFNetworking version greater than 2.0 minimum iOS target is iOS 6 and minimum OS X target is OX X 10.8. so just update to the minimum requirement and you would be able to resolve the error as it was in my case.
For requirement of AFNetworking just go through this link :
https://github.com/AFNetworking/AFNetworking#requirements

Related

go1.16 sigs.k8s.io/json sf.IsExported undefined error

When I build the Go project I get the following error
# sigs.k8s.io/json/internal/golang/encoding/json
../pkg/mod/sigs.k8s.io/json#v0.0.0-20211020170558-c049b76a60c6/internal/golang/encoding/json/encode.go:1249:12: sf.IsExported undefined (type reflect.StructField has no field or method IsExported)
../pkg/mod/sigs.k8s.io/json#v0.0.0-20211020170558-c049b76a60c6/internal/golang/encoding/json/encode.go:1255:18: sf.IsExported undefined (type reflect.StructField has no field or method IsExported)
I know this is a version problem, and it can be solved by upgrading the version to 1.17, but because the company's environment is 1.16, it cannot be upgraded because of this project
How can I modify it, if I lower the lower version, which version should I lower to?
I really appreciate any help with this.
Looks like this error could be coming from kubebuilder (or a tool derived from it such as operator-sdk). Then you should use the correct version of the given tool. E.g.,
kubebuilder - have a list mapping go versions to kubebuilder versions https://book.kubebuilder.io/quick-start.html#prerequisites
operator-sdk - don't have a list, but you can find it by going through the documentation for each version, e.g., the first I found that has a version lower than 1.17 is https://v1-16-x.sdk.operatorframework.io/docs/installation/#prerequisites-1

When I include google maps my build fails

When I include a "google maps" dependency into pubspec.yaml
google_maps_flutter: ^0.2.0+3
my build fails with:
Launching lib\main.dart on Android SDK built for x86 in debug mode...
D8: Program type already present: android.support.v4.media.MediaBrowserCompat$ConnectionCallback$ConnectionCallbackInternal
*********************************************************
WARNING: This version of google_maps_flutter will break your Android build if it or its dependencies aren't compatible with AndroidX.
See xxxxxxxxxxx for more information on the problem and how to fix it.
This warning prints for all Android build failures. The real root cause of the error may be unrelated.
*********************************************************
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives: C:\Users\philb\flutter_course2\build\app\intermediates\transforms\dexBuilder\debug\4.jar, C:\Users\philb\flutter_course2\build\app\intermediates\transforms\dexBuilder\debug\5.jar, C:\Users\philb\flutter_course2\build\app\intermediates\transforms\dexBuilder\debug\6.jar, C:\Users\philb\flutter_course2\build\app\intermediates\transforms\dexBuilder\debug\7.jar, C:\Users\philb\flutter_course2\build\app\intermediates\transforms\dexBuilder\debug\8.jar, C:\Users\philb\flutter_course2\build\app\intermediates\transforms\dexBuilder\debug\9.jar, C:\Users\philb\flutter_course2\build\app\intermediates\transforms\dexBuilder\debug\10.jar, C:\Users\philb\flutter_course2\build\app\intermediates\transforms\dexBuilder\debug\11.jar, C:\Users\philb\flutter_course2\build\app\intermediates\transforms\dexBuilder\debug\12.jar, C:\Users\philb\flutter_course2\build\app\intermediates\transforms\dexBuilder\debug\13.jar, C:\Users\philb\flutter_course2\build\app\intermediates\transforms\dexBuilder\debug\14.jar, C:\Users\philb\flutter_course2\build\app\intermediates\transforms\dexBuilder\debug\15.jar, C:\Users\philb\flutter_course2\build\app\intermediates\transforms\dexBuilder\debug\16.jar, C:\Users\philb\flutter_course2\build\app\intermediates\transforms\dexBuilder\debug\17.jar, C:\Users\philb\flutter_course2\build\app\intermediates\transforms\dexBuilder\debug\18.jar, C:\Users\philb\flutter_course2\build\app\intermediates\transforms\dexBuilder\debug\19.jar, C:\Users\philb\flutter_course2\build\app\intermediates\transforms\dexBuilder\debug\20.jar, C:\Users\philb\flutter_course2\build\app\intermediates\transforms\dexBuilder\debug\21.jar, C:\Users\philb\flutter_course2\build\app\intermediates\transforms\dexBuilder\debug\22.jar, C:\Users\philb\flutter_course2\build\app\intermediates\transforms\dexBuilder\debug\23.jar, C:\Users\philb\flutter_course2\build\app\intermediates\transforms\dexBuilder\debug\24.jar, C:\Users\philb\flutter_course2\build\app\intermediates\transforms\dexBuilder\debug\25.jar, C:\Users\philb\flutter_course2\build\app\intermediates\transforms\dexBuilder\debug\26.jar, C:\Users\philb\flutter_course2\build\app\intermediates\transforms\dexBuilder\debug\27.jar, C:\Users\philb\flutter_course2\build\app\intermediates\transforms\dexBuilder\debug\28.jar, C:\Users\philb\flutter_course2\build\app\intermediates\transforms\dexBuilder\debug\29.jar, C:\Users\philb\flutter_course2\build\app\intermediates\transforms\dexBuilder\debug\30.jar, C:\Users\philb\flutter_course2\build\app\intermediates\transforms\dexBuilder\debug\31.jar, C:\Users\philb\flutter_course2\build\app\intermediates\transforms\dexBuilder\debug\32.jar, C:\Users\philb\flutter_course2\build\app\intermediates\transforms\dexBuilder\debug\33.jar, C:\Users\philb\flutter_course2\build\app\intermediates\transforms\dexBuilder\debug\34.jar, C:\Users\philb\flutter_course2\build\app\intermediates\transforms\dexBuilder\debug\35.jar, C:\Users\philb\flutter_course2\build\app\intermediates\transforms\dexBuilder\debug\36.jar, C:\Users\philb\flutter_course2\build\app\intermediates\transforms\dexBuilder\debug\50.jar, C:\Users\philb\flutter_course2\build\app\intermediates\transforms\dexBuilder\debug\55.jar, C:\Users\philb\flutter_course2\build\app\intermediates\transforms\dexBuilder\debug\60.jar, C:\Users\philb\flutter_course2\build\app\intermediates\transforms\dexBuilder\debug\65.jar, C:\Users\philb\flutter_course2\build\app\intermediates\transforms\dexBuilder\debug\70.jar, C:\Users\philb\flutter_course2\build\app\intermediates\transforms\dexBuilder\debug\75.jar, C:\Users\philb\flutter_course2\build\app\intermediates\transforms\dexBuilder\debug\80.jar, C:\Users\philb\flutter_course2\build\app\intermediates\transforms\dexBuilder\debug\85.jar, C:\Users\philb\flutter_course2\build\app\intermediates\transforms\dexBuilder\debug\90.jar, C:\Users\philb\flutter_course2\build\app\intermediates\transforms\dexBuilder\debug\95.jar, C:\Users\philb\flutter_course2\build\app\intermediates\transforms\dexBuilder\debug\100.jar, C:\Users\philb\flutter_course2\build\app\intermediates\transforms\dexBuilder\debug\105.jar, C:\Users\philb\flutter_course2\build\app\intermediates\transforms\dexBuilder\debug\110.jar, C:\Users\philb\flutter_course2\build\app\intermediates\transforms\dexBuilder\debug\115.jar
Can someone point me in the right direction to understand and track this down. This project built just fine previously.
This is because you have in your app google_maps_plugin version that is using androidx and probably your app and/or some other dependency is using android support library. I had provided some ways to solve this kind of problem here and here.
But what you need to do is migrate all your app to androidx and use updated dependencies versions that already has been migrated too.
Other way is avoid androidx making downgrade of your dependencies packages for versions pre androidx.
For more details about flutter apps androidx migration see the original docs reference
I hope it helps.

Cakephp 3.1 have issues with PHP7.2

I have develop my web application by using cakephp 3.1. My service provider has update the php version to 7.2. Now my application is not work well, as it was working with PHP5.6, Its showing different warnings with debug=true; and the big problem is its not showing line which have some problem, if some is there. Here is warning message.
Warning: count() [function.count]: Parameter must be an array or an object that implements Countable in D:\xampp7\htdocs\bighris\vendor\cakephp\cakephp\src\Database\QueryCompiler.php on line 115
In case some errors are there its not showing it, in the following way, there I can't find the line number and the file which have the problem.
https://www.screencast.com/t/qIQB1YIW
Please help me to solve the issue, Thanks
As per the Cakephp github issues:
PHP 7.2 has changed count's behavior
that's why you are getting errors.
PHP 7.2 has changed count's behavior causing problems with QueryCompiler
You can follow the below link or change your PHP version to 7.1 or less to resolve this issue.
Stop warnings when using count in QueryCompiler in PHP 7.2
it looks like you are passing some wrong data to count function, guess you are passing some query directly to count. Or something like that.
If you may show the code of the controller you are facing issue it may be a great help.
there is solution for you....
2020-09-30 06:22:30 Warning: Warning (2): count() [function.count]: Parameter must be an array or an object that implements Countable in [D:\xampp\htdocs\gym_master\vendor\cakephp\cakephp\src\Database\QueryCompiler.php, line 126]
please check your php version...

FireBreath does not compile with boost process header file included

I wanted to launch the process from firebreath,so I included "boost/process.hpp". Just including this header alone throws compile error.
could some one help?
FireBreath 1.6.1, FireBreath 1.7.0,windows 8
Error:
2>C:\Projects\plugin\FireBreath\src\3rdParty\boost\boost/process/detail/pipe.hpp(129): error C2665: 'boost::system::system_error::system_error' : none of the 7 overloads could convert all the argument types
2> C:\Projects\plugin\FireBreath\src\3rdParty\boost\boost/system/system_error.hpp(39): could be 'boost::system::system_error::system_error(int,const boost::system::error_category &,const std::string &)'
2> C:\Projects\plugin\FireBreath\src\3rdParty\boost\boost/system/system_error.hpp(43): or 'boost::system::system_error::system_error(int,const boost::system::error_category &,const char *)'
2> while trying to match the argument list '(DWORD, overloaded-function, const char [54])'
I faced same problem
boost: 1.47
OS: Windows XP (32 bit VM)
But not with FireBreath
I changed boost::system::system_category to boost::system::system_category() in pipe.hpp line 129
the boost::process library that was in FireBreath has compilation errors in them. I have fixed those errors and it now compiles for me, at least when including . I haven't actually tried to use it on windows yet, nor I suspect has anyone else.
Good luck, hope that helps.

Why does cuCtxCreate return old context?

i have installed:
CUDA sdk 4.2 64,
CUDA toolkit 4.2 64,
CUDA devdriver 4.2 64,
I checked every nvcuda.dll in \windows - all of them, are 4.2 version, but when i create a context with driver api and check it verison with cuCtxGetApiVersion - it shows me "3010"
I do not really care about that version, but when i try to use runtime api with that context(need to mix them) - it shows me error 49(cudaErrorIncompatibleDriverContext)
any ideas, what is going on and how to make it work together?
seems it is not some issue with windows - running the same project under linux results in the same 3010 API version.
I solved the problem - i was exporting "cuCtxCreate" function directly during execution(it is other language - no cuda.h). After looking in original cuda.h i found that it defines other name for that functrion, basing on some sort of smartass defines.
And that new function "cuCtxCreate_v2" creates a good context.
/facepalm