堆栈跟踪反混淆:带有ProGuard和Crashlytics的Android Studio(Stack trace deobfuscation: Android Studio with ProGuard and Crashlytics)
堆栈跟踪反混淆技术如何与Android Studio,ProGuard和Crashlytics协同工作?
每个应用程序构建生成一个唯一的构建ID,据我了解,即使应用程序的
versionCode
和versionName
没有改变,它也会生成:<string name = "com.crashlytics.android.build_id">RANDOM_UUID</ string>
正如我在编译时所假设的,这个构建ID和mapping.txt一起被上传到Crashlytics服务器。 而且,每个崩溃报告都会包含此构建ID。 因此,Crashlytics服务器可以找到正确的mapping.txt,即使对于具有相同
versionCode
和versionName
versionCode
也是如此。但是如果在构建过程中我暂时失去了互联网连接,我不会注意到这一点? 我试图在互联网关闭的情况下进行构建,并且成功,没有任何警告,也没有错误。 但我预计这个构建会失败,并抱怨说它无法将mapping.txt和构建ID上传到Crashlytics服务器。
那么,Gradle的Crashlytics插件如何处理没有互联网的构建?
假设,Crashlytics可以用相同的
versionCode
和versionName
来区分构建,是正确的吗?UPD。 在我得到Mike的回答之前,我还通过简单的做
./gradlew tasks --all
找到了关于发生了什么的见解 - 都在我的项目根目录中:
- app:crashlyticsStoreDeobsRelease - 在完成发布版本之后调用Crashlytics目标。 清理Crashlytics生成的资源文件。 将反混淆文件缓存并上传到Crashlytics服务器。
- 应用程序:crashlyticsUploadDeobsRelease - 将存储的反混淆文件上传到Crashlytics。
- app:crashlyticsUploadDistributionDebug - 将APK上传到Crashlytics进行分发。
- app:crashlyticsUploadDistributionRelease - 将APK上传到Crashlytics进行分发。
- app:fabricGenerateResourcesDebug - 注入Fabric SDK使用的构建ID。
- app:fabricGenerateResourcesRelease - 注入Fabric SDK使用的构建标识。
How does the magic of stack trace deobfuscation works with Android Studio, ProGuard and Crashlytics?
Each app build generates an unique build id, and as I understand, it is generated even if
versionCode
andversionName
of the app haven't changed:<string name = "com.crashlytics.android.build_id">RANDOM_UUID</ string>
As I assuming, at build time, this build id, together with mapping.txt, is uploaded to the Crashlytics server. And, in turn, each crash report contains this build id. Thus, the Crashlytics server can find the correct mapping.txt, even for builds with the same
versionCode
andversionName
.But what if during the build I got temporary lost an Internet connection, and I wouldn't notice this? I've tried to make a build with the Internet turned off, and it was successful, no warnings, no errors. But I anticipated the build would fail, complaining that it couldn't upload mapping.txt and the build id to the Crashlytics server.
So, how Crashlytics plugin for Gradle does handles build without Internet?
And is assumption, that Crashlytics can distinguish builds with the same
versionCode
andversionName
, is correct?UPD. Before I got answer from Mike, I've also found insights on what's going on under the hood, by simply doing
./gradlew tasks --all
in my projects root directory:
- app:crashlyticsStoreDeobsRelease - Crashlytics target to be invoked after completing release builds. Cleans up Crashlytics-generated resource files. Caches and uploads deobfuscation files to Crashlytics servers.
- app:crashlyticsUploadDeobsRelease - Uploads stored deobfuscation files to Crashlytics.
- app:crashlyticsUploadDistributionDebug - Uploads an APK to Crashlytics for distribution.
- app:crashlyticsUploadDistributionRelease - Uploads an APK to Crashlytics for distribution.
- app:fabricGenerateResourcesDebug - Injects the build id used by the Fabric SDK.
- app:fabricGenerateResourcesRelease - Injects the build id used by the Fabric SDK.
原文:https://stackoverflow.com/questions/48512131
最满意答案
你可以这样做:
SELECT MT.NQ, MT.ProductId, MT.Product, MT.Warehouse, MT.ProductType, MT.Transactiontime FROM @MaxTime MT INNER JOIN ( SELECT ProductId , MAX(Transactiontime) AS 'TransactionTime' FROM @MaxTime GROUP BY Productid ) GR ON MT.ProductId = GR.ProductId AND MT.TransactionTime = GR.TransactionTime ORDER BY MT.ProductId
You could do:
SELECT MT.NQ, MT.ProductId, MT.Product, MT.Warehouse, MT.ProductType, MT.Transactiontime FROM @MaxTime MT INNER JOIN ( SELECT ProductId , MAX(Transactiontime) AS 'TransactionTime' FROM @MaxTime GROUP BY Productid ) GR ON MT.ProductId = GR.ProductId AND MT.TransactionTime = GR.TransactionTime ORDER BY MT.ProductId
相关问答
更多-
最简单的方法是利用数组键的唯一性: $grouped = array(); while ($row = $db->fetchResult()) { // or however you get your data if (isset($grouped[$row['item']])) { $grouped[$row['item']]['count']++; } else { $grouped[$row['item']] = $row + array('coun ...
-
sql group by function(sql group by function)[2022-02-26]
你可以这样做: SELECT MT.NQ, MT.ProductId, MT.Product, MT.Warehouse, MT.ProductType, MT.Transactiontime FROM @MaxTime MT INNER JOIN ( SELECT ProductId , MAX(Transactiontime) AS 'TransactionTime' FROM @ ... -
您正在加入商店以租赁给员工。 因此,您的COUNT()函数将返回相同的值(租赁和员工的产品)。 你没有解释你的家庭作业的逻辑,但让我们猜测:你想要计算每家商店的员工数量和每家商店的租金数量,以及所有商店的平均租金数量。 为此,您需要多个查询。 在这里,我定义了两个子查询来获取基本计数,然后我将其加入主查询并用于推导平均值。 with emps as (select store.store_num , count(*) as cnt fro ...
-
SQL GROUP BY解释(SQL GROUP BY explanation)[2022-01-07]
您现有的查询将有效解决 UPDATE Products SET Price = Price*100 WHERE 47 = 47 巧合的是,47恰好是子查询的第一行的结果。 由于47 = 47始终为真,因此将更新所有行。 您真正想要做的是找到所有产品的SUM为47的SupplierID,并在WHERE子句中使用它。 我想这会做你想做的事情: UPDATE Products SET Price = Price*100 WHERE SupplierID IN (SELECT SupplierID ... -
如果movie由title和year唯一标识,并且“演员”通过name标识......我们不一定需要加入movie表。 我们可以使用多个character_name识别出现在同一影片中的演员,并使用如下查询: SELECT a.title , a.year , a.name FROM actors a GROUP BY a.title , a.year , a.name HAVING COUNT(DISTINCT a.character_name) > ...
-
您需要嵌套查询。 像这样的东西应该工作: 内部查询: select bsd_id, count(*) as c from mitable where status_flag='completed' group by bsd_id 结果: 1256,1 1232,1 1216,2 1235,1 完整的查询: select count(*), t.c from (select bsd_id, count(*) as c from mitable where status_flag='completed' gr ...
-
SQL组功能(SQL Group Function)[2023-12-10]
select lesson,sum(COND1) as COND1, sum(COND2) as COND2,sum(COND3) as COND3 from ( SELECT c.name, ccc.lesson, CASE WHEN COUNT(distinct cmc.id) = COUNT(distinct ccc.id) THEN 1 ELSE 0 END AS "COND1", CASE WHEN COUNT(distinct cmc.id) > 0 AND CO ... -
如果要选择单独的列,则它们都需要出现在GROUP BY子句中,除非它们是聚合函数。 请参见此处: http : //msdn.microsoft.com/en-us/library/ms177673.aspx 例如 SELECT TOP 20 ADMINSTATUS, CURRENCY, CUSTOMERID, CUSTOMERMESSAGE, DELTIME, DELTOTAL, DISCOUNT, DISCOUNTCODE, ...
-
实现类似HAVING的行为 您可以使用其中一个pipeline aggregations ,即存储桶选择器聚合 。 查询看起来像这样: POST my_index/tdrs/_search { "aggregations": { "reseller_sale_sum": { "aggregations": { "sales": { "sum": { "field": "request ...
-
如何使用sql group by(how to use sql group by)[2022-02-25]
您需要按选择查询中使用的所有列进行分组,但具有聚合函数的列除外: SELECT EmbroiderAccountId ,EmbroiderReceivedDeliveryChallanId BuyerOrderProductId ,EmbroiderDeliveryChallanNo ,EmbroiderName ,sum(Qty) ,OrderNo ,Rate ,sum(Debit) ,Credit ,EmbroiderReceive ...