升级到最新的Titanium SDK后,应用程序在Android上崩溃

时间:2016-04-15 12:03:36

标签: android appcelerator android-permissions appcelerator-titanium

我试图将我的应用程序升级到最新的Titanium SDK(5.2.2)。它在iOS上工作正常,但在Android上有一些问题。更改SDK版本后应用程序崩溃。

该应用程序使用相机,存储和位置。所以,添加了权限。以下是我的tiapp.xml文件的一部分:

<android xmlns:android="http://schemas.android.com/apk/res/android">
    <!--CHANGE added package for iBeacon support for android -->
    <manifest android:versionCode="16" android:versionName="2.12" package="me.AppName.app">
        <uses-sdk android:minSdkVersion="14" android:targetSdkVersion="23"/>


        <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
        <uses-permission android:name="android.permission.CAMERA"/>
        <uses-feature android:name="android.hardware.camera"/>
        <!-- Allows the API to download data from Google Map servers -->
        <uses-permission android:name="android.permission.ACCESS_LOCATION"/>
        <uses-permission android:name="android.permission.ACCESS_GPS"/>
        <uses-permission android:name="android.permission.INTERNET"/>
        <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
        <!-- Allows the API to cache data -->
        <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
        <!-- Use GPS for device location -->
        <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
        <!-- Use Wi-Fi or mobile connection for device location -->
        <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
        <!-- Allows the API to access Google web-based services -->
        <uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
        <!-- Specify OpenGL ES 2.0 as a requirement -->
        <uses-feature android:glEsVersion="0x00020000" android:required="true"/>
        <!-- Replace com.domain.appid with your application ID -->
        <uses-permission android:name="me.AppName.app.permission.MAPS_RECEIVE"/>
        <!--CHANGE permissions for iBeacon -->
        <uses-permission android:name="android.permission.BLUETOOTH"/>
        <uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
        <!-- * -->
        <permission
            android:name="me.AppName.app.permission.MAPS_RECEIVE" android:protectionLevel="signature"/>
        <application android:hardwareAccelerated="true" android:theme="@style/Theme.NoActionBar">
            <activity
                android:configChanges="keyboardHidden|orientation|screenSize"
                android:label="@string/app_name"
                android:name=".AppNameActivity"
                android:screenOrientation="portrait" android:theme="@style/Theme.NoActionBar">
                <intent-filter>
                    <action android:name="android.intent.action.MAIN"/>
                    <category android:name="android.intent.category.LAUNCHER"/>
                </intent-filter>
                <intent-filter>
                    <action android:name="android.intent.action.VIEW"/>
                    <category android:name="android.intent.category.DEFAULT"/>
                    <category android:name="android.intent.category.BROWSABLE"/>
                    <data android:scheme="AppName"/>
                </intent-filter>
            </activity>
            <activity
                android:configChanges="keyboardHidden|orientation|screenSize"
                android:name="org.appcelerator.titanium.TiActivity" android:screenOrientation="portrait"/>
            <activity
                android:configChanges="keyboardHidden|orientation|screenSize"
                android:name="org.appcelerator.titanium.TiTranslucentActivity"
                android:screenOrientation="portrait" android:theme="@style/Theme.NoActionBar"/>
            <activity android:configChanges="screenSize" android:name="ti.modules.titanium.ui.android.TiPreferencesActivity"/>
            <activity
                android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
                android:label="AppName"
                android:name="com.facebook.FacebookActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar"/>
            <activity android:label=“AppName”
                android:name="com.facebook.LoginActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar"/>
            <uses-library android:name="com.google.android.maps"/>
            <meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/app_id"/>
            <meta-data
                android:name="com.google.android.maps.v2.API_KEY" android:value=“SomeKey”/>
            <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version"/>
            <!--CHANGE added services for iBeacon support for android -->
            <service android:enabled="true" android:exported="true"
                android:isolatedProcess="false"
                android:label="iBeacon" android:name="com.radiusnetworks.ibeacon.service.IBeaconService"/>
            <service android:enabled="true" android:name="com.radiusnetworks.ibeacon.IBeaconIntentProcessor">
                <meta-data android:name="background" android:value="true"/>
                <intent-filter android:priority="1">
                    <action android:name="me.AppName.app.DID_RANGING"/>
                    <action android:name="me.AppName.app.DID_MONITORING"/>
                </intent-filter>
            </service>
            <!-- * -->
        </application>
    </manifest>
</android>

这是我的logcat响应的一部分:

[INFO] : dalvikvm: Could not find method android.app.Activity.checkSelfPermission, referenced from method org.appcelerator.titanium.util.TiFileHelper2.hasStoragePermission [WARN] : dalvikvm: VFY: unable to resolve virtual method 33: Landroid/app/Activity;.checkSelfPermission (Ljava/lang/String;)I [DEBUG] : dalvikvm: VFY: replacing opcode 0x6e at 0x0017 [WARN] : V8Object: (KrollRuntimeThread) [196,197] Runtime disposed, cannot set property 'userAgent' [INFO] : dalvikvm: Could not find method android.app.Activity.checkSelfPermission, referenced from method ti.modules.titanium.media.MediaModule.hasCameraPermission [WARN] : dalvikvm: VFY: unable to resolve virtual method 33: Landroid/app/Activity;.checkSelfPermission (Ljava/lang/String;)I [DEBUG] : dalvikvm: VFY: replacing opcode 0x6e at 0x0012 [INFO] : dalvikvm: Could not find method android.app.Activity.checkSelfPermission, referenced from method ti.modules.titanium.media.MediaModule.hasStoragePermission [WARN] : dalvikvm: VFY: unable to resolve virtual method 33: Landroid/app/Activity;.checkSelfPermission (Ljava/lang/String;)I [DEBUG] : dalvikvm: VFY: replacing opcode 0x6e at 0x0012 [INFO] : dalvikvm: Could not find method android.app.Activity.checkSelfPermission, referenced from method ti.modules.titanium.media.MediaModule.hasCameraPermissions [WARN] : dalvikvm: VFY: unable to resolve virtual method 33: Landroid/app/Activity;.checkSelfPermission (Ljava/lang/String;)I [DEBUG] : dalvikvm: VFY: replacing opcode 0x6e at 0x0012 [INFO] : dalvikvm: Could not find method android.app.Activity.requestPermissions, referenced from method ti.modules.titanium.media.MediaModule.requestCameraPermissions [WARN] : dalvikvm: VFY: unable to resolve virtual method 88: Landroid/app/Activity;.requestPermissions ([Ljava/lang/String;I)V [DEBUG] : dalvikvm: VFY: replacing opcode 0x6e at 0x0037 [INFO] : dalvikvm: Could not find method android.app.Activity.checkSelfPermission, referenced from method ti.modules.titanium.filesystem.FilesystemModule.hasStoragePermissions [WARN] : dalvikvm: VFY: unable to resolve virtual method 33: Landroid/app/Activity;.checkSelfPermission (Ljava/lang/String;)I [DEBUG] : dalvikvm: VFY: replacing opcode 0x6e at 0x0012 [INFO] : dalvikvm: Could not find method android.app.Activity.requestPermissions, referenced from method ti.modules.titanium.filesystem.FilesystemModule.requestStoragePermissions [WARN] : dalvikvm: VFY: unable to resolve virtual method 88: Landroid/app/Activity;.requestPermissions ([Ljava/lang/String;I)V [DEBUG] : dalvikvm: VFY: replacing opcode 0x6e at 0x0025 [DEBUG] : dalvikvm: Trying to load lib /data/app-lib/me.AppName.app-2/libti.compression.so 0x4193fb00 [DEBUG] : dalvikvm: Added shared lib /data/app-lib/me.AppName.app-2/libti.compression.so 0x4193fb00 [DEBUG] : dalvikvm: No JNI_OnLoad found in /data/app-lib/me.AppName.app-2/libti.compression.so 0x4193fb00, skipping init [DEBUG] : dalvikvm: Trying to load lib /data/app-lib/me.AppName.app-2/libcom.liferay.beacons.so 0x4193fb00 [DEBUG] : dalvikvm: Added shared lib /data/app-lib/me.AppName.app-2/libcom.liferay.beacons.so 0x4193fb00 [DEBUG] : dalvikvm: No JNI_OnLoad found in /data/app-lib/me.AppName.app-2/libcom.liferay.beacons.so 0x4193fb00, skipping init [DEBUG] : dalvikvm: Trying to load lib /data/app-lib/me.AppName.app-2/libti.map.so 0x4193fb00 [DEBUG] : dalvikvm: Added shared lib /data/app-lib/me.AppName.app-2/libti.map.so 0x4193fb00 [DEBUG] : dalvikvm: No JNI_OnLoad found in /data/app-lib/me.AppName.app-2/libti.map.so 0x4193fb00, skipping init [DEBUG] : dalvikvm: Trying to load lib /data/app-lib/me.AppName.app-2/libti.barcode.so 0x4193fb00 [DEBUG] : dalvikvm: Added shared lib /data/app-lib/me.AppName.app-2/libti.barcode.so 0x4193fb00 [DEBUG] : dalvikvm: No JNI_OnLoad found in /data/app-lib/me.AppName.app-2/libti.barcode.so 0x4193fb00, skipping init [DEBUG] : dalvikvm: Trying to load lib /data/app-lib/me.AppName.app-2/libti.styledlabel.so 0x4193fb00 [DEBUG] : dalvikvm: Added shared lib /data/app-lib/me.AppName.app-2/libti.styledlabel.so 0x4193fb00 [DEBUG] : dalvikvm: No JNI_OnLoad found in /data/app-lib/me.AppName.app-2/libti.styledlabel.so 0x4193fb00, skipping init [DEBUG] : dalvikvm: Trying to load lib /data/app-lib/me.AppName.app-2/libfacebook.so 0x4193fb00 [DEBUG] : dalvikvm: Added shared lib /data/app-lib/me.AppName.app-2/libfacebook.so 0x4193fb00 [DEBUG] : dalvikvm: No JNI_OnLoad found in /data/app-lib/me.AppName.app-2/libfacebook.so 0x4193fb00, skipping init [DEBUG] : dalvikvm: Trying to load lib /data/app-lib/me.AppName.app-2/liborg.iotashan.TiTouchImageView.so 0x4193fb00 [DEBUG] : dalvikvm: Added shared lib /data/app-lib/me.AppName.app-2/liborg.iotashan.TiTouchImageView.so 0x4193fb00 [DEBUG] : dalvikvm: No JNI_OnLoad found in /data/app-lib/me.AppName.app-2/liborg.iotashan.TiTouchImageView.so 0x4193fb00, skipping init [WARN] : dalvikvm: VFY: unable to find class referenced in signature (Landroid/view/SearchEvent;) [INFO] : dalvikvm: Could not find method android.view.Window$Callback.onSearchRequested, referenced from method android.support.v7.internal.view.WindowCallbackWrapper.onSearchRequested [WARN] : dalvikvm: VFY: unable to resolve interface method 15187: Landroid/view/Window$Callback;.onSearchRequested (Landroid/view/SearchEvent;)Z [DEBUG] : dalvikvm: VFY: replacing opcode 0x72 at 0x0002 [INFO] : dalvikvm: Could not find method android.view.Window$Callback.onWindowStartingActionMode, referenced from method android.support.v7.internal.view.WindowCallbackWrapper.onWindowStartingActionMode [WARN] : dalvikvm: VFY: unable to resolve interface method 15191: Landroid/view/Window$Callback;.onWindowStartingActionMode (Landroid/view/ActionMode$Callback;I)Landroid/view/ActionMode; [DEBUG] : dalvikvm: VFY: replacing opcode 0x72 at 0x0002 [DEBUG] : dalvikvm: GC_FOR_ALLOC freed 4331K, 32%% free 10408K/15164K, paused 19ms, total 19ms [DEBUG] : AndroidRuntime: Shutting down VM [WARN] : dalvikvm: threadid=1: thread exiting with uncaught exception (group=0x41661d40)

这可能是什么问题?有人可以环顾四周吗?

谢谢!

0 个答案:

没有答案