abortonerror_离线打包白屏

本文档记录了在使用uniapp进行离线打包时遇到的白屏异常,具体表现为gradle配置、依赖库加载和权限问题。在gradle文件中,检查了multiDexEnabled、abiFilters等设置,并分析了由于缺少权限导致的IMEI和WIFI状态获取失败异常。
摘要由CSDN通过智能技术生成

同样的问题,gradle文件如下:

android {

compileSdkVersion 29

defaultConfig {

multiDexEnabled true

applicationId "com.adtech.hecd.webapp"

minSdkVersion 21

targetSdkVersion 29

versionCode 1

versionName "1.0"

// testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

ndk {

abiFilters 'x86','armeabi' //使用uniapp时必须同时选择二者或选其一

}

}

lintOptions {

checkReleaseBuilds false

abortOnError false

}

aaptOptions {

additionalParameters '--auto-add-overlay'

//noCompress 'foo', 'bar'

ignoreAssetsPattern "!.svn:!.git:.*:!CVS:!thumbs.db:!picasa.ini:!*.scc:*~"

}

buildTypes {

release {

minifyEnabled false

proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'

}

}

}

repositories {

flatDir {

dirs 'libs'

}

}

dependencies {

implementation(name: 'lib.5plus.base-release', ext: 'aar')

implementation(name: 'uniapp-release', ext: 'aar')

implementation 'com.android.support:appcompat-v7:29.0.0'

implementation 'com.android.support.constraint:constraint-layout:1.1.3'

implementation 'com.android.support:recyclerview-v7:29.0.0'

implementation 'com.alibaba.android:bindingx-core:1.0.3'

implementation 'com.alibaba.android:bindingx_weex_plugin:1.0.3'

implementation 'com.squareup.okhttp:okhttp:2.3.0'

implementation 'com.squareup.okhttp:okhttp-ws:2.3.0'

implementation 'com.alibaba:fastjson:1.1.46.android'

implementation 'com.facebook.fresco:fresco:1.13.0'

implementation "com.facebook.fresco:animated-gif:1.13.0"

implementation 'androidx.appcompat:appcompat:1.0.2'

testImplementation 'junit:junit:4.12'

androidTestImplementation 'androidx.test:runner:1.1.1'

androidTestImplementation 'androidx.test.espresso:espresso-core:

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
我jdk版本是11.0.13,以下是我gradle的代码android { lintOptions { checkReleaseBuilds false // Or, if you prefer, you can continue to check for errors in release builds, // but continue the build even when errors are found: abortOnError false } signingConfigs { debug { storePassword '123456' keyAlias = 'screen2' keyPassword '123456' storeFile file('O:\AvtronsysResoucres\code\Screenbox2-kasuo\app\screen2_android10.jks') } Release { storeFile file('O:\AvtronsysResoucres\code\Screenbox2-kasuo\app\screen2_android10.jks') storePassword '123456' keyPassword '123456' keyAlias = 'screen2' } } compileSdkVersion 29 defaultConfig { applicationId "com.avtronsys.screen2" minSdkVersion 21 targetSdkVersion 28 def code = new Date().format("yyMMddHHmm"); //versionName "V1.1_"+ versionCode versionCode 2112320000; versionName "V1.1_"+ code println "versionCode = "+versionCode println "versionName = "+(String)versionName testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" externalNativeBuild { cmake { abiFilters "armeabi-v7a" cppFlags "" } } ndk { abiFilters "armeabi-v7a" } } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' signingConfig signingConfigs.debug } } //externalNativeBuild { // cmake { // path "CMakeLists.txt" // } //} sourceSets { main { jni.srcDirs = [] jniLibs.srcDirs = ['libs'] } } compileOptions { sourceCompatibility = 1.8 targetCompatibility = 1.8 } //buildToolsVersion = '29.0.2' applicationVariants.all { variant -> variant.outputs.all { output -> def outputFile = output.outputFile def fileName if (outputFile != null && outputFile.name.endsWith('.apk')) { if (variant.buildType.name.equals('release')) { fileName = "Screen2_Release_${defaultConfig.versionName}.apk" } else if (variant.buildType.name.equals('debug')) { fileName = "Screen2_Debug_${defaultConfig.versionName}.apk" } outputFileName = fileName } } } },这样的配置还是会出现Unsupported class file major version 55,是哪里的问题
06-13
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值