File tree Expand file tree Collapse file tree 5 files changed +12
-5
lines changed
PluginCore/src/com/plugin/core Expand file tree Collapse file tree 5 files changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -249,6 +249,9 @@ public static Class loadPluginClassByName(String clazzName) {
249
249
e .printStackTrace ();
250
250
} catch (java .lang .IllegalAccessError illegalAccessError ) {
251
251
illegalAccessError .printStackTrace ();
252
+ throw new IllegalAccessError ("出现这个异常最大的可能是插件dex和" +
253
+ "宿主dex包含了相同的class导致冲突, " +
254
+ "请检查插件的编译脚本,确保排除了所有公共依赖库的jar" );
252
255
}
253
256
254
257
}
Original file line number Diff line number Diff line change 18
18
19
19
<!-- plugin Begin -->
20
20
<activity
21
- android : name =" com.plugin.core.ui.PluginNormalFragmentActivity"
22
- android : exported =" true" >
21
+ android : name =" com.plugin.core.ui.PluginNormalFragmentActivity" >
23
22
</activity >
24
23
25
24
<activity
26
- android : name =" com.plugin.core.ui.stub.PluginStubActivity"
27
- android : exported =" true" >
25
+ android : name =" com.plugin.core.ui.stub.PluginStubActivity" >
28
26
</activity >
29
27
30
28
<service android : name =" com.plugin.core.proxy.PluginProxyService" >
Original file line number Diff line number Diff line change @@ -64,16 +64,22 @@ android {
64
64
}
65
65
66
66
dependencies {
67
- // compile 'com.android.support:appcompat-v7:23.0.0'
67
+
68
68
compile fileTree(dir : ' libs' , include : [' *.jar' ])
69
69
70
70
// 依赖库的R
71
71
provided files(project(' :PluginShareLib' ). getBuildDir(). absolutePath + ' /outputs/rClasses.jar' )
72
72
// 依赖库的src
73
73
provided files(project(' :PluginShareLib' ). getBuildDir(). absolutePath + ' /intermediates/bundles/release/classes.jar' )
74
+ // 依赖库的依赖裤
75
+ provided files(project(' :PluginShareLib' ). getBuildDir(). absolutePath + ' /intermediates/bundles/release/libs/android-support-v4.jar' )
76
+
74
77
// 依赖库的src
75
78
provided files(project(' :PluginCore' ). getBuildDir(). absolutePath + ' /intermediates/bundles/release/classes.jar' )
76
79
80
+ // compile 'com.android.support:appcompat-v7:23.0.0'
81
+ // provided('com.android.support:appcompat-v7:23.0.0')
82
+
77
83
// 如果插件需要依赖一些私有库,可放开下面的注释,并修改为私有库的名称
78
84
// compile project(':PluginPrivateLib1')
79
85
// compile project(':PluginPrivateLib2')
You can’t perform that action at this time.
0 commit comments