erikpoort / react-native-salesforce-dmp

ReactNative module for Salesforce DMP 4.0.+
MIT License
2 stars 4 forks source link

Cannot get running on Android #3

Open mrTuomoK opened 5 years ago

mrTuomoK commented 5 years ago

Trying to get this running on Android and running into a problem. Fresh RN project, installed this through npm, linking the library, adding dependencies (google play services), modified the manifest-file accordingly... after this running react-native run-android gives me -->

error: constructor RNSalesforceDMPPackage in class RNSalesforceDMPPackage cannot be applied to given types; new RNSalesforceDMPPackage() ^ required: Application found: no arguments reason: actual and formal argument lists differ in length 1 error

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':app:compileDebugJavaWithJavac'.

    Compilation failed; see the compiler error output for details.

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 2s

So it's something about the constructor of the library called in MainApplication.java?

Could someone else trying to get this up & running on Android and share the results?

mrTuomoK commented 5 years ago

Seems the constructor is expecting the Application as a param to the constructor... how could it be done?

erikpoort commented 5 years ago

I think all you need to do is make sure you inject Application like this: new RNSalesforceDMPPackage(this),