1. Extract module in you project directory and run
-- flutter build aar
(
If flutter is not installed
visit below link for flutter sdk setup.
Download flutter sdk and setup dlutter path.
https://flutter.dev/docs/get-started/install/windows
https://flutter.dev/docs/get-started/install/macos
https://flutter.dev/docs/get-started/install/linux
- Extract flutter SDK zip which is downloaded from that link.
- Add path of flutter to environment variables.
- Update your path
If you wish to run Flutter commands in the regular Windows console, take these steps to add Flutter to the PATH environment variable:
From the Start search bar, enter ‘env’ and select Edit environment variables for your account.
Under User variables check if there is an entry called Path:
If the entry exists, append the full path to flutter\bin using ; as a separator from existing values.
If the entry doesn’t exist, create a new user variable named Path with the full path to flutter\bin as its value.
- In case of No Android SDK found. Try setting the ANDROID_SDK_ROOT environment variable.
Add a new environment variable
ANDROID_HOME -> path of android SDK (Ex: C:\Users\Administrator\AppData\Local\Android\Sdk)
Add new paths in
Path -> ;%ANDROID_HOME%\tools;%ANDROID_HOME%\tools\bin;%ANDROID_HOME%\platform-tools
)
=============================================
2. settings.gradel
setBinding(new Binding([gradle:this]))
evaluate(new File(
settingsDir.parentFile,
'MyApplication2/live_tryon/.android/include_flutter.groovy'
))
include ':live_tryon'
MyApplication2 == Main project root directory.
=============================================
3. build.gradel under app
change defaultConfig -> minSdkVersion to minimum 17
dependencies {
-------
implementation project(':flutter')
}
==========================================
4. Android manifest
-> Under manifest tag
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-permission android:name="android.permission.VIDEO_CAPTURE" />
<uses-permission android:name="android.permission.AUDIO_CAPTURE" />
-> Register activity just above closing application tag
<activity
android:name="io.flutter.embedding.android.FlutterActivity"
android:theme="_____________YOUR_THEME_FROM_STYLES____________________"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize"/>
=============================================
5.
import io.flutter.embedding.android.FlutterActivity;
---- Call on action to open live try on
startActivity(
FlutterActivity
.withNewEngine()
.initialRoute("liveTryOn/--------------clientId-------------" +
"/------------product Id ---------------------")
.build(this)
);
1. Extract module in you project directory and run
-- flutter build aar
(
If flutter is not installed
visit below link for flutter sdk setup.
Download flutter sdk and setup dlutter path.
https://flutter.dev/docs/get-started/install/windows
https://flutter.dev/docs/get-started/install/macos
https://flutter.dev/docs/get-started/install/linux
- Extract flutter SDK zip which is downloaded from that link.
- Add path of flutter to environment variables.
- Update your path
If you wish to run Flutter commands in the regular Windows console, take these steps to add Flutter to the PATH environment variable:
From the Start search bar, enter ‘env’ and select Edit environment variables for your account.
Under User variables check if there is an entry called Path:
If the entry exists, append the full path to flutter\bin using ; as a separator from existing values.
If the entry doesn’t exist, create a new user variable named Path with the full path to flutter\bin as its value.
- In case of No Android SDK found. Try setting the ANDROID_SDK_ROOT environment variable.
Add a new environment variable
ANDROID_HOME -> path of android SDK (Ex: C:\Users\Administrator\AppData\Local\Android\Sdk)
Add new paths in
Path -> ;%ANDROID_HOME%\tools;%ANDROID_HOME%\tools\bin;%ANDROID_HOME%\platform-tools
)
=============================================
2. settings.gradel
setBinding(new Binding([gradle:this]))
evaluate(new File(
settingsDir.parentFile,
'MyApplication2/live_tryon/.android/include_flutter.groovy'
))
include ':live_tryon'
MyApplication2 == Main project root directory.
=============================================
3. build.gradel under app
change defaultConfig -> minSdkVersion to minimum 17
dependencies {
-------
implementation project(':flutter')
}
==========================================
4. Android manifest
-> Under manifest tag
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-permission android:name="android.permission.VIDEO_CAPTURE" />
<uses-permission android:name="android.permission.AUDIO_CAPTURE" />
-> Register activity just above closing application tag
<activity
android:name="io.flutter.embedding.android.FlutterActivity"
android:theme="_____________YOUR_THEME_FROM_STYLES____________________"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize"/>
=============================================
5.
import io.flutter.embedding.android.FlutterActivity;
---- Call on action to open live try on
startActivity(
FlutterActivity
.withNewEngine()
.initialRoute("liveTryOn/--------------clientId-------------" +
"/------------product Id ---------------------")
.build(this)
);