Android上的Proguard和Netty 5(Proguard and Netty 5 on Android)
我已经看到关于这个问题的几个问题,但是它们是针对旧版Netty的。
我已经尝试了他们的答案,使用io.netty切换org.jboss.netty,但发生同样的错误。我试图编译一个使用Netty 5.0.0Alpha2(build#16)并启用了Proguard的Android应用程序。
没有Proguard,应用程序运行良好。
只要启用Proguard,我会在尝试使用Netty时遇到此异常:java.lang.IllegalStateException: unknown type parameter 'I': class io.netty.channel.SimpleChannelInboundHandler at io.netty.util.internal.TypeParameterMatcher.find0(Unknown Source) at io.netty.util.internal.TypeParameterMatcher.find(Unknown Source) at io.netty.channel.SimpleChannelInboundHandler.<init>(Unknown Source) at io.netty.channel.SimpleChannelInboundHandler.<init>(Unknown Source) ...
这是我的Proguard配置:
# billing -keep class com.android.vending.billing.** # butterknife -dontwarn butterknife.internal.** -keep class **$$ViewInjector { *; } -keepnames class * { @butterknife.InjectView *; } # admob -keep public class com.google.android.gms.ads.** { public *; } -keep public class com.google.ads.** { public *; } # logging -assumenosideeffects class android.util.Log # netty (partial) -dontwarn io.netty.** -dontwarn sun.**
我已经测试了它,没有使用-twtwarn选项来查看警告是否会指向正确的方向,但是它都缺少可选的依赖项,如slf4j和Tomcat。
我也尝试过排除所有Netty类,如下所示:
-keep class io.netty.** { *; }
...但似乎并没有解决它。
I've seen a couple questions regarding this issue, but they are for older versions of Netty.
I have tried their answers, switching org.jboss.netty out with io.netty, but the same error occurs.I'm trying to compile an Android app that uses Netty 5.0.0Alpha2 (build #16) with Proguard enabled.
Without Proguard, the app runs fine.
As soon as I enable Proguard, I get this exception when it tries to use Netty:java.lang.IllegalStateException: unknown type parameter 'I': class io.netty.channel.SimpleChannelInboundHandler at io.netty.util.internal.TypeParameterMatcher.find0(Unknown Source) at io.netty.util.internal.TypeParameterMatcher.find(Unknown Source) at io.netty.channel.SimpleChannelInboundHandler.<init>(Unknown Source) at io.netty.channel.SimpleChannelInboundHandler.<init>(Unknown Source) ...
This is my Proguard config:
# billing -keep class com.android.vending.billing.** # butterknife -dontwarn butterknife.internal.** -keep class **$$ViewInjector { *; } -keepnames class * { @butterknife.InjectView *; } # admob -keep public class com.google.android.gms.ads.** { public *; } -keep public class com.google.ads.** { public *; } # logging -assumenosideeffects class android.util.Log # netty (partial) -dontwarn io.netty.** -dontwarn sun.**
I have tested it without the -dontwarn options to see if the warnings would point me in the right direction, but it's all missing optional dependencies like slf4j and Tomcat.
I have also tried excluding all the Netty classes like so:
-keep class io.netty.** { *; }
...but that does not appear to fix it either.
原文:https://stackoverflow.com/questions/27083667
最满意答案
您需要获取最新的b值。 一种方法是将
from
子句中的条件作为附加连接。 另一种方法是使用where
子句,以及相关的子查询:where tableB.created_on = (select max(created_on) from tableB b2 where b2.a_id = tableA.id ) and . . . /* the rest of your conditions here */
You do need to get the latest b value. One way is to put the condition in the
from
clause as an additional join. Another way is to use thewhere
clause, with a correlated subquery:where tableB.created_on = (select max(created_on) from tableB b2 where b2.a_id = tableA.id ) and . . . /* the rest of your conditions here */
相关问答
更多-
看来你正在从错误的方向接近它。 你真正想要的是: SELECT t2.PriceId AS PriceId, t2.ServiceId AS ServiceId, t1p.Name AS PriceName, t1m.Name AS MaterialName, t1s.Name AS ServiceName FROM Table2 t2 LEFT JOIN Table1 t1p ON t2.PriceId = t1p.Id LEFT JOIN Table1 t1m ON t2.Mater ...
-
使用JOINS连接来自多个表MySQL的用户数据(using JOINS to concatenate user's data from multiple tables MySQL)[2023-04-14]
尝试这个 select t1.USER ID , NAME , FAVORITE_COLOR , AGE ,JOB , LOCATION , NOTES from TABLE1 t1 INNER JOIN table2 t2 ON t1.USER_ID = t2.USER_ID 编辑> 如果您有3或4个表,那么只需加入它们就可以添加它 INNER JOIN table3 t3 ON t2.USER_ID = t3.USER_ID INNER JOIN table4 t4 ... -
您可以加入多个表,只需将所有联接链接到主查询,然后从这些表中选择列: SELECT ds_usermeta.first_name, ds_usermeta.last_name, ... ds_em_bookings.booking_date, ds_em_bookings.booking_comment, ds_em_events.event_name, ds_em_locations.location_name ...
-
我个人认为没有任何理由可以使用Events表。 我会通过A UNION ALL查询解决这个问题,我会在查询的同一行链接问题和答案。 就像是: SELECT 'Question' as EventType, Q.QuestionID, t.AnswerID, NULL as DiscussionID, Q.QuestionTitle, U1.Name as QuestionBy, A.Answer, U2.Name as AnswerBy, NULL as DiscussionTitle, NULL as ...
-
您需要获取最新的b值。 一种方法是将from子句中的条件作为附加连接。 另一种方法是使用where子句,以及相关的子查询: where tableB.created_on = (select max(created_on) from tableB b2 where b2.a_id = tableA.id ) and . . . /* t ...
-
Linq Multiple Joins(Linq Multiple Joins)[2021-12-15]
首先,您使用的实体框架完全错误。 Linq不是SQL。 你不应该使用join 。 相反,你应该使用关联。 相反,您的查询应该看起来像...... from sale in FactSales where sale.DateKey == 20130921 where sale.CompanyID <= 1 group sale by sale.Item.Department into c select new { Amount = c.Sum(l => l.Amount) Departmen ... -
我得出的结论是,我正在处理的环境是导致问题的原因。 我的查询按预期工作,并且根本不慢(1秒,18,000行)。 正如评论中所述,我必须以有限的灵活性填充网格,我相信这些网格填充首先用SQL语句填充临时网格,然后逐行复制到所需的网格中。 这很可能是导致我的问题的原因。 感谢大家的帮助。 I have come to the conclusion the environment I'm working in is the cause of the problem. My query works as inten ...
-
多个连接到同一个表(Multiple joins to same table)[2023-07-09]
你可以试试 SELECT i.name as name, v1.value as value_1, v2.value as value_2 FROM item i INNER JOIN item_value iv ON iv.item = i.id INNER JOIN property p ON iv.property = p.id LEFT JOIN value v1 ON p.name = 'prop1' AND v1.id = iv.value ... -
第一排 对于X的第一行,只有Y的第一行具有匹配的x和y因此Y的第一行将匹配iff Y$t[1]在X$t[1]和X$t[1] + 0.005但是实际上Y$t[1] < X$t[1]如下所示: > X$t[1] - Y$t[1] Time difference of 0.0009999275 secs 需要一个正roll=值,其大小至少等于上述差值,以便在行1中得到非NA。例如 > Y[X, roll=0.001] x y t IDX 1: 1 FALSE 2 ...
-
我会用间接关系来设置它: class User has_many :employments has_many :companies, through: :employments has_many :positions has_many :teams, through: :positions end class Company has_many :employments has_many :users, through: :employments has_many :teams, ...