Last active
May 13, 2020 22:23
-
-
Save filipproch/9db993f4dc34db2ef013 to your computer and use it in GitHub Desktop.
With Archon installed, this way you can debug your Android app without slow bad emulator
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
task runChromeAppDebug(type: Exec) { | |
executable "bash" | |
args "--login", "-c", "google-chrome --load-and-launch-app=${projectDir}/${android.defaultConfig.applicationId}.android" | |
} | |
task copyChromeAppDebug(type: Copy) { | |
from "${buildDir}/outputs/apk/${project.name}-debug.apk" | |
into "${projectDir}/${android.defaultConfig.applicationId}.android/vendor/chromium/crx/" | |
} | |
runChromeAppDebug.dependsOn assembleDebug, copyChromeAppDebug |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"app": { | |
"background": { | |
"page": "app_main.html" | |
} | |
}, | |
"arc_metadata": { | |
"apkList": [ | |
-> "{AppDebugApkName}.apk" | |
], | |
"enableExternalDirectory": false, | |
"formFactor": "phone", | |
"name": "com.example.app", | |
"orientation": "portrait", | |
"packageName": "com.example.app", | |
-> "enableAdb": true, | |
"useGoogleContactsSyncAdapter": false, | |
"usePlayServices": [ | |
"gcm" | |
], | |
"resize": "scale" | |
}, | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You must first create the directory structure using this command (executed from your android mobile app module directory) :
don't forget to replace {YourAppName}, and {AppDebugApkName} with particular values
Then you have to modify manifest.json in the generated folder (named after your app package name), above you can se part of the manifest where are the important changes
replace {AppDebugApkName} with your debug apk name
add enableAdb to the arc_metadata block
particular lines are highlighted with arrow at the beggining of line