Need help with native plugin mobile accessability

Unfortunately no. I have only my Windows laptop to work on.
I am not using any proxy as far as I know.

  1. Have you tried actually build a project with that plugin and use it?
  2. How can I force the build process to try installing all the plugins? It is quite weird that after the first failure there is no mention to any of the plugins if I try to build once again.
  3. How can I “verify” my environment? What should I check? I even tried to re-install git but it had no effect.

Try another network connection at least. Open a hotspot with your mobile phone, connect to that, and do the “new project” dance again (so you start with a clean slate and not a borken project)

Well… I tried it with a hotspot but I got the same errors.

Then I started a new project and tried to install the plugin without ionic prefix (using cordova only).
It seemed that the installation and the build passed alright but when after I installed the APK (the result of cordova build android) it crashed right after startup. After that I tried to build it again but this time with ionic, installed the APK, opened the app… same error (plugin not installed) on logcat.

This is the output of my cmd for what I described above:

C:\Users\user\Documents\ionic-apps>ionic start phone blank
✔ Creating directory .\phone - done!
[INFO] Fetching app base (https://github.com/ionic-team/ionic2-app-base/archive/master.tar.gz)
✔ Downloading - done!
[INFO] Fetching starter template blank (https://github.com/ionic-team/ionic2-starter-blank/archive/master.tar.gz)
✔ Downloading - done!
✔ Updating package.json with app details - done!
✔ Creating configuration file ionic.config.json - done!
[INFO] Installing dependencies may take several minutes!
> npm install
✔ Running command - done!
> npm install --save-dev --save-exact @ionic/cli-plugin-ionic-angular@latest
✔ Running command - done!
> git init
✔ Running command - done!
> git add -A
✔ Running command - done!
> git commit -m "Initial commit" --no-gpg-sign
✖ Running command - failed!
[ERROR] An error occurred while running git commit -m "Initial commit" --no-gpg-sign (exit code 128):


        *** Please tell me who you are.

        Run

        git config --global user.email "you@example.com"
        git config --global user.name "Your Name"

        to set your account's default identity.
        Omit --global to set the identity only in this repository.

        fatal: unable to auto-detect email address (got 'user@DESKTOP-GNNTSLF.(none)')



C:\Users\user\Documents\ionic-apps>cd phone

C:\Users\user\Documents\ionic-apps\phone>cordova plugin add https://github.com/phonegap/phonegap-mobile-accessibility.git
Adding phonegap-plugin-mobile-accessibility to package.json
Saved plugin info for "phonegap-plugin-mobile-accessibility" to config.xml

C:\Users\user\Documents\ionic-apps\phone>npm install --save @ionic-native/mobile-accessibility
phone@0.0.1 C:\Users\user\Documents\ionic-apps\phone
`-- @ionic-native/mobile-accessibility@3.12.1

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

C:\Users\user\Documents\ionic-apps\phone>cordova build android
Error: No platforms added to this project. Please use `cordova platform add <platform>`.

C:\Users\user\Documents\ionic-apps\phone>cordova platform add android
Using cordova-fetch for cordova-android@~6.2.2
Adding android project...
Creating Cordova project for the Android platform:
        Path: platforms\android
        Package: io.ionic.starter
        Name: MyApp
        Activity: MainActivity
        Android target: android-25
Subproject Path: CordovaLib
Android project created with cordova-android@6.2.3
Installing "phonegap-plugin-mobile-accessibility" for android
Installing "cordova-plugin-device" for android
Installing "cordova-plugin-network-information" for android
Discovered plugin "cordova-plugin-console" in config.xml. Adding it to the project
Installing "cordova-plugin-console" for android
Adding cordova-plugin-console to package.json
Saved plugin info for "cordova-plugin-console" to config.xml
Discovered plugin "cordova-plugin-splashscreen" in config.xml. Adding it to the project
Installing "cordova-plugin-splashscreen" for android
Adding cordova-plugin-splashscreen to package.json
Saved plugin info for "cordova-plugin-splashscreen" to config.xml
Discovered plugin "cordova-plugin-statusbar" in config.xml. Adding it to the project
Installing "cordova-plugin-statusbar" for android
Adding cordova-plugin-statusbar to package.json
Saved plugin info for "cordova-plugin-statusbar" to config.xml
Discovered plugin "cordova-plugin-whitelist" in config.xml. Adding it to the project
Installing "cordova-plugin-whitelist" for android

               This plugin is only applicable for versions of cordova-android greater than 4.0. If you have a previous platform version, you do *not* need this plugin since the whitelist will be built in.

Adding cordova-plugin-whitelist to package.json
Saved plugin info for "cordova-plugin-whitelist" to config.xml
Discovered plugin "ionic-plugin-keyboard" in config.xml. Adding it to the project
Installing "ionic-plugin-keyboard" for android
Adding ionic-plugin-keyboard to package.json
Saved plugin info for "ionic-plugin-keyboard" to config.xml
--save flag or autosave detected
Saving android@~6.2.3 into config.xml file ...

C:\Users\user\Documents\ionic-apps\phone>cordova build android
ANDROID_HOME=C:\Users\user\AppData\Local\Android\sdk
JAVA_HOME=C:\Program Files\java\jdk1.8.0_111
:wrapper

BUILD SUCCESSFUL

Total time: 3.068 secs
Subproject Path: CordovaLib
The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.
        at build_9qmfnjdd3z73vrir9fpy03353.run(C:\Users\user\Documents\ionic-apps\phone\platforms\android\build.gradle:137)
The JavaCompile.setDependencyCacheDir() method has been deprecated and is scheduled to be removed in Gradle 4.0.
Incremental java compilation is an incubating feature.
The TaskInputs.source(Object) method has been deprecated and is scheduled to be removed in Gradle 4.0. Please use TaskInputs.file(Object).skipWhenEmpty() instead.
:preBuild UP-TO-DATE
:preDebugBuild UP-TO-DATE
:checkDebugManifest
:CordovaLib:preBuild UP-TO-DATE
:CordovaLib:preDebugBuild UP-TO-DATE
:CordovaLib:checkDebugManifest
:CordovaLib:prepareDebugDependencies
:CordovaLib:compileDebugAidl
:CordovaLib:compileDebugNdk UP-TO-DATE
:CordovaLib:compileLint
:CordovaLib:copyDebugLint UP-TO-DATE
:CordovaLib:mergeDebugShaders
:CordovaLib:compileDebugShaders
:CordovaLib:generateDebugAssets
:CordovaLib:mergeDebugAssets
:CordovaLib:mergeDebugProguardFiles
:CordovaLib:packageDebugRenderscript UP-TO-DATE
:CordovaLib:compileDebugRenderscript
:CordovaLib:generateDebugResValues
:CordovaLib:generateDebugResources
:CordovaLib:packageDebugResources
:CordovaLib:processDebugManifest
:CordovaLib:generateDebugBuildConfig
:CordovaLib:processDebugResources
:CordovaLib:generateDebugSources
:CordovaLib:incrementalDebugJavaCompilationSafeguard
:CordovaLib:compileDebugJavaWithJavac
:CordovaLib:compileDebugJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
:CordovaLib:processDebugJavaRes UP-TO-DATE
:CordovaLib:transformResourcesWithMergeJavaResForDebug
:CordovaLib:transformClassesAndResourcesWithSyncLibJarsForDebug
:CordovaLib:mergeDebugJniLibFolders
:CordovaLib:transformNative_libsWithMergeJniLibsForDebug
:CordovaLib:transformNative_libsWithSyncJniLibsForDebug
:CordovaLib:bundleDebug
:prepareOrgApacheCordovaCordovaLib623DebugLibrary
:prepareDebugDependencies
:compileDebugAidl
:compileDebugRenderscript
:generateDebugBuildConfig
:generateDebugResValues
:generateDebugResources
:mergeDebugResources
:processDebugManifest
:processDebugResources
:generateDebugSources
:incrementalDebugJavaCompilationSafeguard
:compileDebugJavaWithJavac
:compileDebugJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
Note: C:\Users\user\Documents\ionic-apps\phone\platforms\android\src\org\apache\cordova\splashscreen\SplashScreen.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
:compileDebugNdk UP-TO-DATE
:compileDebugSources
:mergeDebugShaders
:compileDebugShaders
:generateDebugAssets
:mergeDebugAssets
:transformClassesWithDexForDebug
:mergeDebugJniLibFolders
:transformNative_libsWithMergeJniLibsForDebug
:processDebugJavaRes UP-TO-DATE
:transformResourcesWithMergeJavaResForDebug
:validateSigningDebug
:packageDebug
:assembleDebug
:cdvBuildDebug

BUILD SUCCESSFUL

Total time: 7.008 secs
Built the following apk(s):
        C:/Users/user/Documents/ionic-apps/phone/platforms/android/build/outputs/apk/android-debug.apk

C:\Users\user\Documents\ionic-apps\phone>grep
Usage: grep [OPTION]... PATTERN [FILE]...
Try 'grep --help' for more information.

C:\Users\user\Documents\ionic-apps\phone>ionic cordova build android
? The plugin @ionic/cli-plugin-cordova is not installed. Would you like to install it and continue? Yes
> npm install --save-dev --save-exact @ionic/cli-plugin-cordova@latest
✔ Running command - done!
Running app-scripts build: --iscordovaserve --externalIpRequired --nobrowser

[18:02:33]  build dev started ...
[18:02:33]  clean started ...
[18:02:33]  clean finished in 2 ms
[18:02:33]  copy started ...
[18:02:33]  transpile started ...
[18:02:36]  transpile finished in 2.65 s
[18:02:36]  preprocess started ...
[18:02:36]  deeplinks started ...
[18:02:36]  deeplinks finished in 12 ms
[18:02:36]  preprocess finished in 13 ms
[18:02:36]  webpack started ...
[18:02:36]  copy finished in 2.87 s
[18:02:43]  webpack finished in 7.44 s
[18:02:43]  sass started ...
[18:02:44]  sass finished in 1.14 s
[18:02:44]  postprocess started ...
[18:02:44]  postprocess finished in 6 ms
[18:02:44]  lint started ...
[18:02:44]  build dev finished in 11.29 s
> cordova build android
/ Running command [18:02:47]  lint finished in 2.52 s
✔ Running command - done!
ANDROID_HOME=C:\Users\user\AppData\Local\Android\sdk
JAVA_HOME=C:\Program Files\java\jdk1.8.0_111
Subproject Path: CordovaLib
The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.
        at build_9qmfnjdd3z73vrir9fpy03353.run(C:\Users\user\Documents\ionic-apps\phone\platforms\android\build.gradle:137)
The JavaCompile.setDependencyCacheDir() method has been deprecated and is scheduled to be removed in Gradle 4.0.
Incremental java compilation is an incubating feature.
The TaskInputs.source(Object) method has been deprecated and is scheduled to be removed in Gradle 4.0. Please use TaskInputs.file(Object).skipWhenEmpty() instead.
:preBuild UP-TO-DATE
:preDebugBuild UP-TO-DATE
:checkDebugManifest
:CordovaLib:preBuild UP-TO-DATE
:CordovaLib:preDebugBuild UP-TO-DATE
:CordovaLib:checkDebugManifest
:CordovaLib:prepareDebugDependencies
:CordovaLib:compileDebugAidl UP-TO-DATE
:CordovaLib:compileDebugNdk UP-TO-DATE
:CordovaLib:compileLint UP-TO-DATE
:CordovaLib:copyDebugLint UP-TO-DATE
:CordovaLib:mergeDebugShaders UP-TO-DATE
:CordovaLib:compileDebugShaders UP-TO-DATE
:CordovaLib:generateDebugAssets UP-TO-DATE
:CordovaLib:mergeDebugAssets UP-TO-DATE
:CordovaLib:mergeDebugProguardFiles UP-TO-DATE
:CordovaLib:packageDebugRenderscript UP-TO-DATE
:CordovaLib:compileDebugRenderscript UP-TO-DATE
:CordovaLib:generateDebugResValues UP-TO-DATE
:CordovaLib:generateDebugResources UP-TO-DATE
:CordovaLib:packageDebugResources UP-TO-DATE
:CordovaLib:processDebugManifest UP-TO-DATE
:CordovaLib:generateDebugBuildConfig UP-TO-DATE
:CordovaLib:processDebugResources UP-TO-DATE
:CordovaLib:generateDebugSources UP-TO-DATE
:CordovaLib:incrementalDebugJavaCompilationSafeguard UP-TO-DATE
:CordovaLib:compileDebugJavaWithJavac UP-TO-DATE
:CordovaLib:processDebugJavaRes UP-TO-DATE
:CordovaLib:transformResourcesWithMergeJavaResForDebug UP-TO-DATE
:CordovaLib:transformClassesAndResourcesWithSyncLibJarsForDebug UP-TO-DATE
:CordovaLib:mergeDebugJniLibFolders UP-TO-DATE
:CordovaLib:transformNative_libsWithMergeJniLibsForDebug UP-TO-DATE
:CordovaLib:transformNative_libsWithSyncJniLibsForDebug UP-TO-DATE
:CordovaLib:bundleDebug UP-TO-DATE
:prepareOrgApacheCordovaCordovaLib623DebugLibrary UP-TO-DATE
:prepareDebugDependencies
:compileDebugAidl UP-TO-DATE
:compileDebugRenderscript UP-TO-DATE
:generateDebugBuildConfig UP-TO-DATE
:generateDebugResValues UP-TO-DATE
:generateDebugResources UP-TO-DATE
:mergeDebugResources UP-TO-DATE
:processDebugManifest UP-TO-DATE
:processDebugResources UP-TO-DATE
:generateDebugSources UP-TO-DATE
:incrementalDebugJavaCompilationSafeguard UP-TO-DATE
:compileDebugJavaWithJavac UP-TO-DATE
:compileDebugNdk UP-TO-DATE
:compileDebugSources UP-TO-DATE
:mergeDebugShaders UP-TO-DATE
:compileDebugShaders UP-TO-DATE
:generateDebugAssets UP-TO-DATE
:mergeDebugAssets
:transformClassesWithDexForDebug UP-TO-DATE
:mergeDebugJniLibFolders UP-TO-DATE
:transformNative_libsWithMergeJniLibsForDebug UP-TO-DATE
:processDebugJavaRes UP-TO-DATE
:transformResourcesWithMergeJavaResForDebug UP-TO-DATE
:validateSigningDebug
:packageDebug
:assembleDebug
:cdvBuildDebug

BUILD SUCCESSFUL

Total time: 3.222 secs
Built the following apk(s):
        C:/Users/user/Documents/ionic-apps/phone/platforms/android/build/outputs/apk/android-debug.apk

I think I managed to clear my environment because after that I installed another native plugin (Native Audio) and used it with my app and it works perfectly.
I guess that this plugin is somehow broken, unless a windows user will claim otherwise.

Anyway, I really feel I shaved a big yak here. The reason I turned to mobile accessibility is described here: How to ignore/override system font size
If anyone has a better solution I would be thankful to here about it.

Thanks a lot guys.

7 posts were split to a new topic: Error with the Mobile Accessibility plugin

This seems to be an actual bug with the Ionic Native plugin, more information (and workaround) here:

try in v4 ionic

declare var window: any;

and

getTextZoomCallback(textZoom) { // is my function callback
console.log('Current text zoom = ’ + textZoom + ‘%’)
}

call in init

window.MobileAccessibility.getTextZoom(this.getTextZoomCallback);

great success!!