【问题标题】:Unable to install Android apk from AppCenter无法从 AppCenter 安装 Android APK
【发布时间】:2015-12-08 13:43:06
【问题描述】:

我有一个 ant 脚本,用于构建和部署适用于 android 的 MFP 应用程序(wlapp 和 apk)。我还将应用程序上传到 AppCenter。

问题是我无法使用 AppCenter 应用程序从 AppCenter 安装(在设备 - 华为 P6 上)apk - 它下载了应用程序但安装不成功。上传的应用未签名。

从 MFP Studio 运行 Android 应用可以正常工作。

我必须执行哪些步骤才能从 AppCenter 应用进行安装?在哪里可以查看 AppCenter 的日志?

谢谢!

蚂蚁目标:

    <target name="build-android-windows" if="isWindows" description="Build the Android .apk" depends="">
    <!-- These must be set in your local.properties file in the root of the android project.
         This is sensitive information and is not checked into the repository
    <fail unless="android.store" message="Property android.store missing" />
    <fail unless="android.alias" message="Property android.alias missing" />
    <fail unless="android.store.password" message="Property android.store.password missing" />
    <fail unless="android.alias.password" message="Property android.alias.password missing" />
    -->
    <!-- use android.release_target if defined, otherwise default to 'release' -->
    <property name="android.release_target" value="release"/>

    <!-- call the project's build.xml to clean -->
    <ant antfile="${src.dir}/apps/${curBrand}/android/native/build.xml" inheritAll="false" useNativeBasedir="true" target="clean"/>

    <!-- call the project's build.xml to make a build -->
    <ant antfile="${src.dir}/apps/${curBrand}/android/native/build.xml" inheritAll="false" useNativeBasedir="true" target="${android.release_target}" />
    <!-- copy the file to build.dir -->
    <copy file="${src.dir}/apps/${curBrand}/android/native/bin/${curBrand}-${android.release_target}-unsigned.apk" tofile="${build.dir}/android/${build.apk}" overwrite="true" failonerror="true"/>

</target>

【问题讨论】:

  • 您是否尝试过签署您的 apk(尝试在没有 ant 的情况下构建它),然后将此 apk 上传到 appcenter 并尝试安装。它通过了吗?
  • 您是否检查了设备上的安全设置?从 Playstore 以外的来源安装?

标签: ibm-mobilefirst mobilefirst-appcenter


【解决方案1】:

正如 Vivin 在 cmets 中建议的那样,AppCenter 不是 Google Play,这意味着至少从设备的角度来看,它不是“受信任的来源”,因此您可能确实需要在 Android 的选项。

第二个选项正如我所提到的 - 签署 .apk。当您直接从 Eclipse 构建时,它默认使用调试签名并直接进入设备。

【讨论】:

  • 该安全设置已启用。
  • 签署 APK 后,安装成功。谢谢!
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2023-03-04
  • 2014-12-21
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2019-07-06
  • 1970-01-01
相关资源
最近更新 更多