Skip to content

Commit 93039a6

Browse files
author
huangx
committed
解决部分机型报 is not accessible from java.lang.Class android.app.AppComponentFactory 问题
1 parent ba00ea4 commit 93039a6

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
```
1111
buildscript {
1212
dependencies {
13-
classpath "cn.hx.plugin:android-junk-code:1.0.3"
13+
classpath "cn.hx.plugin:android-junk-code:1.0.4"
1414
}
1515
}
1616
```

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ buildscript {
99
}
1010
}
1111
dependencies {
12-
classpath 'com.android.tools.build:gradle:4.1.0'
12+
classpath 'com.android.tools.build:gradle:4.1.1'
1313
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1414
classpath 'com.novoda:bintray-release:0.9.2'
15-
classpath "cn.hx.plugin:android-junk-code:1.0.3"
15+
classpath "cn.hx.plugin:android-junk-code:1.0.4"
1616
classpath "com.getkeepsafe.dexcount:dexcount-gradle-plugin:2.0.0"
1717

1818
// NOTE: Do not place your application dependencies here; they belong

library/project.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
project.name=AndroidJunkCode
33
project.groupId=cn.hx.plugin
44
project.artifactId=android-junk-code
5-
project.artifactVersion=1.0.3
5+
project.artifactVersion=1.0.4
66
project.siteUrl=https://github.com/qq549631030/AndroidJunkCode
77
project.gitUrl=https://github.com/qq549631030/AndroidJunkCode.git
88
project.desc=generate junk code for android

library/src/main/groovy/cn/hx/plugin/junkcode/task/AndroidJunkCodeTask.groovy

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ class AndroidJunkCodeTask extends DefaultTask {
5858
for (int j = 0; j < config.otherCountPerPackage; j++) {
5959
def className = generateName(j).capitalize()
6060
def typeBuilder = TypeSpec.classBuilder(className)
61+
typeBuilder.addModifiers(Modifier.PUBLIC)
6162
for (int k = 0; k < config.methodCountPerClass; k++) {
6263
def methodName = generateName(k)
6364
def methodBuilder = MethodSpec.methodBuilder(methodName)
@@ -130,6 +131,7 @@ class AndroidJunkCodeTask extends DefaultTask {
130131
generateLayout(layoutName)
131132
def typeBuilder = TypeSpec.classBuilder(className)
132133
typeBuilder.superclass(ClassName.get("android.app", "Activity"))
134+
typeBuilder.addModifiers(Modifier.PUBLIC)
133135
//onCreate方法
134136
def bundleClassName = ClassName.get("android.os", "Bundle")
135137
typeBuilder.addMethod(MethodSpec.methodBuilder("onCreate")

0 commit comments

Comments
 (0)