流星Android应用无法在4.1.1安装流星、Android

2023-09-05 08:36:35 作者:甘心替代你

我有一个巨大的问题,部署我的应用程序的4.1.1 Android平板电脑。它适用于4.4.2 / 4.3.2。电话或流星运行Android设备。但是,当生产建设捆绑失败与错误-103 (带logcat中找到)。

I am having a huge problem to deploy my app for 4.1.1 Android Tablet. It works on 4.4.2./4.3.2. Phones or with Meteor run android-device. However when build the bundle for production it fails with error -103 (found with logcat).

由于它运行在较新的Droid的问题不是签名密钥或应用程序。我已阅读,你必须手动流星配置-机器人,删除AVD,并创建一个新的使用所需要的机器人版本,它并没有帮助的。

Since it runs on newer Droid the problem is not signature keys or the app. I have read that you have to manually meteor configure-android, delete the AVD and create a new one with the desired droid version, which did not help at all.

修改的Andr​​oidManifest.xml ,指定安卓targetSdkVersion =15和修改 project.properities 目标 15 也没有帮助。

Modifying AndroidManifest.xml, specifying android:targetSdkVersion="15" and modifying project.properities to target 15 did not help either.

为了completness这里是我的AndoridManifest.xml

For the sake completness here is my AndoridManifest.xml

<?xml version='1.0' encoding='utf-8'?>
<manifest android:hardwareAccelerated="true" android:versionCode="10000" android:versionName="1.0.0" android:windowSoftInputMode="adjustPan" package="xyz" xmlns:android="http://schemas.android.com/apk/res/android">
    <supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:resizeable="true" android:smallScreens="true" android:xlargeScreens="true" />
    <uses-permission android:name="android.permission.INTERNET" />
    <application android:debuggable="false" android:hardwareAccelerated="true" android:icon="@drawable/icon" android:label="@string/app_name">
        <activity android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale" android:label="@string/app_name" android:launchMode="singleTask" android:name="rpaircztechnician" android:screenOrientation="landscape" android:theme="@android:style/Theme.Black.NoTitleBar">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity android:clearTaskOnLaunch="true" android:configChanges="orientation|keyboardHidden" android:exported="false" android:name="com.google.zxing.client.android.CaptureActivity" android:screenOrientation="landscape" android:theme="@android:style/Theme.NoTitleBar.Fullscreen" android:windowSoftInputMode="stateAlwaysHidden">
            <intent-filter>
                <action android:name="com.phonegap.plugins.barcodescanner.SCAN" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>
        <activity android:label="@string/share_name" android:name="com.google.zxing.client.android.encode.EncodeActivity">
            <intent-filter>
                <action android:name="com.phonegap.plugins.barcodescanner.ENCODE" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>
        <activity android:label="@string/share_name" android:name="com.google.zxing.client.android.HelpActivity">
            <intent-filter>
                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>
    </application>
    <uses-sdk android:minSdkVersion="10" android:targetSdkVersion="19" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.CAMERA" />
    <uses-permission android:name="android.permission.FLASHLIGHT" />
    <uses-feature android:name="android.hardware.camera" android:required="false" />
</manifest>

和我的构建过程

#remove old apk version
echo "Removing old APK version"
rm ../../_production/xyz/xyz.apk
echo "Removing old APK version - done"

#create bundle with unaligned apk
echo "Building the app"
meteor build ../../_build/ --server http://expamle.com --mobile-settings ./settings.json
echo "Building the app - done"

#sign the apk
echo "Signing the APK"
jarsigner -digestalg SHA1 ../../_build/xyz/android/unaligned.apk xyz
echo "Signing the APK - done"

#zipalign it to production apk
echo "Zipaligning and moving"
~/.meteor/android_bundle/android-sdk/build-tools/21.0.0/zipalign 4 ../../_build/xyz/android/unaligned.apk ../../_production/xyz/xyz.apk
echo "Zipaligning and moving - done"

感谢您的帮助!

Thanks for any help!

推荐答案

我有同样的问题。下面是对我的作品(通知规范-sigalc MD5withRSA ):

I had the same problem. Here is what works for me (notice the specification of -sigalc MD5withRSA):

keytool -genkey -alias MyApp -keyalg RSA -keysize 2048 -validity 10000 -keystore sample.keystore

jarsigner -keystore sample.keystore -digestalg SHA1 -sigalg MD5withRSA -tsa http://timestamp.digicert.com  unaligned.apk MyApp

~/.meteor/android_bundle/android-sdk/build-tools/21.0.0/zipalign -f -v 4 unaligned.apk myapp.apk