-
Notifications
You must be signed in to change notification settings - Fork 207
Demo run
-
git clone
git clone https://github.com/momotech/MLN
-
Directory structure introduction
No. directory Function description 1. Android Studio Templates AS template(Several types of bridges) 2. MLN-Android Android sdk source code + demo project(Meilishuo demo, other demos) 3. MLN-iOS iOS sdk source code + demo project(Meilishuo demo, other demos)
-
Run Android Project
1)Open theMLN-Android
directory with Android Studio;
2)Run the installation to the mobile phone, and the running result is shown in the figure below;
3)Click the "Hot Reload" button to enter the hot reload interface and debug lua Bridge. For the next steps, please refer to MLN development environment
4)Click the "Example" button, and we will show some demos we wrote using Bridge;
5)Click "Demo Project", this Demo is the "beautiful say" interface we wrote with the bridge Bridge, the effect is shown below:
⚠️ Problems that may be encountered during compilation:
1)If you encounter an error:Error: No such property: GradleVersion for class: JetGradlePlugin
, please upgrade Android Studio to version 3.5.
2)If you encounter gradle incompatibility issues on Android Studio 3.5, please use the recommended version of gradle 5.1.1 in the project, and use the 3.4.0 version of the gradle plugin, and then clickSync Project With Gradle Files
in the toolbar.The Lua code storage path of the "Example" and "Demo Project" in the Android project is shown below:
-
Run iOS project
1)Use Xcode to openMLN-iOS-> Example-> MLN.xcworkspace
;
2)Open the terminal located in the Example folder and perform the pod initialization operation (⚠️ CocoaPods version needs to be 1.6.0 and above);$ pod install
3)Click Run and install it on the phone. The running effect is the same as the above Android running result. The next steps on the mobile phone are the same as the above Android operating steps.
The lua code storage path of the "example" and "demo project" in the iOS project is shown below: