简体   繁体   English

无法在Android中验证Distriqt ANE密钥

[英]Distriqt ANE key cannot be verified in Android

I am developing an App for iOS and Android, for this app I am using ANEs from distriqt, and they say they work for both platforms. 我正在开发适用于iOS和Android的应用程序,为此应用程序我使用的是来自Distriqt的ANE,他们说这两种平台都适用。 In iOS these ANEs work but when I develop in Android I get the error: Your key was not able to be verified for the com.distriqt.Notifications native extension, but the key works for NetworkInfo ANE. 这些ANE在iOS中有效,但是当我在Android中进行开发时,出现错误:无法验证com.distriqt.Notifications本机扩展的密钥,但该密钥可用于NetworkInfo ANE。

If you have had a similar situation with these ANEs, could you please help me to attack this problem? 如果您在使用这些ANE时遇到过类似情况,请您帮我解决这个问题吗?

Thank you very much. 非常感谢你。

PD: My descriptor for android where i declare the extensions is below. PD:我在下面声明扩展名的android描述符。

   <extensions>
        <extensionID>com.milkmangames.extensions.GoViral</extensionID>
        <extensionID>com.distriqt.NetworkInfo</extensionID>
        <extensionID>com.distriqt.InAppBilling</extensionID>
        <extensionID>com.distriqt.Application</extensionID>
        <extensionID>com.distriqt.Notifications</extensionID>
        <extensionID>com.distriqt.PushNotifications</extensionID>
        <extensionID>com.distriqt.Core</extensionID>
    </extensions>

  <android>
    <manifestAdditions><![CDATA[
        <manifest android:installLocation="auto" >
            <!--<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="16"/>-->
            <uses-sdk android:minSdkVersion="9" android:targetSdkVersion="19" />

            <uses-permission android:name="android.permission.INTERNET"/>
            <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
            <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
            <uses-permission android:name="android.permission.GET_ACCOUNTS" />
            <uses-permission android:name="android.permission.VIBRATE"/>
            <uses-permission android:name="android.permission.WAKE_LOCK" />
            <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
            <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
            <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

            <!-- Only this application can receive the messages and registration result -->
            <permission android:name="com.4starscasino.4StarsCasino.C2D_MESSAGE" android:protectionLevel="signature" />
            <uses-permission android:name="com.4starscasino.4StarsCasino.permission.C2D_MESSAGE" />

            <uses-permission android:name="com.android.vending.BILLING" />

            <application>
                <receiver android:name="com.distriqt.extension.notifications.NotificationsReceiver">
                    <intent-filter>
                        <action android:name="com.4starscasino.4StarsCasino.NOTIFICATION" />
                        <action android:name="com.4starscasino.4StarsCasino.DELAYED_NOTIFICATION" />
                    </intent-filter>
                </receiver>
                <receiver android:enabled="true" android:exported="true" android:name="com.distriqt.extension.pushnotifications.PushNotificationsBroadcastReceiver" android:permission="com.google.android.c2dm.permission.SEND" >
                    <intent-filter>
                        <action android:name="com.google.android.c2dm.intent.RECEIVE" />
                        <action android:name="com.google.android.c2dm.intent.REGISTRATION" />
                        <category android:name="com.4starscasino.4StarsCasino" />
                    </intent-filter>
                </receiver>
                <service android:enabled="true" android:exported="true" android:name="com.distriqt.extension.pushnotifications.gcm.GCMIntentService" />
                <receiver android:name="com.distriqt.extension.pushnotifications.PushNotificationsReceiver">
                    <intent-filter>
                        <action android:name="com.4starscasino.4StarsCasino.PUSHNOTIFICATION_SELECTED" />
                        <data android:scheme="dtpn" />
                    </intent-filter>
                </receiver>
                <receiver android:enabled="true" android:name="com.distriqt.extension.application.receivers.ApplicationStartupReceiver" android:permission="android.permission.RECEIVE_BOOT_COMPLETED">
                    <intent-filter>
                        <action android:name="android.intent.action.BOOT_COMPLETED" />
                        <category android:name="android.intent.category.DEFAULT" />
                    </intent-filter>
                </receiver>
                <activity android:launchMode="standard">
                    <intent-filter>
                     <action android:name="android.intent.action.MAIN"/>
                     <category android:name="android.intent.category.LAUNCHER"/>
                    </intent-filter>
                </activity>
                <activity android:name="com.facebook.LoginActivity"
                      android:theme="@android:style/Theme.Translucent.NoTitleBar"
                      android:label="Login" />

                       <!-- replace 000000000000000 with your numeric Facebook Application ID -->
                      <provider android:authorities="com.facebook.app.NativeAppCallContentProvider634656129942853" android:name="com.facebook.NativeAppCallContentProvider" />

                      <!-- replace 000000000000000 with your numeric Facebook Application ID, and com.yourcompany.example with your apks application ID -->
                      <meta-data android:name="com.4starscasino.4StarsCasino" android:value="634656129942853"/>
                <activity android:name="com.distriqt.extension.inappbilling.activities.PurchaseActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar"></activity>
            </application>

        </manifest>

      ]]></manifestAdditions>

    <!-- Color depth for the app (either "32bit" or "16bit"). Optional. Default 16bit before namespace 3.0, 32bit after -->
    <!--<colorDepth></colorDepth>-->
    <!-- Indicates if the app contains video or not. Necessary for ordering of video planes with graphics plane, especially in Jellybean - if you app does video this must be set to true - valid values are true or false -->
    <!-- <containsVideo></containsVideo> -->
</android>

The issue will be with your application id, as it's not a valid Java package name, AIR will convert it to a valid one when creating the application apk. 问题出在您的应用程序ID上,因为它不是有效的Java程序包名称,AIR在创建应用程序apk时会将其转换为有效的Java程序包名称。 However this will cause issues with your manifest additions and key validation. 但是,这将导致清单添加和密钥验证出现问题。

Basically starting a package name with a number or using hyphens are not valid in Java. 基本上,以数字开头或使用连字符开头的软件包名称在Java中无效。 You should either change your application id to something like: 您应该将应用程序ID更改为以下内容:

com.fourstarscasino.fourStarsCasino

Or else you'll have to determine the actual Android package name and use that instead. 否则,您必须确定实际的Android软件包名称,并改用它。 It probably is something like: 它可能类似于:

com.A4starscasino.A4StarsCasino 

You should unzip the apk and check the AndroidManifest.xml for the actual Android package name. 您应该解压缩apk并检查AndroidManifest.xml中的实际Android包名称。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM