这是cordova版本太高,不兼容这个插件所导致的。解决方案是修改$your_project/plugins/cordova-plugin-wechat/scripts/android-install.js中的var targetDir = path.join(projectRoot, "platforms", "android", "src", packageName.replace(/\./g, path.sep), "wxapi");
修改为var targetDir = path.join(projectRoot, "platforms", "android", "app","src","main","java", packageName.replace(/\./g, path.sep), "wxapi");
修改后,重新装一下平台
cordova platform remove android
cordova platform add android
这样同样能达到 @clyquan 所提到的修改效果,就是让插件把那三个类复制到正确的位置