添加flutter module依赖

This commit is contained in:
zu
2021-03-09 23:58:19 +08:00
parent 7a3adc590e
commit e0747348f0
6 changed files with 30 additions and 2 deletions

View File

@@ -289,6 +289,8 @@ dependencies {
implementation files('libs/msa_mdid_1.0.13.aar')
implementation 'com.huawei.hms:push:4.0.4.301'
implementation fileTree(dir: 'libs', include: ['oppo-mcssdk-2.0.2.jar'])
// xplan flutter module
implementation project(path: ':flutter')
}
repositories {

View File

@@ -1270,6 +1270,12 @@
android:theme="@android:style/Theme.Translucent.NoTitleBar"
tools:remove="android:screenOrientation" />
<activity
android:name="io.flutter.embedding.android.FlutterActivity"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize" />
</application>
</manifest>

View File

@@ -18,6 +18,8 @@ import com.yizhuan.xchat_android_library.utils.pref.CommonPref;
import java.util.ArrayList;
import io.flutter.embedding.android.FlutterActivity;
/**
* Created by chenran on 2017/10/16.
*/
@@ -31,6 +33,7 @@ public class LabActivity extends BaseActivity {
findViewById(R.id.rb_h5_test).setOnClickListener(v -> CommonWebViewActivity.start(context, "http://192.168.10.7:5503/"));
//vue测试地址
findViewById(R.id.rb_vue_test).setOnClickListener(v -> CommonWebViewActivity.start(context, "http://192.168.10.7:8080/"));
findViewById(R.id.rb_flutter_test).setOnClickListener(v -> startActivity(FlutterActivity.createDefaultIntent(context)));
int enviroment = CommonPref.instance(BasicConfig.INSTANCE.getAppContext()).getInt(Env.KEY_ENVIRONMENT);
//根据ID找到RadioGroup实例
RadioGroup group = (RadioGroup) this.findViewById(R.id.radioGroup);

View File

@@ -61,4 +61,15 @@
android:background="@color/color_f5f5f5"
android:textColor="@color/color_333333"
android:textSize="15sp" />
<TextView
android:id="@+id/rb_flutter_test"
android:layout_width="match_parent"
android:layout_height="50dp"
android:gravity="center_vertical"
android:paddingStart="10dp"
android:text="flutter测试入口"
android:layout_marginTop="10dp"
android:background="@color/color_f5f5f5"
android:textColor="@color/color_333333"
android:textSize="15sp" />
</LinearLayout>

View File

@@ -2,3 +2,9 @@ include ':app', ':agora-ktv-kit-release', ':android_crop_lib'
include ':core'
include ':library'
include ':nim_uikit'
// 添加 flutter module 依赖
setBinding(new Binding([gradle: this]))// new
evaluate(new File( // new
settingsDir.parentFile, // new
'accompany-android/xplan-flutter/.android/include_flutter.groovy' // new
))