Code Monkey home page Code Monkey logo

Comments (4)

wmathurin avatar wmathurin commented on August 10, 2024

Give us more information.
Did you use forcedroid to create the application?
Was there any error during the application generation?

from salesforcemobilesdk-cordovaplugin.

RianHitori avatar RianHitori commented on August 10, 2024

Hi @wmathurin,

I followed this instruction - https://developer.salesforce.com/docs/atlas.en-us.mobile_sdk.meta/mobile_sdk/dev_hybrid_apps_run.htm

I ran:

git clone https://github.com/forcedotcom/SalesforceMobileSDK-Shared

cordova create contactsApp com.salesforce.contactexplorer contactsApp
cd contactsApp
cordova plugin add https://github.com/forcedotcom/SalesforceMobileSDK-CordovaPlugin
cordova plugin add org.apache.cordova.contacts
cordova plugin add org.apache.cordova.statusbar
cordova platform add android 
cordova platform add ios 
cp -RL <local path to SalesforceMobileSDK-Shared>/samples/contactexplorer/* www/
cordova prepare

After that I open it using AndroidStudio. I added 'multiDexEnabled true' on defaultConfig:

defaultConfig {
        versionCode cdvVersionCode ?: Integer.parseInt("" + privateHelpers.extractIntFromManifest("versionCode") + "0")
        if (cdvMinSdkVersion != null) {
            minSdkVersion cdvMinSdkVersion
        }
        multiDexEnabled true
    }

The build didn't show any error. After I open the app on my android device I see the error above and the salesforce login page is not showing. It works fine on my iOS device.

Thank you.

from salesforcemobilesdk-cordovaplugin.

wmathurin avatar wmathurin commented on August 10, 2024

I think if you were to do the cordova platform add before you do the cordova plugin add it would work.

Anyway, we just released Mobile SDK 4.1 a few hours ago.
Among other things, we added a "after-platform-add" hook to the plugin, so it should now work regardless of the order of the cordova platform add and cordova plugin add.

Please re-open if you still have issues.

from salesforcemobilesdk-cordovaplugin.

RianHitori avatar RianHitori commented on August 10, 2024

Thanks @wmathurin. I will test using new version.

from salesforcemobilesdk-cordovaplugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.