@ -135,6 +135,7 @@ Prerequisites: Android Studio with SDK installed
1. Build the web assets:
```bash
rm -rf dist
npm run build:web
npm run build:capacitor
```
@ -163,76 +164,77 @@ Prerequisites: Android Studio with SDK installed
You must add the following intent filter to the `android/app/src/main/AndroidManifest.xml` file:
```xml
< intent-filter android:autoVerify = "true" >
< action android:name = "android.intent.action.VIEW" / >
< category android:name = "android.intent.category.DEFAULT" / >
< category android:name = "android.intent.category.BROWSABLE" / >
< data android:scheme = "timesafari" / >
< / intent-filter >
```
```xml
< intent-filter android:autoVerify = "true" >
< action android:name = "android.intent.action.VIEW" / >
< category android:name = "android.intent.category.DEFAULT" / >
< category android:name = "android.intent.category.BROWSABLE" / >
< data android:scheme = "timesafari" / >
< / intent-filter >
```
You must also add the following to the `android/app/build.gradle` file:
```gradle
android {
// ... existing config ...
lintOptions {
disable 'UnsanitizedFilenameFromContentProvider'
abortOnError false
baseline file("lint-baseline.xml")
// Ignore Capacitor module issues
ignore 'DefaultLocale'
ignore 'UnsanitizedFilenameFromContentProvider'
ignore 'LintBaseline'
ignore 'LintBaselineFixed'
}
}
```
```gradle
android {
// ... existing config ...
lintOptions {
disable 'UnsanitizedFilenameFromContentProvider'
abortOnError false
baseline file("lint-baseline.xml")
// Ignore Capacitor module issues
ignore 'DefaultLocale'
ignore 'UnsanitizedFilenameFromContentProvider'
ignore 'LintBaseline'
ignore 'LintBaselineFixed'
}
}
```
Modify `/android/build.gradle` to use a stable version of AGP and make sure Kotlin version is compatible.
```gradle
buildscript {
repositories {
google()
mavenCentral()
}
dependencies {
// Use a stable version of AGP
classpath 'com.android.tools.build:gradle:8.1.0'
// Make sure Kotlin version is compatible
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.0"
}
}
allprojects {
repositories {
google()
mavenCentral()
}
}
// Add this to handle version conflicts
configurations.all {
resolutionStrategy {
force 'org.jetbrains.kotlin:kotlin-stdlib:1.8.0'
force 'org.jetbrains.kotlin:kotlin-stdlib-common:1.8.0'
}
}
```
```gradle
buildscript {
repositories {
google()
mavenCentral()
}
dependencies {
// Use a stable version of AGP
classpath 'com.android.tools.build:gradle:8.1.0'
// Make sure Kotlin version is compatible
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.0"
}
}
allprojects {
repositories {
google()
mavenCentral()
}
}
// Add this to handle version conflicts
configurations.all {
resolutionStrategy {
force 'org.jetbrains.kotlin:kotlin-stdlib:1.8.0'
force 'org.jetbrains.kotlin:kotlin-stdlib-common:1.8.0'
}
}
```
## Building Android from the console
```bash
./gradlew clean
./gradlew build -Dlint.baselines.continue=true
npx cap
```
```bash
cd android
./gradlew clean
./gradlew build -Dlint.baselines.continue=true
cd ..
npx cap run android
```
## Development