Skip to content

Commit

Permalink
解决部分机型报 is not accessible from java.lang.Class android.app.AppCompone…
Browse files Browse the repository at this point in the history
…ntFactory 问题
  • Loading branch information
huangx committed Nov 16, 2020
1 parent ba00ea4 commit 93039a6
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
```
buildscript {
dependencies {
classpath "cn.hx.plugin:android-junk-code:1.0.3"
classpath "cn.hx.plugin:android-junk-code:1.0.4"
}
}
```
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ buildscript {
}
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.0'
classpath 'com.android.tools.build:gradle:4.1.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.novoda:bintray-release:0.9.2'
classpath "cn.hx.plugin:android-junk-code:1.0.3"
classpath "cn.hx.plugin:android-junk-code:1.0.4"
classpath "com.getkeepsafe.dexcount:dexcount-gradle-plugin:2.0.0"

// NOTE: Do not place your application dependencies here; they belong
Expand Down
2 changes: 1 addition & 1 deletion library/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
project.name=AndroidJunkCode
project.groupId=cn.hx.plugin
project.artifactId=android-junk-code
project.artifactVersion=1.0.3
project.artifactVersion=1.0.4
project.siteUrl=https://github.com/qq549631030/AndroidJunkCode
project.gitUrl=https://github.com/qq549631030/AndroidJunkCode.git
project.desc=generate junk code for android
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ class AndroidJunkCodeTask extends DefaultTask {
for (int j = 0; j < config.otherCountPerPackage; j++) {
def className = generateName(j).capitalize()
def typeBuilder = TypeSpec.classBuilder(className)
typeBuilder.addModifiers(Modifier.PUBLIC)
for (int k = 0; k < config.methodCountPerClass; k++) {
def methodName = generateName(k)
def methodBuilder = MethodSpec.methodBuilder(methodName)
Expand Down Expand Up @@ -130,6 +131,7 @@ class AndroidJunkCodeTask extends DefaultTask {
generateLayout(layoutName)
def typeBuilder = TypeSpec.classBuilder(className)
typeBuilder.superclass(ClassName.get("android.app", "Activity"))
typeBuilder.addModifiers(Modifier.PUBLIC)
//onCreate方法
def bundleClassName = ClassName.get("android.os", "Bundle")
typeBuilder.addMethod(MethodSpec.methodBuilder("onCreate")
Expand Down

0 comments on commit 93039a6

Please sign in to comment.