Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing Build with Cordova 3.1 #18

Closed
sebastianzillessen opened this issue Oct 8, 2013 · 8 comments
Closed

Failing Build with Cordova 3.1 #18

sebastianzillessen opened this issue Oct 8, 2013 · 8 comments

Comments

@sebastianzillessen
Copy link
Contributor

Hello.
I'm just testing your plugin with Cordova 3.1.

I created a sample application by

cordova create Test
cd Test
cordova platforms add android
...

and added some plugins...

cordova plugin add com.phonegap.plugins.mapkit

No if I try to build the application I get the following errors:


[Error: An error occurred while building the android project. Buildfile: /Users/user/Entwicklung/2.0/Test/platforms/android/build.xml

-check-env:
 [checkenv] Android SDK Tools Revision 22.2.1
 [checkenv] Installed at /Users/user/.adt

-setup:
     [echo] Project Name: HelloCordova
  [gettype] Project Type: Application

-pre-clean:

clean:
   [delete] Deleting directory /Users/user/Entwicklung/2.0/Test/platforms/android/bin
   [delete] Deleting directory /Users/user/Entwicklung/2.0/Test/platforms/android/gen
[getlibpath] Library dependencies:
[getlibpath] No Libraries
   [subant] No sub-builds to iterate on

BUILD SUCCESSFUL
Total time: 0 seconds
Buildfile: /Users/user/Entwicklung/2.0/Test/platforms/android/build.xml

-set-mode-check:

-set-debug-files:

-check-env:
 [checkenv] Android SDK Tools Revision 22.2.1
 [checkenv] Installed at /Users/user/.adt

-setup:
     [echo] Project Name: HelloCordova
  [gettype] Project Type: Application

-set-debug-mode:

-debug-obfuscation-check:

-pre-build:

-build-setup:
[getbuildtools] Using latest Build Tools: 18.1.0
     [echo] Resolving Build Target for HelloCordova...
[gettarget] Project Target:   Android 4.2.2
[gettarget] API level:        17
     [echo] ----------
     [echo] Creating output directories if needed...
    [mkdir] Created dir: /Users/user/Entwicklung/2.0/Test/platforms/android/bin
    [mkdir] Created dir: /Users/user/Entwicklung/2.0/Test/platforms/android/bin/res
    [mkdir] Created dir: /Users/user/Entwicklung/2.0/Test/platforms/android/bin/rsObj
    [mkdir] Created dir: /Users/user/Entwicklung/2.0/Test/platforms/android/bin/rsLibs
    [mkdir] Created dir: /Users/user/Entwicklung/2.0/Test/platforms/android/gen
    [mkdir] Created dir: /Users/user/Entwicklung/2.0/Test/platforms/android/bin/classes
    [mkdir] Created dir: /Users/user/Entwicklung/2.0/Test/platforms/android/bin/dexedLibs
     [echo] ----------
     [echo] Resolving Dependencies for HelloCordova...
[dependency] Library dependencies:
[dependency] No Libraries
[dependency] 
[dependency] ------------------
     [echo] ----------
     [echo] Building Libraries with 'debug'...
   [subant] No sub-builds to iterate on

-code-gen:
[mergemanifest] Merging AndroidManifest files into one.
[mergemanifest] Manifest merger disabled. Using project manifest only.
     [echo] Handling aidl files...
     [aidl] No AIDL files to compile.
     [echo] ----------
     [echo] Handling RenderScript files...
     [echo] ----------
     [echo] Handling Resources...
     [aapt] Generating resource IDs...
     [echo] ----------
     [echo] Handling BuildConfig class...
[buildconfig] Generating BuildConfig class.

-pre-compile:

-compile:
    [javac] Compiling 20 source files to /Users/user/Entwicklung/2.0/Test/platforms/android/bin/classes
    [javac] /Users/user/Entwicklung/2.0/Test/platforms/android/src/com/phonegap/plugins/mapkit/MapKit.java:18: package com.google.android.gms.common does not exist
    [javac] import com.google.android.gms.common.ConnectionResult;
    [javac]                                     ^
    [javac] /Users/user/Entwicklung/2.0/Test/platforms/android/src/com/phonegap/plugins/mapkit/MapKit.java:19: package com.google.android.gms.common does not exist
    [javac] import com.google.android.gms.common.GooglePlayServicesUtil;
    [javac]                                     ^
    [javac] /Users/user/Entwicklung/2.0/Test/platforms/android/src/com/phonegap/plugins/mapkit/MapKit.java:20: package com.google.android.gms.common does not exist
    [javac] import com.google.android.gms.common.GooglePlayServicesNotAvailableException;
    [javac]                                     ^
    [javac] /Users/user/Entwicklung/2.0/Test/platforms/android/src/com/phonegap/plugins/mapkit/MapKit.java:21: package com.google.android.gms.maps does not exist
    [javac] import com.google.android.gms.maps.CameraUpdateFactory;
    [javac]                                   ^
    [javac] /Users/user/Entwicklung/2.0/Test/platforms/android/src/com/phonegap/plugins/mapkit/MapKit.java:22: package com.google.android.gms.maps does not exist
    [javac] import com.google.android.gms.maps.GoogleMapOptions;
    [javac]                                   ^
    [javac] /Users/user/Entwicklung/2.0/Test/platforms/android/src/com/phonegap/plugins/mapkit/MapKit.java:23: package com.google.android.gms.maps does not exist
    [javac] import com.google.android.gms.maps.MapView;
    [javac]                                   ^
    [javac] /Users/user/Entwicklung/2.0/Test/platforms/android/src/com/phonegap/plugins/mapkit/MapKit.java:24: package com.google.android.gms.maps does not exist
    [javac] import com.google.android.gms.maps.MapsInitializer;
    [javac]                                   ^
    [javac] /Users/user/Entwicklung/2.0/Test/platforms/android/src/com/phonegap/plugins/mapkit/MapKit.java:25: package com.google.android.gms.maps.model does not exist
    [javac] import com.google.android.gms.maps.model.LatLng;
    [javac]                                         ^
    [javac] /Users/user/Entwicklung/2.0/Test/platforms/android/src/com/phonegap/plugins/mapkit/MapKit.java:26: package com.google.android.gms.maps.model does not exist
    [javac] import com.google.android.gms.maps.model.MarkerOptions;
    [javac]                                         ^
    [javac] /Users/user/Entwicklung/2.0/Test/platforms/android/src/com/phonegap/plugins/mapkit/MapKit.java:27: package com.google.android.gms.maps.model does not exist
    [javac] import com.google.android.gms.maps.model.BitmapDescriptor;
    [javac]                                         ^
    [javac] /Users/user/Entwicklung/2.0/Test/platforms/android/src/com/phonegap/plugins/mapkit/MapKit.java:28: package com.google.android.gms.maps.model does not exist
    [javac] import com.google.android.gms.maps.model.BitmapDescriptorFactory;
    [javac]                                         ^
    [javac] /Users/user/Entwicklung/2.0/Test/platforms/android/src/com/phonegap/plugins/mapkit/MapKit.java:34: cannot find symbol
    [javac] symbol  : class MapView
    [javac] location: class com.phonegap.plugins.mapkit.MapKit
    [javac]     protected MapView mapView;
    [javac]               ^
    [javac] /Users/user/Entwicklung/2.0/Test/platforms/android/src/com/phonegap/plugins/mapkit/MapKit.java:198: cannot find symbol
    [javac] symbol  : class BitmapDescriptor
    [javac] location: class com.phonegap.plugins.mapkit.MapKit
    [javac]     private BitmapDescriptor getBitmapDescriptor( final JSONObject iconOption ) {
    [javac]             ^
    [javac] /Users/user/Entwicklung/2.0/Test/platforms/android/src/com/phonegap/plugins/mapkit/MapKit.java:61: cannot find symbol
    [javac] symbol: variable GooglePlayServicesUtil
    [javac]                     final int resultCode = GooglePlayServicesUtil.isGooglePlayServicesAvailable(cordova.getActivity());
    [javac]                                            ^
    [javac] /Users/user/Entwicklung/2.0/Test/platforms/android/src/com/phonegap/plugins/mapkit/MapKit.java:62: cannot find symbol
    [javac] symbol: variable ConnectionResult
    [javac]                     if (resultCode == ConnectionResult.SUCCESS) {
    [javac]                                       ^
    [javac] /Users/user/Entwicklung/2.0/Test/platforms/android/src/com/phonegap/plugins/mapkit/MapKit.java:63: cannot find symbol
    [javac] symbol: class MapView
    [javac]                         mapView = new MapView(cordova.getActivity(),
    [javac]                                       ^
    [javac] /Users/user/Entwicklung/2.0/Test/platforms/android/src/com/phonegap/plugins/mapkit/MapKit.java:64: cannot find symbol
    [javac] symbol: class GoogleMapOptions
    [javac]                                 new GoogleMapOptions());
    [javac]                                     ^
    [javac] /Users/user/Entwicklung/2.0/Test/platforms/android/src/com/phonegap/plugins/mapkit/MapKit.java:72: cannot find symbol
    [javac] symbol: variable MapsInitializer
    [javac]                             MapsInitializer.initialize(cordova.getActivity());
    [javac]                             ^
    [javac] /Users/user/Entwicklung/2.0/Test/platforms/android/src/com/phonegap/plugins/mapkit/MapKit.java:73: cannot find symbol
    [javac] symbol: class GooglePlayServicesNotAvailableException
    [javac]                         } catch (GooglePlayServicesNotAvailableException e) {
    [javac]                                  ^
    [javac] /Users/user/Entwicklung/2.0/Test/platforms/android/src/com/phonegap/plugins/mapkit/MapKit.java:97: cannot find symbol
    [javac] symbol: class LatLng
    [javac]                                 CameraUpdateFactory.newLatLngZoom(new LatLng(
    [javac]                                                                       ^
    [javac] /Users/user/Entwicklung/2.0/Test/platforms/android/src/com/phonegap/plugins/mapkit/MapKit.java:97: cannot find symbol
    [javac] symbol: variable CameraUpdateFactory
    [javac]                                 CameraUpdateFactory.newLatLngZoom(new LatLng(
    [javac]                                 ^
    [javac] /Users/user/Entwicklung/2.0/Test/platforms/android/src/com/phonegap/plugins/mapkit/MapKit.java:101: cannot find symbol
    [javac] symbol: variable ConnectionResult
    [javac]                     } else if (resultCode == ConnectionResult.SERVICE_MISSING ||
    [javac]                                              ^
    [javac] /Users/user/Entwicklung/2.0/Test/platforms/android/src/com/phonegap/plugins/mapkit/MapKit.java:102: cannot find symbol
    [javac] symbol: variable ConnectionResult
    [javac]                                resultCode == ConnectionResult.SERVICE_VERSION_UPDATE_REQUIRED ||
    [javac]                                              ^
    [javac] /Users/user/Entwicklung/2.0/Test/platforms/android/src/com/phonegap/plugins/mapkit/MapKit.java:103: cannot find symbol
    [javac] symbol: variable ConnectionResult
    [javac]                                resultCode == ConnectionResult.SERVICE_DISABLED) {
    [javac]                                              ^
    [javac] /Users/user/Entwicklung/2.0/Test/platforms/android/src/com/phonegap/plugins/mapkit/MapKit.java:104: cannot find symbol
    [javac] symbol: variable GooglePlayServicesUtil
    [javac]                         Dialog dialog = GooglePlayServicesUtil.getErrorDialog(resultCode, cordova.getActivity(), 1,
    [javac]                                         ^
    [javac] /Users/user/Entwicklung/2.0/Test/platforms/android/src/com/phonegap/plugins/mapkit/MapKit.java:158: cannot find symbol
    [javac] symbol: class MarkerOptions
    [javac]                                 MarkerOptions mOptions = new MarkerOptions();
    [javac]                                 ^
    [javac] /Users/user/Entwicklung/2.0/Test/platforms/android/src/com/phonegap/plugins/mapkit/MapKit.java:158: cannot find symbol
    [javac] symbol: class MarkerOptions
    [javac]                                 MarkerOptions mOptions = new MarkerOptions();
    [javac]                                                              ^
    [javac] /Users/user/Entwicklung/2.0/Test/platforms/android/src/com/phonegap/plugins/mapkit/MapKit.java:160: cannot find symbol
    [javac] symbol: class LatLng
    [javac]                                 mOptions.position(new LatLng(latitude,
    [javac]                                                       ^
    [javac] /Users/user/Entwicklung/2.0/Test/platforms/android/src/com/phonegap/plugins/mapkit/MapKit.java:169: cannot find symbol
    [javac] symbol: class BitmapDescriptor
    [javac]                                     BitmapDescriptor bDesc = getBitmapDescriptor(options);
    [javac]                                     ^
    [javac] /Users/user/Entwicklung/2.0/Test/platforms/android/src/com/phonegap/plugins/mapkit/MapKit.java:208: cannot find symbol
    [javac] symbol  : variable BitmapDescriptorFactory
    [javac] location: class com.phonegap.plugins.mapkit.MapKit
    [javac]                         return BitmapDescriptorFactory.fromAsset(resource);
    [javac]                                ^
    [javac] /Users/user/Entwicklung/2.0/Test/platforms/android/src/com/phonegap/plugins/mapkit/MapKit.java:213: cannot find symbol
    [javac] symbol  : variable BitmapDescriptorFactory
    [javac] location: class com.phonegap.plugins.mapkit.MapKit
    [javac]                 return BitmapDescriptorFactory.defaultMarker(Float.parseFloat(o.toString()));
    [javac]                        ^
    [javac] 31 errors

BUILD FAILED
/Users/user/.adt/tools/ant/build.xml:720: The following error occurred while executing this line:
/Users/user/.adt/tools/ant/build.xml:734: Compile failed; see the compiler error output for details.

Total time: 2 seconds
ERROR: Failed to build android project.
Buildfile: /Users/user/Entwicklung/2.0/Test/platforms/android/build.xml

-set-mode-check:

-set-debug-files:

-check-env:
 [checkenv] Android SDK Tools Revision 22.2.1
 [checkenv] Installed at /Users/user/.adt

-setup:
     [echo] Project Name: HelloCordova
  [gettype] Project Type: Application

-set-debug-mode:

-debug-obfuscation-check:

-pre-build:

-build-setup:
[getbuildtools] Using latest Build Tools: 18.1.0
     [echo] Resolving Build Target for HelloCordova...
[gettarget] Project Target:   Android 4.2.2
[gettarget] API level:        17
     [echo] ----------
     [echo] Creating output directories if needed...
    [mkdir] Created dir: /Users/user/Entwicklung/2.0/Test/platforms/android/bin
    [mkdir] Created dir: /Users/user/Entwicklung/2.0/Test/platforms/android/bin/res
    [mkdir] Created dir: /Users/user/Entwicklung/2.0/Test/platforms/android/bin/rsObj
    [mkdir] Created dir: /Users/user/Entwicklung/2.0/Test/platforms/android/bin/rsLibs
    [mkdir] Created dir: /Users/user/Entwicklung/2.0/Test/platforms/android/gen
    [mkdir] Created dir: /Users/user/Entwicklung/2.0/Test/platforms/android/bin/classes
    [mkdir] Created dir: /Users/user/Entwicklung/2.0/Test/platforms/android/bin/dexedLibs
     [echo] ----------
     [echo] Resolving Dependencies for HelloCordova...
[dependency] Library dependencies:
[dependency] No Libraries
[dependency] 
[dependency] ------------------
     [echo] ----------
     [echo] Building Libraries with 'debug'...
   [subant] No sub-builds to iterate on

-code-gen:
[mergemanifest] Merging AndroidManifest files into one.
[mergemanifest] Manifest merger disabled. Using project manifest only.
     [echo] Handling aidl files...
     [aidl] No AIDL files to compile.
     [echo] ----------
     [echo] Handling RenderScript files...
     [echo] ----------
     [echo] Handling Resources...
     [aapt] Generating resource IDs...
     [echo] ----------
     [echo] Handling BuildConfig class...
[buildconfig] Generating BuildConfig class.

-pre-compile:

-compile:
    [javac] Compiling 20 source files to /Users/user/Entwicklung/2.0/Test/platforms/android/bin/classes
    [javac] /Users/user/Entwicklung/2.0/Test/platforms/android/src/com/phonegap/plugins/mapkit/MapKit.java:18: package com.google.android.gms.common does not exist
    [javac] import com.google.android.gms.common.ConnectionResult;
    [javac]                                     ^
    [javac] /Users/user/Entwicklung/2.0/Test/platforms/android/src/com/phonegap/plugins/mapkit/MapKit.java:19: package com.google.android.gms.common does not exist
    [javac] import com.google.android.gms.common.GooglePlayServicesUtil;
    [javac]                                     ^
    [javac] /Users/user/Entwicklung/2.0/Test/platforms/android/src/com/phonegap/plugins/mapkit/MapKit.java:20: package com.google.android.gms.common does not exist
    [javac] import com.google.android.gms.common.GooglePlayServicesNotAvailableException;
    [javac]                                     ^
    [javac] /Users/user/Entwicklung/2.0/Test/platforms/android/src/com/phonegap/plugins/mapkit/MapKit.java:21: package com.google.android.gms.maps does not exist
    [javac] import com.google.android.gms.maps.CameraUpdateFactory;
    [javac]                                   ^
    [javac] /Users/user/Entwicklung/2.0/Test/platforms/android/src/com/phonegap/plugins/mapkit/MapKit.java:22: package com.google.android.gms.maps does not exist
    [javac] import com.google.android.gms.maps.GoogleMapOptions;
    [javac]                                   ^
    [javac] /Users/user/Entwicklung/2.0/Test/platforms/android/src/com/phonegap/plugins/mapkit/MapKit.java:23: package com.google.android.gms.maps does not exist
    [javac] import com.google.android.gms.maps.MapView;
    [javac]                                   ^
    [javac] /Users/user/Entwicklung/2.0/Test/platforms/android/src/com/phonegap/plugins/mapkit/MapKit.java:24: package com.google.android.gms.maps does not exist
    [javac] import com.google.android.gms.maps.MapsInitializer;
    [javac]                                   ^
    [javac] /Users/user/Entwicklung/2.0/Test/platforms/android/src/com/phonegap/plugins/mapkit/MapKit.java:25: package com.google.android.gms.maps.model does not exist
    [javac] import com.google.android.gms.maps.model.LatLng;
    [javac]                                         ^
    [javac] /Users/user/Entwicklung/2.0/Test/platforms/android/src/com/phonegap/plugins/mapkit/MapKit.java:26: package com.google.android.gms.maps.model does not exist
    [javac] import com.google.android.gms.maps.model.MarkerOptions;
    [javac]                                         ^
    [javac] /Users/user/Entwicklung/2.0/Test/platforms/android/src/com/phonegap/plugins/mapkit/MapKit.java:27: package com.google.android.gms.maps.model does not exist
    [javac] import com.google.android.gms.maps.model.BitmapDescriptor;
    [javac]                                         ^
    [javac] /Users/user/Entwicklung/2.0/Test/platforms/android/src/com/phonegap/plugins/mapkit/MapKit.java:28: package com.google.android.gms.maps.model does not exist
    [javac] import com.google.android.gms.maps.model.BitmapDescriptorFactory;
    [javac]                                         ^
    [javac] /Users/user/Entwicklung/2.0/Test/platforms/android/src/com/phonegap/plugins/mapkit/MapKit.java:34: cannot find symbol
    [javac] symbol  : class MapView
    [javac] location: class com.phonegap.plugins.mapkit.MapKit
    [javac]     protected MapView mapView;
    [javac]               ^
    [javac] /Users/user/Entwicklung/2.0/Test/platforms/android/src/com/phonegap/plugins/mapkit/MapKit.java:198: cannot find symbol
    [javac] symbol  : class BitmapDescriptor
    [javac] location: class com.phonegap.plugins.mapkit.MapKit
    [javac]     private BitmapDescriptor getBitmapDescriptor( final JSONObject iconOption ) {
    [javac]             ^
    [javac] /Users/user/Entwicklung/2.0/Test/platforms/android/src/com/phonegap/plugins/mapkit/MapKit.java:61: cannot find symbol
    [javac] symbol: variable GooglePlayServicesUtil
    [javac]                     final int resultCode = GooglePlayServicesUtil.isGooglePlayServicesAvailable(cordova.getActivity());
    [javac]                                            ^
    [javac] /Users/user/Entwicklung/2.0/Test/platforms/android/src/com/phonegap/plugins/mapkit/MapKit.java:62: cannot find symbol
    [javac] symbol: variable ConnectionResult
    [javac]                     if (resultCode == ConnectionResult.SUCCESS) {
    [javac]                                       ^
    [javac] /Users/user/Entwicklung/2.0/Test/platforms/android/src/com/phonegap/plugins/mapkit/MapKit.java:63: cannot find symbol
    [javac] symbol: class MapView
    [javac]                         mapView = new MapView(cordova.getActivity(),
    [javac]                                       ^
    [javac] /Users/user/Entwicklung/2.0/Test/platforms/android/src/com/phonegap/plugins/mapkit/MapKit.java:64: cannot find symbol
    [javac] symbol: class GoogleMapOptions
    [javac]                                 new GoogleMapOptions());
    [javac]                                     ^
    [javac] /Users/user/Entwicklung/2.0/Test/platforms/android/src/com/phonegap/plugins/mapkit/MapKit.java:72: cannot find symbol
    [javac] symbol: variable MapsInitializer
    [javac]                             MapsInitializer.initialize(cordova.getActivity());
    [javac]                             ^
    [javac] /Users/user/Entwicklung/2.0/Test/platforms/android/src/com/phonegap/plugins/mapkit/MapKit.java:73: cannot find symbol
    [javac] symbol: class GooglePlayServicesNotAvailableException
    [javac]                         } catch (GooglePlayServicesNotAvailableException e) {
    [javac]                                  ^
    [javac] /Users/user/Entwicklung/2.0/Test/platforms/android/src/com/phonegap/plugins/mapkit/MapKit.java:97: cannot find symbol
    [javac] symbol: class LatLng
    [javac]                                 CameraUpdateFactory.newLatLngZoom(new LatLng(
    [javac]                                                                       ^
    [javac] /Users/user/Entwicklung/2.0/Test/platforms/android/src/com/phonegap/plugins/mapkit/MapKit.java:97: cannot find symbol
    [javac] symbol: variable CameraUpdateFactory
    [javac]                                 CameraUpdateFactory.newLatLngZoom(new LatLng(
    [javac]                                 ^
    [javac] /Users/user/Entwicklung/2.0/Test/platforms/android/src/com/phonegap/plugins/mapkit/MapKit.java:101: cannot find symbol
    [javac] symbol: variable ConnectionResult
    [javac]                     } else if (resultCode == ConnectionResult.SERVICE_MISSING ||
    [javac]                                              ^
    [javac] /Users/user/Entwicklung/2.0/Test/platforms/android/src/com/phonegap/plugins/mapkit/MapKit.java:102: cannot find symbol
    [javac] symbol: variable ConnectionResult
    [javac]                                resultCode == ConnectionResult.SERVICE_VERSION_UPDATE_REQUIRED ||
    [javac]                                              ^
    [javac] /Users/user/Entwicklung/2.0/Test/platforms/android/src/com/phonegap/plugins/mapkit/MapKit.java:103: cannot find symbol
    [javac] symbol: variable ConnectionResult
    [javac]                                resultCode == ConnectionResult.SERVICE_DISABLED) {
    [javac]                                              ^
    [javac] /Users/user/Entwicklung/2.0/Test/platforms/android/src/com/phonegap/plugins/mapkit/MapKit.java:104: cannot find symbol
    [javac] symbol: variable GooglePlayServicesUtil
    [javac]                         Dialog dialog = GooglePlayServicesUtil.getErrorDialog(resultCode, cordova.getActivity(), 1,
    [javac]                                         ^
    [javac] /Users/user/Entwicklung/2.0/Test/platforms/android/src/com/phonegap/plugins/mapkit/MapKit.java:158: cannot find symbol
    [javac] symbol: class MarkerOptions
    [javac]                                 MarkerOptions mOptions = new MarkerOptions();
    [javac]                                 ^
    [javac] /Users/user/Entwicklung/2.0/Test/platforms/android/src/com/phonegap/plugins/mapkit/MapKit.java:158: cannot find symbol
    [javac] symbol: class MarkerOptions
    [javac]                                 MarkerOptions mOptions = new MarkerOptions();
    [javac]                                                              ^
    [javac] /Users/user/Entwicklung/2.0/Test/platforms/android/src/com/phonegap/plugins/mapkit/MapKit.java:160: cannot find symbol
    [javac] symbol: class LatLng
    [javac]                                 mOptions.position(new LatLng(latitude,
    [javac]                                                       ^
    [javac] /Users/user/Entwicklung/2.0/Test/platforms/android/src/com/phonegap/plugins/mapkit/MapKit.java:169: cannot find symbol
    [javac] symbol: class BitmapDescriptor
    [javac]                                     BitmapDescriptor bDesc = getBitmapDescriptor(options);
    [javac]                                     ^
    [javac] /Users/user/Entwicklung/2.0/Test/platforms/android/src/com/phonegap/plugins/mapkit/MapKit.java:208: cannot find symbol
    [javac] symbol  : variable BitmapDescriptorFactory
    [javac] location: class com.phonegap.plugins.mapkit.MapKit
    [javac]                         return BitmapDescriptorFactory.fromAsset(resource);
    [javac]                                ^
    [javac] /Users/user/Entwicklung/2.0/Test/platforms/android/src/com/phonegap/plugins/mapkit/MapKit.java:213: cannot find symbol
    [javac] symbol  : variable BitmapDescriptorFactory
    [javac] location: class com.phonegap.plugins.mapkit.MapKit
    [javac]                 return BitmapDescriptorFactory.defaultMarker(Float.parseFloat(o.toString()));
    [javac]                        ^
    [javac] 31 errors

BUILD FAILED
/Users/user/.adt/tools/ant/build.xml:720: The following error occurred while executing this line:
/Users/user/.adt/tools/ant/build.xml:734: Compile failed; see the compiler error output for details.

Total time: 2 seconds

]

I installed the latest Android versions and the Google Play services.

bildschirmfoto 2013-10-08 um 18 45 29

bildschirmfoto 2013-10-08 um 18 45 05

Can anyone help setting up this project?
Thanks!

@imhotep
Copy link
Owner

imhotep commented Oct 8, 2013

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

  • The latest Android SDK and tools
  • Google Play Services installed (use the android command or the Android SDK Manager in ADT/Eclipse).
  • Run 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
  • Run 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 PATH

In 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

@sebastianzillessen
Copy link
Contributor Author

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 #16.

Is there any chance to publish a fix to that?

Thanks a lot @imhotep .

@imhotep
Copy link
Owner

imhotep commented Oct 9, 2013

@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 ?

@sebastianzillessen
Copy link
Contributor Author

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!

@sebastianzillessen
Copy link
Contributor Author

Alright! I managed to fix that all by just adding the MapKit.js file manual into the projects www folder.

@no7dw
Copy link

no7dw commented Jan 2, 2014

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.

@hiniesta
Copy link

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!

@ghaiat
Copy link

ghaiat commented Mar 20, 2014

I have the same issue as hiniesta..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants