Closed EthanCo closed 8 years ago
能否看下哪个类在不同的插件中重复了
Sample跑下看看 我这测试过Ok的
貌似是缓存的原因,我将so和build都删除后再编译运行,竟然就好了 。。
@galenlin 现在的情况是 我将so和build都删除后再编译运行,是正常运行的,但是退出后(在进程管理中清除该App或者重新启动手机),再点击图标进入,还是出现pre-verified的错误。
这个错误在 努比亚Z5 (Android4.4),小米Note (Android4.4) 上 测试出现
在魅族Mx6 (Android6.0) 上,运行正常
环境为net.wequick.tools.build:gradle-small:1.0.0-beta6,aarVersion = '1.1.0-beta4'
Android Studio 2.1.2,gradle 2.10
app
dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) testCompile 'junit:junit:4.12' compile 'com.android.support:appcompat-v7:23.2.1' compile 'com.android.support:design:23.2.1' compile 'com.android.support:support-v4:23.2.1' }
app.main
dependencies { compile fileTree(include: ['*.jar'], dir: 'libs') testCompile 'junit:junit:4.12' compile 'com.android.support:appcompat-v7:23.2.1' compile 'com.android.support:design:23.2.1' compile project(':lib.utils') compile project(':lib.frame') compile project(':lib.network') compile project(':lib.style') }
app.music
dependencies { compile fileTree(include: ['*.jar'], dir: 'libs') testCompile 'junit:junit:4.12' compile 'com.android.support:appcompat-v7:23.2.1' compile 'com.android.support:design:23.2.1' compile project(':lib.utils') compile project(':lib.imageproxy') compile project(':lib.frame') compile project(':lib.style') }
lib.frame
dependencies { compile fileTree(include: ['*.jar'], dir: 'libs') testCompile 'junit:junit:4.12' compile 'com.android.support:appcompat-v7:23.2.1' compile 'com.jakewharton:butterknife:7.0.1' }
lib.imageproxy
dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) testCompile 'junit:junit:4.12' compile 'com.android.support:appcompat-v7:23.2.1' compile 'com.github.bumptech.glide:glide:3.7.0' }
lib.network
dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) testCompile 'junit:junit:4.12' compile 'com.android.support:appcompat-v7:23.2.1'
//retrofit
compile 'com.squareup.retrofit2:retrofit-converters:2.1.0'
compile 'com.squareup.retrofit2:converter-gson:2.1.0'
compile 'com.squareup.retrofit2:adapter-rxjava:2.1.0'
compile 'com.squareup.okhttp3:okhttp:3.4.1'
compile 'com.squareup.okhttp3:logging-interceptor:3.4.1'
//FileDownloader 文件下载 基于Okhttp
compile 'com.liulishuo.filedownloader:library:0.3.4'
//rxjava
compile 'io.reactivex:rxjava:1.1.5'
compile 'io.reactivex:rxandroid:1.2.0'
}
lib.style
dependencies { compile 'com.android.support:appcompat-v7:23.2.1' compile fileTree(dir: 'libs', include: ['*.jar']) testCompile 'junit:junit:4.12' }
lib.utils
dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) testCompile 'junit:junit:4.12' compile 'com.android.support:appcompat-v7:23.2.1' }
奉上源码
[Uploading MySmallSample.zip…]()
@galenlin 我在应用程序管理中将该App的数据清除后,再运行,又可以正常运行了 。。。 但是和之前的一样,退出后(在进程管理中清除该App或者重新启动手机),再点击图标进入,依旧报 pre-verified 错误
现在已使用回gradle-small:0.9.0,使用该版本 运行没有问题。
“在进程管理中清除该App” 指的是清除数据、清除缓存还是强制停止?
@galenlin “我在应用程序管理中将该App的数据清除后,再运行,又可以正常运行了 。。。 ” 指的是清除数据、清除缓存,即设置里面 - 应用程序 - 应用信息详情里 的 清除数据
Sample中能复现这个bug吗 有哪些机型会报
Sample中貌似不会,我手上的 努比亚Z5 (Android4.4),小米Note (Android4.4) ,小米2S (Android4.4) 有这个情况 ,魅族Mx6 (Android6.0) 强退后再进入,正常。 手头上就这几个手机了。。
我把apk上传到了百度云上,如果你那边有其他机型的话,可以测一下 MySmallSample.apk
运行报错 pre-verified,使用gradle-small:0.9.0运行没有问题,使用 gradle-small:1.0.0-beta5 或 gradle-small:1.0.0-beta6 运行都报 pre-verified 错误
E/AndroidRuntime: FATAL EXCEPTION: main Process: com.ethanco.mysmallsample, PID: 23343 java.lang.IllegalAccessError: Class ref in pre-verified class resolved to unexpected implementation at android.support.v7.widget.AppCompatDrawableManager.getTintList(AppCompatDrawableManager.java:513) at android.support.v7.widget.AppCompatBackgroundHelper.loadFromAttributes(AppCompatBackgroundHelper.java:48) at android.support.v7.widget.AppCompatEditText.(AppCompatEditText.java:64) at android.support.v7.widget.AppCompatEditText.(AppCompatEditText.java:56) at android.support.v7.app.AppCompatViewInflater.createView(AppCompatViewInflater.java:112) at android.support.v7.app.AppCompatDelegateImplV7.createView(AppCompatDelegateImplV7.java:1008) at android.support.v7.app.AppCompatDelegateImplV7.onCreateView(AppCompatDelegateImplV7.java:1067) at android.support.v4.view.LayoutInflaterCompatHC$FactoryWrapperHC.onCreateView(LayoutInflaterCompatHC.java:44) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:684) at android.view.LayoutInflater.rInflate(LayoutInflater.java:755) at android.view.LayoutInflater.rInflate(LayoutInflater.java:758) at android.view.LayoutInflater.inflate(LayoutInflater.java:492) at android.view.LayoutInflater.inflate(LayoutInflater.java:397) at android.view.LayoutInflater.inflate(LayoutInflater.java:353) at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:280) at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140) at com.ethanco.app.main.MainActivity.onCreate(MainActivity.java:35) at android.app.Activity.performCreate(Activity.java:5231) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087) at net.wequick.small.ApkBundleLauncher$InstrumentationWrapper.callActivityOnCreate(ApkBundleLauncher.java:167) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2227) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2313) at android.app.ActivityThread.access$800(ActivityThread.java:147) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1226) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:136) at android.app.ActivityThread.main(ActivityThread.java:5137) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:801) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:617) at dalvik.system.NativeStart.main(Native Method)