ouxuwen / ionic-shop

基于ionic3开发的电商APP,商品搜索,商品分类,商品详情,商品评论,购物车,订单管理,支付宝沙箱等等。。
18 stars 8 forks source link

Failed to build project #3

Open itshazlan opened 6 years ago

itshazlan commented 6 years ago

Hi, @ouxuwen I've try to run and build your project but I got an error on that step, here /home/lordrauf/Ionic Projects/Cloned-Github/ionic-shop/platforms/android/src/xu/li/cordova/wechat/Wechat.java:281: error: method getAppId in class Wechat cannot be applied to given types; final String savedAppid = getAppId(cordova.getActivity()); ^ required: no arguments found: Activity reason: actual and formal argument lists differ in length /home/lordrauf/Ionic Projects/Cloned-Github/ionic-shop/platforms/android/src/xu/li/cordova/wechat/Wechat.java:600: error: non-static variable preferences cannot be referenced from a static context appId = preferences.getString(WXAPPID_PROPERTY_KEY, ""); ^ Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. 2 errors :compileDebugJavaWithJavac FAILED

Here is my Ionic info Ionic:

ionic (Ionic CLI) : 4.2.1 (/usr/lib/node_modules/ionic) Ionic Framework : ionic-angular 3.9.2 @ionic/app-scripts : 3.1.8

Cordova:

cordova (Cordova CLI) : 8.0.0 Cordova Platforms : android 6.4.0 Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 1.2.1, (and 12 other plugins)

System:

NodeJS : v8.11.2 (/usr/bin/node) npm : 6.4.1 OS : Linux 4.15

I hope you could solve this. Thank you.

ouxuwen commented 6 years ago

Hi, maybe you can remove the 'cordova-plugin-wechat,cordova-plugin-qqsdk' and try again , by using the command ionic cordova plugin rm cordova-plugin-wechat cordova-plugin-qqsdk

ouxuwen commented 6 years ago

@hamzahalvanaa Those two plugins both need the appid to build

itshazlan commented 5 years ago

@ouxuwen thank you so much