Skip to content
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

keepDexApply 值会影响编译???? #667

Closed
wuhaiyang opened this issue Nov 14, 2017 · 3 comments
Closed

keepDexApply 值会影响编译???? #667

wuhaiyang opened this issue Nov 14, 2017 · 3 comments
Labels

Comments

@wuhaiyang
Copy link

wuhaiyang commented Nov 14, 2017

异常类型:编译异常

手机型号:

手机系统版本:

tinker版本:1.9.1

gradle版本:gradle4.1

gradle-plugin 版本: classpath 'com.android.tools.build:gradle:3.0.0'

Android-studio 版本:Android-studio3.0

是否使用热更新SDK:原生tinker

系统:如:Mac

堆栈/日志:
groovy.lang.MissingPropertyException: Could not get unknown property 'apkVariantData' for object of type com.android.build.gradle.internal.api.ApplicationVariantImpl.
at org.gradle.internal.metaobject.AbstractDynamicObject.getMissingProperty(AbstractDynamicObject.java:86)
at org.gradle.internal.metaobject.AbstractDynamicObject.getProperty(AbstractDynamicObject.java:61)
at com.android.build.gradle.internal.api.ApplicationVariantImpl_Decorated.getProperty(Unknown Source)
at com.tencent.tinker.build.gradle.transform.ImmutableDexTransform.inject(ImmutableDexTransform.groovy:363)
at com.tencent.tinker.build.gradle.transform.ImmutableDexTransform$inject.call(Unknown Source)
at com.tencent.tinker.build.gradle.TinkerPatchPlugin$_apply_closure1$_closure2.doCall(TinkerPatchPlugin.groovy:210)
at org.gradle.api.internal.ClosureBackedAction.execute(ClosureBackedAction.java:71)
at org.gradle.util.ConfigureUtil.configureTarget(ConfigureUtil.java:160)
at org.gradle.util.ConfigureUtil.configure(ConfigureUtil.java:106)
at org.gradle.util.ConfigureUtil$1.execute(ConfigureUtil.java:123)
at org.gradle.api.internal.DefaultDomainObjectCollection.all(DefaultDomainObjectCollection.java:136)
at org.gradle.api.internal.DefaultDomainObjectCollection.all(DefaultDomainObjectCollection.java:154)
at org.gradle.api.DomainObjectCollection$all.call(Unknown Source)
at com.tencent.tinker.build.gradle.TinkerPatchPlugin$_apply_closure1.doCall(TinkerPatchPlugin.groovy:116)
at org.gradle.listener.ClosureBackedMethodInvocationDispatch.dispatch(ClosureBackedMethodInvocationDispatch.java:40)
at org.gradle.listener.ClosureBackedMethodInvocationDispatch.dispatch(ClosureBackedMethodInvocationDispatch.java:25)
at org.gradle.internal.event.AbstractBroadcastDispatch.dispatch(AbstractBroadcastDispatch.java:42)
at org.gradle.internal.event.BroadcastDispatch$SingletonDispatch.dispatch(BroadcastDispatch.java:230)
at org.gradle.internal.event.BroadcastDispatch$SingletonDispatch.dispatch(BroadcastDispatch.java:149)
at org.gradle.internal.event.AbstractBroadcastDispatch.dispatch(AbstractBroadcastDispatch.java:58)
at org.gradle.internal.event.BroadcastDispatch$CompositeDispatch.dispatch(BroadcastDispatch.java:324)
at org.gradle.internal.event.BroadcastDispatch$CompositeDispatch.dispatch(BroadcastDispatch.java:234)
at org.gradle.internal.event.ListenerBroadcast.dispatch(ListenerBroadcast.java:140)
at org.gradle.internal.event.ListenerBroadcast.dispatch(ListenerBroadcast.java:37)
at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93)
at com.sun.proxy.$Proxy23.afterEvaluate(Unknown Source)
at org.gradle.configuration.project.LifecycleProjectEvaluator.notifyAfterEvaluate(LifecycleProjectEvaluator.java:75)

情景:目前将tinker配置脚本从app 的build.gradle 分离出来单独放到一个脚本文件中
配置如下
tinkerPatch{
....

 buildConfig{
     keepDexApply = true 
 }
 ....

}
一旦keepDexApply 设置为true ,就会导致编译不过,错误日志见上述描述;设置为false ,编译正常。
不知道什么情况,希望作者解释下原因,谢谢~

@icemanstudy
Copy link

我也是打开这个开关有问题.报的错误是
found loader classes are found in new secondary dex
我发现在打开这个开关的情况下,新的apk中会包含重复的dex文件.

@shwenzhang shwenzhang added the bug label Nov 20, 2017
@shwenzhang
Copy link
Contributor

没有适配keepdexapply的编译,稍后会fix

@wuhaiyang
Copy link
Author

感谢大佬,希望及时修复

alyssaharvey3 pushed a commit to alyssaharvey3/tinker-common-iOS-Apps that referenced this issue Oct 18, 2022
zarakarlsson628 added a commit to zarakarlsson628/iOS-Apps-build that referenced this issue Oct 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants