kmlidc / react-native-share-local

react-native 调用系统原生分享
30 stars 10 forks source link

Android 编译错误:new RNShareLocal() 参数长度错误 #9

Open mantou132 opened 6 years ago

mantou132 commented 6 years ago
/home/**/android/app/src/main/java/com/impress_webview/MainApplication.java:53: error: constructor RNShareLocal in class RNShareLocal cannot be applied to given types;
          new RNShareLocal()
          ^
  required: Activity
  found: no arguments
  reason: actual and formal argument lists differ in length

是不是应该在 MainApplication.java 实例化的时候传入参数? 我不知道参数该怎么写

mantou132 commented 6 years ago

试着修复了,我自己能用; https://github.com/kmlidc/react-native-share-local/pull/10

kmlidc commented 6 years ago

看使用说明 发自网易邮箱大师 在2017年10月12日 17:02,mantou 写道: /home/**/android/app/src/main/java/com/impress_webview/MainApplication.java:53: error: constructor RNShareLocal in class RNShareLocal cannot be applied to given types; new RNShareLocal() ^ required: Activity found: no arguments reason: actual and formal argument lists differ in length

是不是应该在 MainApplication.java 实例化的时候传入参数? 我不知道参数该怎么写

—You are receiving this because you are subscribed to this thread.Reply to this email directly, view it on GitHub, or mute the thread.

{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/kmlidc/react-native-share-local","title":"kmlidc/react-native-share-local","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/kmlidc/react-native-share-local"}},"updates":{"snippets":[{"icon":"DESCRIPTION","message":"Android 编译错误: (#9)"}],"action":{"name":"View Issue","url":"https://github.com/kmlidc/react-native-share-local/issues/9"}}}