Hi,
I have tried to build a testapp like the BasicMapViewer with Eclipse.
The code is only a copy of the BasiscMapViewer from the samples.
As pointed out by Emux in the long Building rescue thread I put mapsforge-core-0.4.0-SNAPSHOT.jar, mapsforge-map-0.4.0-SNAPSHOT.jar, mapsforge-map-android-0.4.0-SNAPSHOT.jar and mapsforge-map-reader-0.4.0-SNAPSHOT.jar in the libs directory. The neccessary resources are in the right place.
I downloaded the jars on 2014-02-19 from the jenkins-server.
Problem: The app compiles fine but it crashed when the mapView is created.
In the old times I used the mapsforge030-with-dependencies.
/**
* @return the layout to be used
*/
protected int getLayoutId() {
return R.layout.mapviewer;
}
protected MapView getMapView() {
// in this example the mapview is defined in the layout file
// mapviewer.xml
setContentView(getLayoutId());
return (MapView) findViewById(R.id.mapView);
}
03-04 22:34:43.244: E/AndroidRuntime(5222): Caused by: android.view.InflateException: Binary XML file line #4: Error inflating class org.mapsforge.map.android.view.MapView
03-04 22:34:43.244: E/AndroidRuntime(5222): at android.view.LayoutInflater.createView(LayoutInflater.java:606)
03-04 22:34:43.244: E/AndroidRuntime(5222): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:680)
03-04 22:34:43.244: E/AndroidRuntime(5222): at android.view.LayoutInflater.rInflate(LayoutInflater.java:739)
03-04 22:34:43.244: E/AndroidRuntime(5222): at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
03-04 22:34:43.244: E/AndroidRuntime(5222): at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
03-04 22:34:43.244: E/AndroidRuntime(5222): at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
03-04 22:34:43.244: E/AndroidRuntime(5222): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:273)
03-04 22:34:43.244: E/AndroidRuntime(5222): at android.app.Activity.setContentView(Activity.java:1835)
03-04 22:34:43.244: E/AndroidRuntime(5222): at org.openseamap.oseamandroidviewer.BasicMapViewer.getMapView(BasicMapViewer.java:221)
and a lot of more errors
I wonder, as I build a swingmapviewer app with the appropriate libraries mapsforge-core-0.4.0-SNAPSHOT.jar, mapsforge-map-0.4.0-SNAPSHOT.jar,
mapsforge-map-awt-0.4.0-SNAPSHOT.jar and
mapsforge-map-reader-0.4.0-SNAPSHOT.jar.
This works fine.
any suggestions?
regards
Victor