Comments (22)
I have found that I need to, following cordova prepare
that I need to open in Android Studio to build and run the project. Using the cordova commands at this stage causes me issues.
from salesforcemobilesdk-cordovaplugin.
In android studio I get a lot of errors:
Error:(5, 0) Project with path ':libs:SmartSync' could not be found in project ':SalesforceHybrid'.
from salesforcemobilesdk-cordovaplugin.
Ah right, there is a post install script that should run after the SF plugin us added. This requires shelljs npm package to be installed locally. Could be that this is not there?
from salesforcemobilesdk-cordovaplugin.
It is there. What cordova version is to be used? Can it be the latest one?
from salesforcemobilesdk-cordovaplugin.
Could you run:
npm list -g | grep -A1 forcedroid
To see what version of forcedroid and dependent packages you are using.
shelljs released a new version (0.6.0) on thursday which causes forcedroid to not copy files the right way when setting up an hybrid applications. We should have a patch release out soon.
from salesforcemobilesdk-cordovaplugin.
What version of shelljs is compatible with forcedroid?
from salesforcemobilesdk-cordovaplugin.
from salesforcemobilesdk-cordovaplugin.
Using 0.5.3 work partially. I had to manually run the script to update the AndroidManifest.xml:
shjs plugins/com.salesforce/tools/postinstall-android.js
from salesforcemobilesdk-cordovaplugin.
After that when building the code using
cordova build android
I get the following error:
platforms/android/build/intermediates/manifests/full/debug/AndroidManifest.xml:35:23-41 : No resource found that matches the given name (at 'icon' with value '@drawable/sf__icon').
from salesforcemobilesdk-cordovaplugin.
Only worked if I open the project in Android Studio
from salesforcemobilesdk-cordovaplugin.
Yup, same here (though I had the same with earlier version of shelljs).
from salesforcemobilesdk-cordovaplugin.
Now I am getting error in dexDebug because of the android method limit. Caused by the play services library.
from salesforcemobilesdk-cordovaplugin.
Cool, you can overcome this by replacing the following line in build-gradle with this;
compile "com.google.android.gms:play-services:7.5.0"
with
compile "com.google.android.gms:play-services-gcm:7.5.0"
This reduces the Google services to be pulled in.
I have some notes on my progress and issues so far, but not thoroughly tested yet.
from salesforcemobilesdk-cordovaplugin.
Thanks. Got it to compile. Now I manage to login to Salesforce, but got a new error:
java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/xxx/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]] couldn't find "libstlport_shared.so"
from salesforcemobilesdk-cordovaplugin.
Good stuff, I have seen that too... But can't remember how I git round it. Sorry not at my pc till Monday (it's Sat night where I am), but I can post up then if you don't get past this by then.
Might be worth searching the issues on this repo for any errors as I did initially post a few of my notes up.
from salesforcemobilesdk-cordovaplugin.
Found it in previous issue. Finally managed to get the application working. I will do a merge request for the play service and libstlport_shared.so issue.
Still don't understand why the AndroidManifest.xml file didn't get updated when the plugin is added only after running shjs manually.
from salesforcemobilesdk-cordovaplugin.
Fantastic!
You don't happen to have other plugins installed do you?
from salesforcemobilesdk-cordovaplugin.
Lots of other plugins, :).
cordova-plugin-console cordova-plugin-datepicker cordova-plugin-device cordova-plugin-network-information cordova-plugin-splashscreen cordova-plugin-statusbar cordova-plugin-whitelist cordova-plugin-x-toast ionic-plugin-keyboard phonegap-plugin-push
from salesforcemobilesdk-cordovaplugin.
Ah right, so I have a theory that the SF plugin currently needs to be the last to be added, otherwise things don't quite go to plan.
You could try removing the sf plugin, removing and adding the platform and then re-adding the SF plugin.
Like I said I have some notes but nothing to concrete yet.
from salesforcemobilesdk-cordovaplugin.
There is a fetch.json file. The Salesforce plugin is the last one in the file.
from salesforcemobilesdk-cordovaplugin.
What I did.
cordova platform rm android cordova plugin rm com.salesforce cordova platform add [email protected] cordova plugin add https://github.com/forcedotcom/SalesforceMobileSDK-CordovaPlugin.git
AndroidManifest.xml wasn't updated by the post installation script.
from salesforcemobilesdk-cordovaplugin.
This issue should be resolved in our 4.1
release, which is now live.
from salesforcemobilesdk-cordovaplugin.
Related Issues (20)
- Unable to add the plugin
- SDK v 9.2 - 10.0 is not compatible with important Cordova plugins HOT 2
- Publish latest version to npmjs HOT 1
- Please add SalesforceMobileSDK-CordovaPlugin to an NPM Registry HOT 1
- Support for cordova-android 11 HOT 7
- App crashes upon being opened on iOS 13 HOT 10
- Android 12: App crashes and no push notification received when push notification is triggered HOT 3
- App crashes upon being opened on iOS 13 HOT 1
- App crashes on Android 9 (device and emulator) HOT 4
- What is the plan for releasing 10.2.0? HOT 2
- Archive failing HOT 7
- App crashes on Android 9 (device and emulator) HOT 5
- Cordova iOS Build with Salesforce SDK 10.2.0 is failing on Xcode 14 HOT 5
- Disable auto-login on Salesforce Mobile SDK HOT 11
- iOS: Link SalesforceHybridSDK Task is failing with undefined symbols for architecture x86_64 HOT 3
- SOQL Query API responds 503 in iOS HOT 2
- In-App Developer Support not working in ios. SalesforceMobileSDK-CordovaPlugin - 6.2.0 HOT 1
- Android App crashes when sessions timeout HOT 7
- How to call biometric auth methods from JavaScript? HOT 1
- request time out error in synchronization time -SalesforceMobileSDK-CordovaPlugin Ionic App HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from salesforcemobilesdk-cordovaplugin.