Closed sebastianzillessen closed 11 years ago
Because you installed the project via CLI you missed a lot of the steps to get the project set up
In order for this plugin to work you need to make sure to have
android
command or the Android SDK Manager in ADT/Eclipse).android update project -p . -t YOUR_ANDROID_TARGET
inside your newly created YOUR_ADT_BUNDLE_PATH/sdk/extras/google/google_play_services/libproject/google-play-services_lib
android update project -p . -t YOUR_ANDROID_TARGET -l ../YOUR_ADT_BUNDLE_PATH/sdk/extras/google/google_play_services/libproject/google-play-services_lib/
in your project root folder. HAS TO BE A RELATIVE PATHIn case everything miserably fails and you can't build your project, you might need to import it in ADT (Eclipse) or Android Studio (IntelliJ).
Make sure you have your API KEY set up in your platforms/android/AndroidManifest.xml as well
Ok... I performed your steps above. I run the last command in
<GENERATED PROJECT FOLDER>/platforms/android/
the following cordova build
failed with:
cordova build android
[Error: An error occurred while building the android project.
/Users/user/Entwicklung/2.0/my-map/platforms/android/cordova/lib/check_reqs.js:35
return target.split('=')[1].replace('\n', '').replace('\r', '').replac
... ^
EDIT: I managed to solve that problem by using specifying the ANDROID_TARGET
with android-xx
and not by the index I used before.
The build proceeds now with no errors. But I cannot access the MapKit.js
. It is not packed to the other files in the www
folder under /platforms/android/assets
.
But I'm missing the plugin as well in the platforms/android/assets/www/cordova_plugins.js
file.
So it seems to be the same problem like in the Issue https://github.com/imhotep/MapKit/issues/16.
Is there any chance to publish a fix to that?
Thanks a lot @imhotep .
@sebastianzillessen
As I said in Issue #16 there is no need for the plugin to be in cordova_plugins.js
As far as accessing MapKit.js. Do you meant that the plugin assets don't get copied over when you add the plugin ?
Ok.
Yes @imhotep when I try to access the plugin from the code (I tried <script type="text/javascript" src="js/MapKit.js"></script>
and <script type="text/javascript" src="MapKit.js"></script>
) the file is not found and the variable mapKit
is undefined.
Thanks!
Alright! I managed to fix that all by just adding the MapKit.js file manual into the projects www folder.
I tried: 1 update new version of java javac from 1.6 to 1.7 , fail . 2 added all versions of android API to newest . fail 3 remove some version android API (leaving android-17 android-19 ) . work finally.
I have follow the steps. I have install API19 and all extras. When I try to run it for android, I get this issue:
-pre-compile: [echo] Set jars path to: C:\cordova\prueba\platforms\android\CordovaLib\ant-build\classes.jar;C:\adt-bundle\sdk\extras\google\google_play_services\libproject\google-play-services_lib\ant-build\classes.jar;C:\adt-bundle\sdk\extras\google\google_play_services\libproject\google-play-services_lib\libs\google-play-services.jar
-compile: [javac] Compiling 6 source files to c:\cordova\prueba\platforms\android\ant-build\classes [javac] c:\cordova\prueba\platforms\android\src\com\phonegap\plugins\mapkit\MapKit.java:73: error: exception GooglePlayServicesNotAvailableException is never thrown in body of corresponding try statement [javac] } catch (GooglePlayServicesNotAvailableException e) { [javac] ^ [javac] 1 error
Any idea? Thanks!
I have the same issue as hiniesta..
Hello. I'm just testing your plugin with Cordova 3.1.
I created a sample application by
and added some plugins...
No if I try to build the application I get the following errors:
I installed the latest Android versions and the Google Play services.
Can anyone help setting up this project? Thanks!