05-23-2017 02:40 PM
I'm trying to create my first MobileSDK app based on MMW Advantage template.
The ultimate goal is to be able to support JSON based data structures in special attributes, to hold "repetitive" information (in my case, inspection details collected in field). For the legacy MMW app, I accomplished that by using JS hooks, which convert/parse data to/from JSON and render dynamically the form elements accordingly. In the database there's just a text field which holds the JSON content and is published in the WFS service:
I'm assuming I'm forced to develop my own MobileSDK app in order to accomplish the same thing with MMW Advantage, as (AFAIK) it doesn't support hooks. I need this because the customer wants to view this demonstration in smartphones, not tablets.
When following the Getting Started guide, I'm facing the following error when adding the Android platform to my project:
$ grunt android
Error: Could not find gradle wrapper within Android SDK. Might need to update your Android SDK.
Looked here: C:\Users\aacvieir\AppData\Local\Android\sdk\tools\templates\gradle\wrapper
(Indeed there is no \templates\grade\wrapper folder in my \Android\sdk\tools folder, but I don't know what I've missed).
Has anyone experienced this problem before? Am I missing any step regarding the system setup?
Solved! Go to Solution.
05-23-2017 11:42 PM
I haven't experienced such behavior, but I setup my dev environment long time ago.
It seems that there have been some changes in how the Android dev environment is setup.
Other developers faced similar problems, try this: Could not find Gradle wrapper and let me know if it works.
05-25-2017 11:38 PM
The problem is with the Android SDK 25. We will fix it in the next SDK release.
You may try updating the cordova android platform
In you project directory, in the Gruntfile find the section
change 6.1.2 to 6.2.3
05-26-2017 04:37 PM
Indeed I had Android SDK 25 installed, but even after uninstalling it and installing SDK 23, the error remained.
After changing the Gruntfile according your instructions, it completed successfully, but I could see in the logs that it is always considering Target SDK as 25; it detected the missing version, and automatically downloaded and installed it.
In order to avoid any incompatibility issues, later I opened the project on Android Studio and compiled again forcing the modules' compilation target SDK to 23.
Now I can run the compiled app with no issues. Thank you!