-
IONIC Capacitor build Android Debug APK
IONIC Capacitor build Android Debug APK Install Capacitor npm install @capacitor/core @capacitor/cli npx cap init Add Android platform to Capacitor project ionic build npm install @capacitor/android ionic cap add android Build Android Debug APK with IONIC Capacitor ionic cap copy ionic cap sync ionic capacitor copy android && cd android && ./gradlew assembleDebug && cd .. Then your apk will be at: android/app/build/outputs/apk/debug/app-debug.apk If you want to run on device directly from command line: ionic capacitor copy android && cd android && ./gradlew assembleDebug && ./gradlew installDebug && cd .. Note: It doesn't work without entering the android directory Build Production APK cd android && ./gradlew assembleRelease && cd app/build/outputs/apk/release…
-
IONIC Angular deployment – 404 on page Refresh
This will work on following servers. Apache Server Add .htaccess on root to your project <IfModule mod_rewrite.c> <IfModule mod_negotiation.c> Options -MultiViews -Indexes </IfModule> RewriteEngine On # Handle Authorization Header RewriteCond %{HTTP:Authorization} . RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] # Redirect Trailing Slashes If Not A Folder... RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} (.+)/$ RewriteRule ^ %1 [L,R=301] # Handle Front Controller... RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^ index.html [L] </IfModule> IIS Server Add web.config <configuration> <system.webServer> <rewrite> <rules> <rule name="Imported Rule 1" stopProcessing="true"> <match url="^(.*)/$" ignoreCase="false" /> <conditions> <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" /> </conditions> <action type="Redirect" redirectType="Permanent" url="/{R:1}" /> </rule> <rule name="Imported Rule 2" stopProcessing="true"> <match url="^" ignoreCase="false" /> <conditions>…
-
Ionic app icon generator
Ionic app icon generator Tạo icon cho app IONIC [ERROR] cordova-res was not found on your PATH. Please install it globally ionic cordova resources > cordova-res [cordova-res] 'cordova-res' is not recognized as an internal or external command, [cordova-res] operable program or batch file. [ERROR] cordova-res was not found on your PATH. Please install it globally: npm i -g cordova-res Run npm install -g cordova-res to install cordova-res Ionic create icon and splash screen resources The source image for icons should ideally be at least 1024×1024px and located at resources/icon.png. The source image for splash screens should ideally be at least 2732×2732px and located at resources/splash.png. If you used ionic start,…
-
Thêm quảng cáo vào app android – ionic add Admob to my app
Thêm quảng cáo vào app android - ionic add Admob to my app Đăng ký tài khoản https://admob.google.com/home/ https://apps.admob.com/signup/create-account Bị lỗi An error occurred. Please try again later. https://support.google.com/admob/thread/106753835/can-t-signup-into-account-for-admob-i-am-getting-an-error-occurred-please-try-again-later?hl=en Đổi sang trình duyệt Edge là Ok, lưu ý phải tắt Adblock nữa Giao diện Admob Đăng ký ID quảng cáo Admob https://apps.admob.com/v2/apps/9537187511/overview Tạo đơn vị quảng cáo ca-app-pub-3654642326317030~9537187511 ca-app-pub-3654642326317030/1927781499 https://apps.admob.com/v2/apps/9537187511/adunits/create Preferences https://www.freakyjolly.com/ionic-admob-free-native-tutorial/ https://apps.admob.com/v2/apps/9537187511/overview Thêm quảng cáo vào app App ID ca-app-pub-3654642326317030~9537187511 banner ca-app-pub-3654642326317030/1927781499 ionic cordova plugin add cordova-plugin-admob-free --save --variable ADMOB_APP_ID="ca-app-pub-3654642326317030~9537187511" npm install @ionic-native/admob-free ionic g service services/admob https://apps.admob.com/v2/apps/9537187511/settings https://apps.admob.com/v2/apps/9537187511/adunits/list Fix Lỗi không hiện quảng cáo trong app Khi app được release thì tự động hiện được quảng cáo Không…
-
IONIC build APK bị lỗi build tools
IONIC build APK bị lỗi build tools
-
Lỗi CLI IONIC tạo project mới
Lỗi CLI IONIC tạo project mới
-
IONIC – ERR_NO_DEVICE: No hardware devices found
IONIC - ERR_NO_DEVICE: No hardware devices found
-
Ionic Text to Speech: How to Convert Text to Speech in Ionic Application using Ionic Native and Cordova Plugins (Có thử tiếng Việt ok)
-
[IONIC] Fix lỗi No Java files found that extend CordovaActivity
[IONIC] Fix lỗi No Java files found that extend CordovaActivity Thông tin lỗi Cách sửa # Xóa, thêm lại android mới nhất ionic cordova platform rm android ionic cordova platform add android@latest ionic cordova prepare android cheer!
-
Android – Fix lỗi Change your app’s target API level to at least…
Android - Fix lỗi Change your app's target API level to at least... Hôm nay mình release một bản cập nhật cho app trên android thì gặp lỗi này nên note lại cách fix luôn Nhận dạng lỗi Your app currently targeta API level 28 and must target at least API level 29 to ensure it is built on the latest APIe optimized for security and performance. Change your app's target API level to at least 29 Lỗi này nó kêu mình update lên ít nhất là android 10 (api 29) thì mới cho release bản cập nhật này. Để biết version android nào tương ứng với api nào thì…