2017-08-08 14 views
0

私はmapsforgeで最初のプロジェクトを開始しようとしました。だから私は、その後の変化アプリ/ build.gradleMapsforge InternalRenderTheme Missing Error

dependencies { 
    compile fileTree(dir: 'libs', include: ['*.jar']) 
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { 
     exclude group: 'com.android.support', module: 'support-annotations' 
    }) 
    compile 'com.android.support:appcompat-v7:26.+' 
    compile 'com.android.support.constraint:constraint-layout:1.0.2' 
    testCompile 'junit:junit:4.12' 
    compile 'org.mapsforge:mapsforge-map-android:0.8.0' 
    compile 'com.caverock:androidsvg:1.2.2-beta-1' 
    compile('org.mapsforge:mapsforge-map-android-extras:0.8.0') { 
     transitive = false 
    } 
} 

を、これをした、私はここからコードを取る:Code Example App。 これは、だから、これは私のプロジェクトでのlibを統合しようとした初めてです、私は常にエラーを取得

Error:(16, 37) error: cannot find symbol class InternalRenderTheme

Error:(50, 45) error: cannot find symbol variable InternalRenderTheme

私MainActivity

package kn.com.ff_map; 

import android.os.Bundle; 

import android.app.Activity; 
import android.os.Environment; 

import org.mapsforge.core.model.LatLong; 
import org.mapsforge.map.android.graphics.AndroidGraphicFactory; 
import org.mapsforge.map.android.util.AndroidUtil; 
import org.mapsforge.map.android.view.MapView; 
import org.mapsforge.map.datastore.MapDataStore; 
import org.mapsforge.map.layer.cache.TileCache; 
import org.mapsforge.map.layer.renderer.TileRendererLayer; 
import org.mapsforge.map.reader.MapFile; 
import org.mapsforge.map.rendertheme.InternalRenderTheme; 

import java.io.File; 

public class MainActivity extends Activity { 
    // name of the map file in the external storage 
    private static final String MAP_FILE = "berlin.map"; 

    private MapView mapView; 

    @Override 
    protected void onCreate(Bundle savedInstanceState) { 
     super.onCreate(savedInstanceState); 

     AndroidGraphicFactory.createInstance(this.getApplication()); 

     this.mapView = new MapView(this); 
     setContentView(this.mapView); 

     this.mapView.setClickable(true); 
     this.mapView.getMapScaleBar().setVisible(true); 
     this.mapView.setBuiltInZoomControls(true); 
     this.mapView.setZoomLevelMin((byte) 10); 
     this.mapView.setZoomLevelMax((byte) 20); 

     // create a tile cache of suitable size 
     TileCache tileCache = AndroidUtil.createTileCache(this, "mapcache", 
       mapView.getModel().displayModel.getTileSize(), 1f, 
       this.mapView.getModel().frameBufferModel.getOverdrawFactor()); 

     // tile renderer layer using internal render theme 
     MapDataStore mapDataStore = new MapFile(new File(Environment.getExternalStorageDirectory(), MAP_FILE)); 
     TileRendererLayer tileRendererLayer = new TileRendererLayer(tileCache, mapDataStore, 
       this.mapView.getModel().mapViewPosition, AndroidGraphicFactory.INSTANCE); 
     tileRendererLayer.setXmlRenderTheme(InternalRenderTheme.DEFAULT); 

     // only once a layer is associated with a mapView the rendering starts 
     this.mapView.getLayerManager().getLayers().add(tileRendererLayer); 

     this.mapView.setCenter(new LatLong(52.517037, 13.38886)); 
     this.mapView.setZoomLevel((byte) 12); 
    } 

    @Override 
    protected void onDestroy() { 
     this.mapView.destroyAll(); 
     AndroidGraphicFactory.clearResourceMemoryCache(); 
     super.onDestroy(); 
    } 
} 

です。私はこれを行うだけです。私は何もダウンロードせず、レポから何もコピーしませんでした。 mapforgeをダウンロードする必要がありますか、このエラーの意味ですか?

答えて

1

私の決断は、アプリをbuild.gragleに追加され

compile 'org.mapsforge:mapsforge-themes:0.8.0' 
関連する問題