首页
关于
壁纸
直播
留言
友链
统计
Search
1
《三国志英杰传》攻略
6,034 阅读
2
Emby客户端IOS破解
5,767 阅读
3
白嫖Emby
5,764 阅读
4
《吞食天地1》金手指代码
4,691 阅读
5
破解emby-server
4,039 阅读
moonjerx
game
age-of-empires
zx3
san-guo-zhi
尼尔:机械纪元
net
emby
learn-video
docker
torrent
photoshop
route
minio
git
ffmpeg
im
vue
gitlab
typecho
svn
alipay
nasm
srs
mail-server
tailscale
kkfileview
aria2
webdav
synology
redis
oray
chemical
mxsite
math
π
x-ui
digital-currency
server
nginx
baota
k8s
http
cloud
linux
shell
database
vpn
esxi
rancher
domain
k3s
ewomail
os
android
windows
ios
app-store
macos
develop
java
javascript
uniapp
nodejs
hbuildx
maven
android-studio
jetbrain
jenkins
css
mybatis
php
python
hardware
hard-disk
pc
RAM
software
pt
calibre
notion
office
language
literature
philosophy
travel
登录
Search
标签搜索
ubuntu
mysql
openwrt
zerotier
springboot
centos
openvpn
jdk
吞食天地2
synology
spring
idea
windows11
吞食天地1
transmission
google-play
Japanese
xcode
群晖
kiftd
MoonjerX
累计撰写
370
篇文章
累计收到
459
条评论
首页
栏目
moonjerx
game
age-of-empires
zx3
san-guo-zhi
尼尔:机械纪元
net
emby
learn-video
docker
torrent
photoshop
route
minio
git
ffmpeg
im
vue
gitlab
typecho
svn
alipay
nasm
srs
mail-server
tailscale
kkfileview
aria2
webdav
synology
redis
oray
chemical
mxsite
math
π
x-ui
digital-currency
server
nginx
baota
k8s
http
cloud
linux
shell
database
vpn
esxi
rancher
domain
k3s
ewomail
os
android
windows
ios
app-store
macos
develop
java
javascript
uniapp
nodejs
hbuildx
maven
android-studio
jetbrain
jenkins
css
mybatis
php
python
hardware
hard-disk
pc
RAM
software
pt
calibre
notion
office
language
literature
philosophy
travel
页面
关于
壁纸
直播
留言
友链
统计
搜索到
14
篇与
android
的结果
2023-10-27
【HbuilderX】【Android Studio】打包App步骤踩坑
一、HbuilderX打包本地离线资源包www二、安装Android Studio1.去 谷歌开发者官网 下载最新Android Studio安装包2.安装过程中会通过谷歌官方下载地址 https://dl.google.com 下载Android SDK文件,需要科学网络才能下载3.默认安装包附带的JDK版本是JDK11+以上的版本,本地安装JDK8后使用组合键 Ctrl+Shift+Alt+S 打开Project Structure->SDK Location->Gradle Settings可以切换JDK版本4.打开Dcloud官方提供的 Android-SDK@3.8.12.81924_20230817/HBuilder-Integrate-AS 工程,等待资源文件下载完毕三、Android Studio修改配置1.修改AppID和AppKey(1)HbuilderX打包好的 __UNI__XXXXXXX/www 资源包放到 Android-SDK@3.8.12.81924_20230817\HBuilder-Integrate-AS\simpleDemo\src\main\assets\apps\ 目录下,以供打包App修改 Android-SDK@3.8.12.81924_20230817\HBuilder-Integrate-AS\simpleDemo\src\main\assets\data\dcloud_control.xml 文件中的值,改为HbuilderX(2)打包好的www资源包文件名,形如 uni.UNIxxxxxxx (3)修改文件 Android-SDK@3.8.12.81924_20230817\HBuilder-Integrate-AS\simpleDemo\src\main\AndroidManifest.xml 下的 dcloud_appkey 值,为dcloud官方申请提供(4)App在手机桌面显示的应用名称需要根据本地语言自动切换国际化多语言名称在目录 Android-SDK@3.8.12.81924_20230817\HBuilder-Integrate-AS\simpleDemo\src\main\res 下复制 values 文件成多份并修改应用名称即可(5)App启动图,消息推送图标,修改目录 Android-SDK@3.8.12.81924_20230817\HBuilder-Integrate-AS\simpleDemo\src\main\res\drawable 中对应图片即可,注意尺寸大小2.gradle-6.5版本有bug,会报错主机中软件中止了一个连接,有网友提到是pc开了热点,冲突导致。关闭热点可解决。但是我台式机无热点也会如此。切换更高版本gradle解决。(6) HBuilder-Integrate-AS 工程下包含两个build.gradle文件,其中一个是 simpleDemo 工程的,这个才是需要修改配置的。 HBuilder-Integrate-AS 工程的build.gradle文件基本没改动过。3.无论切换什么版本gradle都会出现以下警告,但是不影响打包Warning: Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01 Warning: Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01 Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01 Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/03 to old ns http://schemas.android.com/sdk/android/repo/addon2/01 Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01 Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/03 to old ns http://schemas.android.com/sdk/android/repo/repository2/01 Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/03 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01 Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/014.AndroidManifest.xml文件中增加一些权限请求<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" package="com.android.simple"> <!-- 增加的内容start --> <!-- <permission android:name="android.permission.BATTERY_STATS" />--> <!-- <permission android:name="android.permission.WRITE_SETTINGS" />--> <!-- <permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" />--> <!-- <permission android:name="android.permission.READ_LOGS" />--> <!-- 上架谷歌需要禁用-start --> <!-- <uses-permission android:name="android.permission.INSTALL_PACKAGES" tools:node="remove" tools:ignore="ProtectedPermissions" />--> <!-- <uses-permission android:name="android.permission.QUERY_ALL_PACKAGES" tools:node="remove" tools:ignore="QueryAllPackagesPermission" />--> <!-- <uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" tools:node="remove"/>--> <!-- 2023年8月11日 起谷歌要求应用必须以 Android 13(SDK API 级别 33) 或更高级别为目标平台,以下2个权限已被弃用--> <!-- <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />--> <!-- <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />--> <!-- 上架谷歌需要禁用-end --> <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.hardware.camera" /> <uses-permission 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_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.MODIFY_AUDIO_SETTINGS" /> <uses-permission android:name="android.permission.READ_PHONE_STATE" /> <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.ACCESS_NETWORK_STATE" /> <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> <uses-permission android:name="android.permission.RECORD_AUDIO" /> <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" /> <uses-permission android:name="android.permission.BLUETOOTH" /> <uses-permission android:name="android.permission.CAMERA" /> <uses-permission android:name="android.permission.READ_PHONE_STATE" /> <!-- 申请白名单保活,用于进程杀死 google 推送--> <uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" /> <!-- 解决某些设备不能从google play下载app的问题,声明此硬件使用并非必要--> <!-- <uses-feature android:name="android.hardware.location.gps" android:required="false"/>--> <!-- <uses-feature android:name="android.hardware.location" android:required="false"/>--> <!-- <uses-feature android:name="android.hardware.location.network" android:required="false"/>--> <!-- <uses-feature android:name="android.hardware.telephony" android:required="false"/>--> <uses-feature android:name="android.hardware.camera" android:required="false" /> <uses-feature android:name="android.hardware.camera.autofocus" android:required="false" /> <uses-feature android:name="android.hardware.telephony" android:required="false" /> <!-- <uses-feature android:name="android.hardware.wifi" android:required="false"/>--> <!-- <uses-feature android:name="android.hardware.bluetooth" android:required="false"/>--> <!-- 增加的内容end --> <application android:allowBackup="true" android:allowClearUserData="true" android:icon="@drawable/icon" android:label="@string/app_name" android:largeHeap="true" android:supportsRtl="true"> <activity android:exported="true" 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:exported="true" android:name="io.dcloud.PandoraEntryActivity" android:launchMode="singleTask" android:configChanges="orientation|keyboardHidden|screenSize|mcc|mnc|fontScale|keyboard|smallestScreenSize|screenLayout|screenSize|uiMode" 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=" " /> </intent-filter> </activity> <meta-data android:name="dcloud_appkey" android:value="xxxxxxxxxxxxxxxxxxxxxxxxxx" /> </application> </manifest>AndroidManifest.xml中的 <activity/> 节点 android:exported 必须赋值,否则报错,dcloud官方文档赋值false节点是向dcloud申请的appKey5.官方提供的SDK包simpleDemo工程下libs中不包含录音功能需要的 audio-mp3aac-release.aar 包,缺此包打包出来的应用调用录音api会弹出h5+提示缺少录音包此包在官方提供的SDK包中目录 Android-SDK@3.8.12.81924_20230817\SDK\libs\audio-mp3aac-release.aar 6.打包出来的默认apk/aab文件名格式为 simpleDemo_release.aab ,缺乏辨识度在 build.gradle(:simpleDemo) 文件中的android节点最底部添加如下代码可以修改打包出来的apk/aab文件名apply plugin: 'com.android.application' android { compileSdkVersion 34 buildToolsVersion '30.0.3' defaultConfig { applicationId "uni.UNIxxxxxxx" minSdkVersion 21 targetSdkVersion 34 versionCode 30100 versionName "3.1.0" multiDexEnabled true ndk { // abiFilters 'x86', 'armeabi-v7a', 'arm64-v8a' // 谷歌要求:提供了32位程序,就必须提供64位程序 abiFilters 'armeabi-v7a', 'arm64-v8a' } compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } } signingConfigs { config { keyAlias 'XXXAlias' keyPassword 'keyPassword' storeFile file('xxx.keystore') storePassword 'keyPassword' 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:*~" } //重命名输出apk/aab文件名 setProperty("archivesBaseName", "AppName_v${defaultConfig.versionName}_" + new Date().format("YYYYMMddHHmm", TimeZone.getTimeZone("GMT+08:00"))) //仅对apk有效 // android.applicationVariants.all { variant -> // variant.outputs.all { // def createTime = new Date().format("YYYYMMddHHmm", TimeZone.getTimeZone("GMT+08:00")) // def fileName = "${signingConfigs.config.keyAlias}_${buildType.name}_v${defaultConfig.versionName}_${createTime}.apk" // outputFileName = fileName // } // } } dependencies { implementation fileTree(dir: 'libs', include: ['*.aar', '*.jar'], exclude: []) implementation 'androidx.appcompat:appcompat:1.1.0' implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.0.0' implementation 'androidx.core:core:1.1.0' implementation "androidx.fragment:fragment:1.1.0" implementation 'androidx.recyclerview:recyclerview:1.1.0' implementation 'com.facebook.fresco:fresco:2.5.0' implementation "com.facebook.fresco:animated-gif:2.5.0" implementation 'com.github.bumptech.glide:glide:4.9.0' implementation 'com.alibaba:fastjson:1.2.83' implementation 'androidx.webkit:webkit:1.3.0' } 打包出来的包名示例: AppName_v3.1.0_202310270536-release.apk ,aab文件同理7.在正常build之前出现的莫名其妙问题,基本上都是gradle版本问题
2023年10月27日
97 阅读
0 评论
0 点赞
2023-01-06
Could not download groovy-all.jar (org.codehaus.groovy:groovy-all:2.4.15)
在一次代码拉取中,出现了以下问题:Could not download groovy-all.jar (org.codehaus.groovy:groovy-all:2.4.15)详细的报错信息如下:// 报错信息如下 Could not resolve all files for configuration ':jcore-react-native:lintClassPath'. > Could not download groovy-all.jar (org.codehaus.groovy:groovy-all:2.4.15) > Could not get resource 'https://jcenter.bintray.com/org/codehaus/groovy/groovy-all/2.4.15/groovy-all-2.4.15.jar'. > Could not GET 'https://jcenter.bintray.com/org/codehaus/groovy/groovy-all/2.4.15/groovy-all-2.4.15.jar'. > Remote host closed connection during handshake > Could not download trove4j.jar (org.jetbrains.trove4j:trove4j:20160824) > Could not get resource 'https://jcenter.bintray.com/org/jetbrains/trove4j/trove4j/20160824/trove4j-20160824.jar'. > Could not GET 'https://jcenter.bintray.com/org/jetbrains/trove4j/trove4j/20160824/trove4j-20160824.jar'. > Connection reset 不能下载该包名,这种情况在国内很常见,一般出现的情况有:网络不好(恰好家里的网络不好,也就更容易出现这种情况)网络被强了(因为你在天朝)解决办法(用国内的镜像)具体的操作如下:// google() // jcenter() maven { url 'https://maven.aliyun.com/repository/google'} maven { url 'https://maven.aliyun.com/repository/jcenter'} maven { url 'http://maven.aliyun.com/nexus/content/groups/public'将google、jcenter的镜像源改为阿里云的,如下图。附:有时候还不行的话,这时候的你可能需要开热点进行下载了。
2023年01月06日
185 阅读
0 评论
0 点赞
2023-01-06
Android studio 解决Gradle下载缓慢的问题
一、前言第一次创建项目时AS会直接从默认的仓库下载,由于是国外服务器,下载非常慢,有时部分库还无法下载。所以我们需要将默认的仓库地址替换为国内的阿里云镜像地址,从而提升下载速度。二、步骤步骤一: 打开【build.gradle】文件。步骤二: 将repositories标签中的内容替换成自己需要的阿里镜像maven仓库地址。 阿里镜像maven仓库地址对应表请查看附录。repositories { maven { url 'https://maven.aliyun.com/repository/central' } maven { url 'https://maven.aliyun.com/repository/google' } maven { url 'https://maven.aliyun.com/repository/gradle-plugin' } maven { url 'https://maven.aliyun.com/repository/jcenter' } maven { url 'https://maven.aliyun.com/repository/public' } maven { url 'https://jitpack.io' } }三、附录仓库名称阿里云仓库地址源地址centralhttps://maven.aliyun.com/repository/centralhttps://repo1.maven.org/maven2/jcenterhttps://maven.aliyun.com/repository/jcenterhttp://jcenter.bintray.com/publichttps://maven.aliyun.com/repository/publiccentral仓和jcenter仓的聚合仓googlehttps://maven.aliyun.com/repository/googlehttps://maven.google.com/gradle-pluginfhttps://maven.aliyun.com/repository/gradle-pluginhttps://plugins.gradle.org/m2/springhttps://maven.aliyun.com/repository/springhttp://repo.spring.io/libs-milestone/spring-pluginhttps://maven.aliyun.com/repository/spring-pluginhttp://repo.spring.io/plugins-release/grails-corehttps://maven.aliyun.com/repository/grails-corehttps://repo.grails.org/grails/coreapache snapshotshttps://maven.aliyun.com/repository/apache-snapshotshttps://repository.apache.org/snapshots/
2023年01月06日
119 阅读
0 评论
0 点赞
2023-01-06
ktolin的android项目编译突然报错w: Runtime JAR files in the classpath should have the same version. These file
编译报错w: Runtime JAR files in the classpath should have the same version. These files were found in the classpath: e: D:/software/Gradle_workplace/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-common/1.5.10/6b84d926e28493be69daf673e40076f89492ef7/kotlin-stdlib-common-1.5.10.jar!/META-INF/kotlin-stdlib-common.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.13.将这个依赖;implementation “androidx.core:core-ktx:+”去掉就可以编译了;感觉就是冲突了;而且这种androidx开头的感觉有些时候容易有冲突问题,毕竟是新包名依赖感觉不稳定,以后有问题就往这个方向靠就行了;知道问题的大佬也可以指点一下;环境:kotlin版本是1.3.11的;jdk是1.8的;gradle是4.6的;android studio是4.1.3的
2023年01月06日
145 阅读
0 评论
0 点赞
2022-12-16
uniapp打包www文件使用android基座打原生aab和apk包
1.打开Android基座工程文件2.放入uniapp资源文件www到指定目录3.配置好版本号每次打包发布Google Play前需增加版本号复制签名密码,下一步操作用到4.开始编译打包选择打包类型aab或者apk(谷歌选择aab)粘贴上一步复制的密码完成
2022年12月16日
184 阅读
0 评论
0 点赞
1
2
3
您的IP: