AndResGuard icon indicating copy to clipboard operation
AndResGuard copied to clipboard

打包出现do not have the compress data path=com/appsflyer/internal/a

Open huazhouwujinbiao opened this issue 5 years ago • 7 comments

项目里接了appsflyer,版本为com.appsflyer:af-android-sdk:4.10.0@aar AndResGuard使用的版本为com.tencent.mm:AndResGuard-gradle-plugin:1.1.8

Windows编译出现下面的错误,linux和mac下编译没有该问题

经过跟踪发现appsflyer的classes.jar中存在一个com/appsflyer/internal/a.和b.文件,而AndResGuard打包时估计是把文件名后缀.去掉了,导致出现下面的“do not have the compress data path=com/appsflyer/internal/a”编译错误

尝试使用AndResGuard最新版本打包,编译能通过,但是原来的打包后应该存在的a.和b.文件不见了。(不混淆资源打包后apk根目录下应该有com/appsflyer/internal/a.和b.文件)

出现该问题该怎么解决?

resourceprpguard begin
unziping apk to E:\xxxxx\app\build\outputs\apk\AndResGuard_xxx-release-xxxxx\temp
decoding resources.arsc
parse to get the exist names in the resouces.arsc first
Config flags size > 38. Exceeding bytes: 0x746E00000000000000000000000000000000.
reading packagename screenrecorder.pro
Config flags size > 38. Exceeding bytes: 0x746E00000000000000000000000000000000.
resources mapping file E:\xxxxx\app\build\outputs\apk\AndResGuard_xxxxx-release-xxxxx\resource_mapping_xxxxx-release-xxxxx.txt done
writing new resources.arsc
resources.arsc Character Encoding: utf-8
general unsigned apk: xxxxx-release-xxxxx_unsigned.apk
DestResDir 965 rawResDir 965
java.io.IOException: do not have the compress data path=com/appsflyer/internal/a
at com.tencent.mm.util.FileOperation.zipFile(FileOperation.java:224)
at com.tencent.mm.util.FileOperation.zipFile(FileOperation.java:215)
at com.tencent.mm.util.FileOperation.zipFile(FileOperation.java:215)
at com.tencent.mm.util.FileOperation.zipFile(FileOperation.java:215) at com.tencent.mm.util.FileOperation.zipFiles(FileOperation.java:204) at com.tencent.mm.androlib.ResourceApkBuilder.generalUnsignApk(ResourceApkBuilder.java:208) at com.tencent.mm.androlib.ResourceApkBuilder.buildApk(ResourceApkBuilder.java:45) at com.tencent.mm.resourceproguard.Main.buildApk(Main.java:94) at com.tencent.mm.resourceproguard.Main.resourceProguard(Main.java:71) at com.tencent.mm.resourceproguard.Main.run(Main.java:43) at com.tencent.mm.resourceproguard.Main.gradleRun(Main.java:37) at com.tencent.mm.resourceproguard.Main$gradleRun.call(Unknown Source) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125) at com.tencent.gradle.AndResGuardSchemaTask$_resuguard_closure3.doCall(AndResGuardSchemaTask.groovy:95) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)

huazhouwujinbiao avatar Aug 12 '19 10:08 huazhouwujinbiao

我其实没太理解问题,和编译机的操作系统有关?

simpleton avatar Oct 15 '19 19:10 simpleton

在windows上我也遇到了同样的报错。项目完整的传给了用mac的同事,然后用mac编译没有问题。 版本:1.2.17 do not have the compress data path =com/appsflyer/internal/a in resource.asrc do not have the compress data path =com/appsflyer/internal/b in resource.asrc

caizhixing avatar Nov 08 '19 11:11 caizhixing

image 我在window上打包也出现这个问题,然后我的AppsFlyer就不能正常的运行了,收集不到激活数据,appsflyer sdk的回调都没有执行

chenyusheng avatar Feb 19 '20 11:02 chenyusheng

我也遇到了类似的问题,请问这个问题解决了吗?

henleylee avatar Apr 29 '20 03:04 henleylee

assembleRelease生成的apk的根目录下面有个com/razorpay/a_文件,resguardRelease命令生成的E:\xxxxx\app\build\outputs\apk\AndResGuard_xxx-release-xxxxx\temp目录下面也有这个文件,文件名有细微区别,但是最终生成的apk根目录下面这个文件文件不见了,控制台输出了以下日志:

do not have the compress data path =com/razorpay/a in resource.asrc

这个问题导致程序运行到使用这个文件的地方崩溃,请问这个问题需要怎么解决?

henleylee avatar Apr 29 '20 06:04 henleylee

我的解决方案是换成在 linux 或 mac上去打包就好了

chenyusheng avatar Apr 29 '20 06:04 chenyusheng

Hi Team!

The issue seems to have been caused by files a. and b. having trailing dots which is illegal naming on Windows machines and may cause issues when using AndResGuard and other custom build processes.

I wanted to let you know that since AppsFlyer SDK version 5.3.0+ files are renamed to be a- and b- and shouldn't cause these issues anymore. If you still encounter problems with the latest SDK version of AppsFlyer, please post here or contact our Support Team so that we can investigate.

Please make sure you clean your project and indeed using the latest version. The best way to confirm is to check AppsFlyer SDK logs in the runtime

sokoloff06 avatar May 27 '20 07:05 sokoloff06