New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create android code signing guide #1674
Comments
You can only install signed apks. We don't have a guide for that yet but typically recommend flutter's guide since it's fairly close https://docs.flutter.dev/deployment/android#signing-the-app |
For people that have the same question, here is a link to the beta guide with the apk sign process: https://next--tauri.netlify.app/next/guides/distribution/sign-android/ I tried it on my project and it worked. The flutter guide did give a similar outline, but given that flutter works with build.gradle and tauri works with build.gradle.kts, a code slightly different was required. |
Site Not Found |
I do not remember everything that was mentioned on that website, but I followed some steps on a project and I have:
storePassword=...
keyPassword=...
keyAlias=...
storeFile=storeFile.jks
keytool -genkey -v -keystore ~/storeFile.jks -keyalg RSA \
-keysize 2048 -validity 10000 -alias upload
val keyPropertiesFile = rootProject.file("key.properties")
val keyProperties = Properties()
keyProperties.load(FileInputStream(keyPropertiesFile))
android {
compileSdk = 33
namespace = "com.tauri.app"
defaultConfig {
manifestPlaceholders["usesCleartextTraffic"] = "false"
applicationId = "com.tauri.app"
minSdk = 24
targetSdk = 33
versionCode = 1
versionName = "1.0"
}
signingConfigs {
create("release") {
keyAlias = keyProperties["keyAlias"] as String
keyPassword = keyProperties["keyPassword"] as String
storeFile = file(keyProperties["storeFile"] as String)
storePassword = keyProperties["storePassword"] as String
}
}
buildTypes {
getByName("debug") {
manifestPlaceholders["usesCleartextTraffic"] = "true"
isDebuggable = true
isJniDebuggable = true
isMinifyEnabled = false
packaging { jniLibs.keepDebugSymbols.add("*/arm64-v8a/*.so")
jniLibs.keepDebugSymbols.add("*/armeabi-v7a/*.so")
jniLibs.keepDebugSymbols.add("*/x86/*.so")
jniLibs.keepDebugSymbols.add("*/x86_64/*.so")
}
}
getByName("release") {
isMinifyEnabled = true
// new
//minifyEnabled = true
//shrinkResources = true
//proguardFiles(getDefaultProguardFile('proguard-android.txt'), "proguard-rules.pro")
isShrinkResources = true
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
// old
signingConfig = signingConfigs.getByName("release")
proguardFiles(
*fileTree(".") { include("**/*.pro") }
.plus(getDefaultProguardFile("proguard-android-optimize.txt"))
.toList().toTypedArray()
)
}
}
kotlinOptions {
jvmTarget = "1.8"
}
} I hope this helps! 馃憤 |
馃搵 Page(s) affected (or suggested, for new content)
https://beta.tauri.app/guides/build/
馃搵 Description or bullet point outline (if proposing new content)
The application is assembled. I am trying to install .apk on my phone, but this error occurs
pnpm Vanilla JavaScript
The APK failed to install. Error: INSTALL_PARSE_FAILED_NO_CERTIFICATES: Failed to collect certificates from /data/app/vdml780192954.tmp/base.apk: Attempt to get length of null array
The text was updated successfully, but these errors were encountered: