小编spo*_*jak的帖子

AAPT2编译失败:Android 3.0 Canary 1上的无效维度

我正在使用Instant Apps for Android.I安装了所有正确的软件包并厌倦了创建具有Instant App支持的新应用程序(在创建新应用程序时选中Instant App框).问题是我总是遇到编译工具的问题.是否有其他人有这个问题,并能够找到任何解决方法.

我的环境:

  • Android Studio 3.0 Canary 1
  • 编译SDK:25
  • 构建工具:"26.0.0 rc2"
  • Gradle插件:3.0.0-alpha1
  • Gradle:尝试了gradle-4.0-milestone1和2
  • Java 1.8/1.7
  • 操作系统:尝试了Windows 10和Linux Ubuntu 16.4 LTS

错误:

Error: java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.internal.aapt.AaptException: AAPT2 compile failed:
aapt2 compile -o /home/simonp/Work/201705_InstantApp/InstantAppTest/feature/build/intermediates/res/merged/androidTest/debug /home/simonp/Work/201705_InstantApp/InstantAppTest/feature/build/intermediates/incremental/mergeDebugAndroidTestResources/merged.dir/values/values.xml
Issues:
 - ERROR: /home/simonp/Work/201705_InstantApp/InstantAppTest/feature/build/intermediates/incremental/mergeDebugAndroidTestResources/merged.dir/values/values.xml:520 invalid dimen
 - ERROR: /home/simonp/Work/201705_InstantApp/InstantAppTest/feature/build/intermediates/incremental/mergeDebugAndroidTestResources/merged.dir/values/values.xml:521 invalid dimen
 - ERROR: /home/simonp/Work/201705_InstantApp/InstantAppTest/feature/build/intermediates/incremental/mergeDebugAndroidTestResources/merged.dir/values/values.xml:568 invalid dimen
 - ERROR: /home/simonp/Work/201705_InstantApp/InstantAppTest/feature/build/intermediates/incremental/mergeDebugAndroidTestResources/merged.dir/values/values.xml:594 invalid dimen
 - ERROR: /home/simonp/Work/201705_InstantApp/InstantAppTest/feature/build/intermediates/incremental/mergeDebugAndroidTestResources/merged.dir/values/values.xml:595 invalid dimen
 - ERROR: /home/simonp/Work/201705_InstantApp/InstantAppTest/feature/build/intermediates/incremental/mergeDebugAndroidTestResources/merged.dir/values/values.xml:597 invalid dimen
 - ERROR: /home/simonp/Work/201705_InstantApp/InstantAppTest/feature/build/intermediates/incremental/mergeDebugAndroidTestResources/merged.dir/values/values.xml:598 invalid dimen
 - ERROR: /home/simonp/Work/201705_InstantApp/InstantAppTest/feature/build/intermediates/incremental/mergeDebugAndroidTestResources/merged.dir/values/values.xml:599 invalid dimen
 - ERROR: …
Run Code Online (Sandbox Code Playgroud)

android aapt android-studio android-gradle-plugin android-instant-apps

88
推荐指数
3
解决办法
3万
查看次数

如何在Django中设置基本URL

我想从位置https://www.example.com/someuri/运行Django,以便我在https://www.example.com/someuri/admin/上有管理界面.我可以看到登录窗口但是当我登录时,我被重定向到https://www.example.com/admin/.

我在哪里可以将Django的基本URL设置为https://www.example.com/someuri/?我试过BASE_URL,但没有运气.

django django-admin

7
推荐指数
4
解决办法
1万
查看次数

在 C# 中使用 Bouncy Castle 验证 ECDSA 签名

当我尝试在 C# 中的 Bouncy Castle 中验证 ECDSA 签名时遇到问题。该代码是从我拥有的 Java 示例中采用的,因此我 100% 确定公钥和签名是正确的。但是 C# 实现总是返回签名无效。我检查了曲线参数,它们是正确的。我尝试使用 DER 和“原始”签名,但它再次不起作用。

任何人都可以发现我做错了什么:

namespace TestECDSA
{
    class Program
    {
    static void Main(string[] args)
    {
        byte[] b = new byte[] { 0x2B, 0xA1, 0x41, 0x00 };

        string pubKey = "044F6D3F294DEA5737F0F46FFEE88A356EED95695DD7E0C27A591E6F6F65962BAF";
        string signature = "AAD03D3D38CE53B673CF8F1C016C8D3B67EA98CBCF72627788368C7C54AA2FC4";

        X9ECParameters curve = SecNamedCurves.GetByName("secp128r1");
        ECDomainParameters curveSpec = new ECDomainParameters(curve.Curve, curve.G, curve.N, curve.H, curve.GetSeed());

        ECPublicKeyParameters key = new ECPublicKeyParameters("ECDSA", curve.Curve.DecodePoint(Hex.Decode(pubKey)), curveSpec);

        ISigner signer = SignerUtilities.GetSigner("NONEwithECDSA");             

        signer.Init(false, key);

        signer.BlockUpdate(b, 0, b.Length);

        if (signer.VerifySignature(derEncodeSignature(Hex.Decode(signature))))
            System.Console.WriteLine("Verified Signature"); …
Run Code Online (Sandbox Code Playgroud)

c# encryption bouncycastle ecdsa

5
推荐指数
2
解决办法
5396
查看次数

如何使用angularjs在传单标记上触发事件

我使用angular-leaflet-directive来显示填充了多个标记的地图,我有一个表,用户可以从中选择其中一个标记.我知道如何居中(在地图上显示)在表格中点击的一个标记,但我想打开标记的弹出消息.我知道我需要在地图上发出"点击"事件,但我不明白如何以"有角度的方式"进行.任何建议都将深表感谢.谢谢.

javascript javascript-events angularjs leaflet

1
推荐指数
1
解决办法
2684
查看次数