Ich bin reiner Javascript-Entwickler (angularjs & nodejs) & ohne Kenntnisse über Android oder iOS-App. Ich habe Tutorial von nativescipt gefolgt und wurde eine App in nativescipt (Winkel-) mit Hilfe von folgendem Link erstellen: Wiring up Google Maps Nativescript plugin with Angular 2
aber nach dem Laufen: tns plugin add nativescript-google-maps-sdk und auf Befehl ausführen tns run android
es eine Ausnahme istNativeScript nativescript-google-maps-sdk nicht woking
D:\ts\app\sample-Groceries>tns run android
Executing before-prepare hook from D:\ts\app\sample-Groceries\hooks\before-prepare\nativescript-dev-typescript.js
Found peer TypeScript 1.8.10
Project successfully prepared
WARNING: The file: D:\ts\app\sample-Groceries\node_modules\nativescript-google-maps-sdk\platforms\android\AndroidManifest.xml is depricated, you can read more about what will be the expected plugin structure here: https://www.nativescript.org/blog/migrating-n-android-plugins-from-version-1.7-to-2.0
WARNING: The file: D:\ts\app\sample-Groceries\node_modules\nativescript-google-maps-sdk\platforms\android\res\values\nativescript_google_maps_api.xml is depricated, you can read more about what will be the expected plugin structure here: https://www.nativescript.org/blog/migrating-n-android-plugins-from-version-1.7-to-2.0
:config phase: createDefaultIncludeFiles
+found plugins: nativescript-google-maps-sdk
{
"F0" {
dimension "nativescriptgooglemapssdk"
}
}
}Renaming plugin directory to flavor name: D:\ts\app\sample-Groceries\platforms\android\src\nativescript-google-maps-sdk
-> D:\ts\app\sample-Groceries\platforms\android\src\F0
+found plugins: tns-core-modules-widgets
{
"F1" {
dimension "tnscoremoduleswidgets"
}
} }Renaming plugin directory to flavor name: D:\ts\app\sample-Groceries\platforms\android\src\tns-core-modules-widgets
D:\ts\app\sample-Groceries\platforms\android\src\F1
:config phase: createPluginsConfigFile
Creating product flavors include.gradle file in D:\ts\app\sample-Groceries\platforms\android/configurations folder...
:config phase: pluginExtend
+applying configuration from: D:\ts\app\sample-Groceries\platforms\android\configurations\include.gradle
+applying configuration from: D:\ts\app\sample-Groceries\platforms\android\configurations\nativescript-google-maps-sdk\include.gradle
+applying configuration from: D:\ts\app\sample-Groceries\platforms\android\configurations\tns-core-modules-widgets\include.gradle
:config phase: copyAarDependencies
:config phase: addAarDependencies
+adding dependency: D:\ts\app\sample-Groceries\platforms\android\libs\aar\widgets-release.aar
FAILURE: Build failed with an exception.
Ich habe besucht Seite https://www.nativescript.org/blog/migrating-n-android-plugins-from-version-1.7-to-2.0, aber keine Informationen erhalten, um diese Ausnahme zu beheben.
danke für tolle Beispielprojekt. aber wie vorgeschlagen habe ich Android-Plattform entfernen und fügen Sie es erneut, jetzt Ausnahme ändern in diese: 'Konnte keine Entsprechungen für com.google.android.gms finden: play-services-maps: + als keine Versionen von com.google .android.gms: play-services-maps sind verfügbar. Ich benutze VSCode und Genymotion Emulator –
Standardmäßig Genymotion haben keine Google Play-Service. Es gibt zwei Möglichkeiten, um dieses Problem zu lösen: Folgen Sie diesen: [Wie installiert man Google Play Services auf Genymotion] (http://stackoverflow.com/questions/33344857/preview-google-nexus-5x-6-0-0- api-23-gapps) und konfigurieren Sie den Google Play-Dienst auf Ihrem Emulator oder stellen Sie Ihre App auf einem echten Gerät bereit. –
Es genügt, die Zeile 'registerElement ...' in die Datei 'main.ts' einzufügen. Das Ändern einer Datei in 'node_modules' ist keine gute Idee, da Sie die Änderungen wiederholen müssen, wenn Sie die Module neu installieren. – Leukipp