Hi there,
I tried https://github.com/dpa99c/cordova-diagnostic-plugin to recognize, if GPS is active or not, before going on with another task for geolocalization …
I tried this plugin on iOS and it works fine. But the build for Android won’t work after installing this plugin. Removing the plugin resolved the Android-nobuild-issue, but now there’s no routine to check if GPS is active or not.
Using …
Ionic: 1.7.12
Cordova: 5.4.1
npm: 2.11.3
Android-SDK-Components: ALL selected and installed over the “Android SDK Manager”.
Question: Is there perhaps another recomended Ionic plugin for detecting GPS is active or not? Or is there an even easier way to get the GPS-State?
And here comes the error message when building for Android:
…
:processDebugResourcesT:\Coding\myApp\platforms\android\build\intermediates\res\debug\values-v23\values.xml:5: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.
Widget.Button.Inverse’. FAILED
T:\Coding\myApp\platforms\android\build\intermediates\res\debug\values-v23\values.xml:26: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Button.Colored'.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':processDebugResources'.
BUILD FAILED
Total time: 47.683 secs
> com.android.ide.common.internal.LoggedErrorException: Failed to run command:
C:\Users\me\AppData\Local\Android\sdk\build-tools\23.0.2\aapt.exe package -f --no-crunch -I C:\Users\me\AppData\Local\Android\sdk\platforms\android-22\android.jar -M T:\Coding\myApp\platforms\android\build\int
ermediates\manifests\full\debug\AndroidManifest.xml -S T:\Coding\myApp\platforms\android\build\intermediates\res\debug -A T:\Coding\myApp\platforms\android\build\intermediates\assets\debug -m -J T:\Coding\myApp\platform
s\android\build\generated\source\r\debug -F T:\Coding\myApp\platforms\android\build\intermediates\res\resources-debug.ap_ --debug-mode --custom-package de.rmg_ratingen.ratingenapp -0 apk --output-text-symbols T:\Coding\myApp\
platforms\android\build\intermediates\symbols\debug
Error Code:
1
Output:
T:\Coding\myApp\platforms\android\build\intermediates\res\debug\values-v23\values.xml:5: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.
Inverse'.
T:\Coding\myApp\platforms\android\build\intermediates\res\debug\values-v23\values.xml:26: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Button.Colored'.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
T:\Coding\myApp\platforms\android\cordova\node_modules\q\q.js:126
throw e;
^
Error code 1 for command: cmd with args: /s /c "T:\Coding\myApp\platforms\android\gradlew cdvBuildDebug -b T:\Coding\myApp\platforms\android\build.gradle -Dorg.gradle.daemon=true"
ERROR building one of the platforms: Error: cmd: Command failed with exit code 1
You may not have the required environment or OS to build this project
Error: cmd: Command failed with exit code 1