uni-app 生成本地打包资源 SQLite 模块已经勾选上了 但是在AS中运行起来以后 提示没有勾选sqlite

uni-app 生成本地打包资源 SQLite 模块已经勾选上了 但是在AS中运行起来以后 提示没有勾选sqlite

开发环境 版本号 项目创建方式
Windows 4.57.2025032014-alpha HBuilderX

产品分类:uniapp/App


PC开发环境操作系统:Windows


手机系统:Android
手机系统版本号:Android 14
手机厂商:vivo
手机机型:vivo NQ5


页面类型:vue
vue版本:vue2


打包方式:离线


示例代码:

apply plugin: 'com.android.application'  
android {
compileSdkVersion 35
buildToolsVersion '35.0.0'  

namespace 'com.android.UniPlugin'  
defaultConfig {  
    applicationId "com.android.UniPlugin"  
    minSdkVersion 21  
    //noinspection ExpiredTargetSdkVersion  
    targetSdkVersion 32  
    versionCode 1  
    versionName "1.0"  
    multiDexEnabled true  
    ndk {  
        abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64' // 添加支持的架构  
    }  
    compileOptions {  
        sourceCompatibility JavaVersion.VERSION_11  
        targetCompatibility JavaVersion.VERSION_11  
    }  
}  

signingConfigs {  
    config {  
        keyAlias 'key0'  
        keyPassword '123456'  
        storeFile file('test.jks')  
        storePassword '123456'  
        v1SigningEnabled true  
        v2SigningEnabled true  
    }  
}  

buildTypes {  
    release {  
        signingConfig signingConfigs.config  
        zipAlignEnabled false  
        minifyEnabled false  
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'  
    }  
    debug {  
        signingConfig signingConfigs.config  
        zipAlignEnabled false  
        minifyEnabled false  
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'  
    }  
}  
//使用uniapp时,需复制下面代码  
/*代码开始*/  
aaptOptions {  
    additionalParameters '--auto-add-overlay'  
    //noCompress 'foo', 'bar'  
    ignoreAssetsPattern "!.svn:!.git:.*:!CVS:!thumbs.db:!picasa.ini:!*.scc:*~"  
}  
compileOptions {  
    sourceCompatibility JavaVersion.VERSION_11  
    targetCompatibility JavaVersion.VERSION_11  
}  
/*代码结束*/  
}  
repositories {  
flatDir {  
dirs 'libs'  
}  
}  
dependencies {  
implementation fileTree(dir: 'libs', include: ['*.jar'])  
implementation fileTree(dir: 'libs', include: ['*.aar'])  

/*uniapp所需库-----------------------开始*/  
implementation 'androidx.recyclerview:recyclerview:1.1.0'  
implementation 'com.facebook.fresco:fresco:1.13.0'  
implementation "com.facebook.fresco:animated-gif:1.13.0"  
/*uniapp所需库-----------------------结束*/  
// 基座需要,必须添加  
implementation 'com.github.bumptech.glide:glide:4.9.0'  
implementation 'com.alibaba:fastjson:1.2.83'  
implementation 'androidx.webkit:webkit:1.5.0'  
implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.0.0'  
implementation 'androidx.core:core:1.1.0'  
implementation "androidx.fragment:fragment:1.1.0"  
implementation 'androidx.appcompat:appcompat:1.1.0'  
// 添加uni-app插件  

implementation project(':uniplugin_gmrequest')  

implementation "com.squareup.okhttp3:okhttp:4.9.1"  
}  

configurations.configureEach {  
resolutionStrategy {  
// 强制使用指定版本的 okhttp  
force("com.squareup.okhttp3:okhttp:4.9.1")  
}  
}  

更多关于uni-app 生成本地打包资源 SQLite 模块已经勾选上了 但是在AS中运行起来以后 提示没有勾选sqlite的实战教程也可以访问 https://www.itying.com/category-93-b0.html

2 回复

离线打包时这个 manifest 配置里面 app模块的内容基本都不管用的,需要自行在离线工程中配置,不是云打包那样勾上就行了。
错误提示也很明确了,就是你的离线工程里面没有添加这个模块和配置,参考 SQLite(数据库),在你的离线工程中完成配置重新打包即可

更多关于uni-app 生成本地打包资源 SQLite 模块已经勾选上了 但是在AS中运行起来以后 提示没有勾选sqlite的实战教程也可以访问 https://www.itying.com/category-93-b0.html


感谢 感谢

回到顶部