Tried to add CAPACITOR_ANDROID_STUDIO_PATH environment variable as.
import { CapacitorConfig } from '@capacitor/cli';
const config: CapacitorConfig = {
appId: 'com.barqrscanner.app',
appName: 'barqrscannerapp',
webDir: 'www',
bundledWebRuntime: false
};
export interface PluginsConfig {
[CAPACITOR_ANDROID_STUDIO_PATH: string]: | {
[CAPACITOR_ANDROID_STUDIO_PATH: string]: 'D:\\android-studio-canary\\bin\\studio64.exe';
}
| undefined;
}
export default config;
If I try to add it in the.
const config: CapacitorConfig = {
appId: 'com.barqrscanner.app',
appName: 'barqrscannerapp',
webDir: 'www',
bundledWebRuntime: false,
CAPACITOR_ANDROID_STUDIO_PATH: 'D:\\android-studio-canary\\bin\\studio64.exe'
};
ionic build works but when I run npx cap open android both of them CapacitorConfig and PluginsConfig doesn't work
it shows this problem.
PS D:\Projects\BarQrScannerApp> npx cap open android
[error] Unable to launch Android Studio. Is it installed?
Attempted to open Android Studio at:
You can configure this with the CAPACITOR_ANDROID_STUDIO_PATH environment variable.
I referenced it from here.
https://capacitorjs.com/docs/config
Update 1:
In capacitor.config.json I've used as.
{
"appId": "com.enappd.capBarcodeScanner",
"appName": "ionic-capacitor-barcode-scanner",
"bundledWebRuntime": false,
"npmClient": "npm",
"webDir": "www",
"windowsAndroidStudioPath": "D:\\android-studio-canary\\bin\\studio64.exe",
"cordova": {
"preferences": {
"ScrollEnabled": "false",
"android-minSdkVersion": "19",
"BackupWebStorage": "none",
"SplashMaintainAspectRatio": "true",
"FadeSplashScreenDuration": "300",
"SplashShowOnlyFirstTime": "false",
"SplashScreen": "screen",
"SplashScreenDelay": "3000"
}
}
}
For Angular 10 now for Angular 12 is using as .ts extension for capacitor.config.ts now how do I implement something like this "windowsAndroidStudioPath": "D:\\android-studio-canary\\bin\\studio64.exe".
