Skip to content

Commit

Permalink
修复两个Multidex插件有重复Activity名的问题。
Browse files Browse the repository at this point in the history
  • Loading branch information
shifujun committed May 5, 2019
1 parent 7de0886 commit d5a7d34
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,10 @@ public void onClick(View v) {
intent.putExtra(Constant.KEY_ACTIVITY_CLASSNAME, "com.tencent.shadow.demo.gallery.splash.SplashActivity");
break;
case Constant.PART_KEY_MULTIDEX_V1_0_2:
intent.putExtra(Constant.KEY_ACTIVITY_CLASSNAME, "com.tencent.shadow.demo.plugin.multidex.v1_0_2.PluginMultidexV1_0_2Activity");
break;
case Constant.PART_KEY_MULTIDEX_V2_0_1:
intent.putExtra(Constant.KEY_ACTIVITY_CLASSNAME, "com.tencent.shadow.demo.plugin.multidex.main.PluginMultidexMainActivity");
intent.putExtra(Constant.KEY_ACTIVITY_CLASSNAME, "com.tencent.shadow.demo.plugin.multidex.v2_0_1.PluginMultidexV2_0_1Activity");
break;
}
startActivity(intent);
Expand Down
1 change: 1 addition & 0 deletions projects/demo/plugin-multidex/multidex-config.pro
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
-keep class android.support.multidex.**
-keep class androidx.multidex.**
Original file line number Diff line number Diff line change
@@ -1,14 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.tencent.shadow.demo.plugin.multidex.main">

<application>
<activity android:name=".PluginMultidexMainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
<manifest package="com.tencent.shadow.demo.plugin.multidex.main" />
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import android.app.Activity
import android.os.Bundle
import android.widget.TextView

class PluginMultidexMainActivity : Activity() {
open class PluginMultidexMainActivity : Activity() {

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,14 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.tencent.shadow.demo.plugin.multidex.v1_0_2">

<application android:name="android.support.multidex.MultiDexApplication" />
<application android:name="android.support.multidex.MultiDexApplication">
<activity android:name=".PluginMultidexV1_0_2Activity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>

</manifest>
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package com.tencent.shadow.demo.plugin.multidex.v1_0_2;

import com.tencent.shadow.demo.plugin.multidex.main.PluginMultidexMainActivity;

public class PluginMultidexV1_0_2Activity extends PluginMultidexMainActivity {
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,13 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.tencent.shadow.demo.plugin.multidex.v2_0_1">

<application android:name="androidx.multidex.MultiDexApplication" />
<application android:name="androidx.multidex.MultiDexApplication">
<activity android:name=".PluginMultidexV2_0_1Activity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package com.tencent.shadow.demo.plugin.multidex.v2_0_1;

import com.tencent.shadow.demo.plugin.multidex.main.PluginMultidexMainActivity;

public class PluginMultidexV2_0_1Activity extends PluginMultidexMainActivity {
}

0 comments on commit d5a7d34

Please sign in to comment.