zoviC
zoviC
  • 发布:2021-06-08 13:24
  • 更新:2021-06-08 13:24
  • 阅读:660

uniapp离线打包白屏

分类:uni-app

百度了好久,也没找到问题所在,求大神帮助
报错信息如下:

1、以下为build.gradle

apply plugin: 'com.android.application'  

android {  
    compileSdkVersion 30  
    defaultConfig {  
        applicationId "com.map"  
        minSdkVersion 26  
        targetSdkVersion 30  
        versionCode 214  
        versionName "ColorUi for UniApp 2.1.4"  
        multiDexEnabled true  
        ndk {  
            abiFilters 'x86', 'armeabi-v7a','arm64-v8a' // 使用uniapp时必须同时选择二者或选其一  
        }  
    }  
    signingConfigs {  
        config {  
            keyAlias 'key0'  
            keyPassword '123456'  
            storeFile file('test.jks')  
            storePassword '123456'  
            v1SigningEnabled true  
            v2SigningEnabled true  
        }  
    }  

    buildTypes {  
        debug {  
            signingConfig signingConfigs.config  
            minifyEnabled false  
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'  
        }  
        release {  
            signingConfig signingConfigs.config  
            minifyEnabled false  
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'  
        }  
    }  
    aaptOptions {  
        additionalParameters '--auto-add-overlay'  
        ignoreAssetsPattern "!.svn:!.git:.*:!CVS:!thumbs.db:!picasa.ini:!*.scc:*~"  
    }  
    buildToolsVersion '30.0.3'  
}  

dependencies {  
    implementation fileTree(dir: 'libs', include: ['*.aar', '*.jar'], exclude: [])  
    //noinspection GradleCompatible  
    implementation "com.android.support:support-v4:26.0.0"  
    //noinspection GradleCompatible  
    implementation "com.android.support:appcompat-v7:26.0.0"  
    //noinspection GradleCompatible  
    implementation 'com.android.support:recyclerview-v7:26.0.0'  
    implementation 'com.facebook.fresco:fresco:1.13.0'  
    implementation "com.facebook.fresco:animated-gif:1.13.0"  
    implementation 'com.github.bumptech.glide:glide:4.9.0'  
    implementation 'com.alibaba:fastjson:1.1.46.android'  
    implementation 'com.squareup.okhttp:okhttp:2.3.0'  
    implementation 'com.squareup.okhttp:okhttp-ws:2.3.0'  
    implementation 'com.github.bumptech.glide:glide:4.9.0' // 基座依赖  

}  

2、下面为androidMainfest.xml

<?xml version="1.0" encoding="utf-8"?>  
<manifest xmlns:android="http://schemas.android.com/apk/res/android"  
    package="com.map">  
    <uses-feature android:name="android.hardware.camera"/>  
    <uses-feature android:name="android.hardware.camera.autofocus"/>  
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>  
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>  
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>  
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>  
    <uses-permission android:name="android.permission.CALL_PHONE"/>  
    <uses-permission android:name="android.permission.CAMERA"/>  
    <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE"/>  
    <uses-permission android:name="android.permission.CHANGE_WIFI_STATE"/>  
    <uses-permission android:name="android.permission.FLASHLIGHT"/>  
    <uses-permission android:name="android.permission.INTERNET"/>  
    <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>  
    <uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS"/>  
    <uses-permission android:name="android.permission.READ_LOGS"/>  
    <uses-permission android:name="android.permission.READ_PHONE_STAT"/>  
    <uses-permission android:name="android.permission.RECORD_AUDIO"/>  
    <uses-permission android:name="android.permission.VIBRATE"/>  
    <uses-permission android:name="android.permission.WAKE_LOCK"/>  
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>  
    <uses-permission android:name="android.permission.WRITE_SETTINGS"/>  
    <application  
        android:allowBackup="true"  
        android:allowClearUserData="true"  
        android:icon="@drawable/icon"  
        android:label="@string/app_name"  
        android:largeHeap="true"  
        android:supportsRtl="true">  
        <activity  
            android:name="io.dcloud.PandoraEntry"  
            android:configChanges="orientation|keyboardHidden|keyboard|navigation"  
            android:label="@string/app_name"  
            android:launchMode="singleTask"  
            android:hardwareAccelerated="true"  
            android:theme="@style/TranslucentTheme"  
            android:screenOrientation="user"  
            android:windowSoftInputMode="adjustResize" >  
            <intent-filter>  
                <action android:name="android.intent.action.MAIN" />  
                <category android:name="android.intent.category.LAUNCHER" />  
            </intent-filter>  
        </activity>  
        <activity  
            android:name="io.dcloud.PandoraEntryActivity"  
            android:launchMode="singleTask"  
            android:configChanges="orientation|keyboardHidden|screenSize|mcc|mnc|fontScale|keyboard"  
            android:hardwareAccelerated="true"  
            android:permission="com.miui.securitycenter.permission.AppPermissionsEditor"  
            android:screenOrientation="user"  
            android:theme="@style/DCloudTheme"  
            android:windowSoftInputMode="adjustResize">  
            <intent-filter>  
                <category android:name="android.intent.category.DEFAULT" />  
                <category android:name="android.intent.category.BROWSABLE" />  
                <action android:name="android.intent.action.VIEW" />  
                <data android:scheme="h56131bcf" />  
            </intent-filter>  
        </activity>  
        <provider  
            android:name="io.dcloud.common.util.DCloud_FileProvider"  
            android:authorities="com.map.dc.fileprovider"  
            android:exported="false"  
            android:grantUriPermissions="true">  
            <meta-data  
                android:name="android.support.FILE_PROVIDER_PATHS"  
                android:resource="@xml/dcloud_file_provider" />  
        </provider>  
        <meta-data  
            android:name="dcloud_appkey"  
            android:value="我的key" />  
    </application>  

</manifest>

3、申请的appKey

2021-06-08 13:24 负责人:无 分享
已邀请:

该问题目前已经被锁定, 无法添加新回复