The WebService interface needs to be called in the project, and there is no direct access to the WebService interface in the Android SDK, so I introduced the Ksoap-android jar package to implement the Access WebService interface. At first it was all quite smooth, the success from the WebService interface to obtain the returned data, directly run on the phone everything is also normal. In short, after one weeks of struggle, is finally complete to achieve the needs of change. At last to take a breath, unexpectedly at the end of packing the signature apk, there is a problem: Error:execution failed for task ': App:transformjarwithdexforrelease ', that is, my jar package file conflicts , check the message message to learn that it is a file conflict in Okhttp. I checked all the jar packages I depended on, external Libraries found okhttp-3.3.0 and okio-1.8.0 (such as), and then look at my libs under the Ksoap-android jar package file (directory structure below), found it also has OKHTTP3 and Okio dependent files, finally found a place, but how Solve another problem, in the online search a lot of information, and busy most of the day, tried various methods, finally solved.
Online method also tried a lot, finally found a simple and easy to use method, is I directly deleted ksoap-android this jar package OKHTTP3 and Okio These two folders, in Android Studio is not directly delete the files in the jar package, So find our original jar in the folder, with WinRAR (or other unzip tool) open, select the OKHTTP3 and Okio folder, delete directly, and then copy the new jar package to the Libs folder, replace the previous jar package, finally, In the Ksoap-android jar package has no OKHTTP3 and Okio folder, but do not be afraid, because our project has introduced Okhttp, finally packaged signature, finished, tested, the application is still working, perfect!!!!!
Remember to trample a pit: The okhttp dependency conflict problem caused by using ksoap-android