-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fragment cannot be cast to android.support.v4.app.Fragment #378
Comments
gradle 编译的时候把v4包移除就行了 |
碰到同样的问题,请问您解决了嘛 @TongWeiLe |
把demo里面libs下面的fragment包加到你的项目中去provided files('libs/fragment.jar')//这个jar就是从Support-fragment中提取出来的并非特制包目的是为了骗过编译期 |
@1321365765 插件中已经provided files('libs/fragment.jar')了,并exclude(group: 'com.android.support', module: 'support-v4')移除v4包,为什么还会报这个错误 |
@ByEric 可以发下插件的build.gradle |
@1321365765
} |
@ByEric |
@1321365765 |
我写了一个脚本来解决这个问题,仓库是https://github.com/lijunjieone/replugin-resolve-deps-conflict.git ,当遇到冲突的时候,通过脚本删掉冲突的文件.目前测试还算ok |
问题详细描述 Detailed description of the problem
要打开的插件Fragment继承了Fragment.jar中的V4Fragment,但还是报了这个问题,怎么解决?
复现问题步骤 Steps to reproduce the problem
其它重要信息 Other important information
replugin-host-lib/gradle Version:2.2.0
rePlugin-plugin-lib/gradle Version:2.2.0
Android API Version:5.1
Android 手机型号&ROM(Phone model & ROM):
Logcat上下文 Logcat context
The text was updated successfully, but these errors were encountered: