문제

이 자습서를 따르십시오 링크 여기에지도 통합. 나는 이와 같은 출력을 얻었고 오류

java.lang.IllegalAccessError : 클래스 Ref 사전 확인 된 클래스 해결 예기치 않은 구현

여기에 이미지 설명

manifest.xml

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.heremap"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk
        android:minSdkVersion="11"
        android:targetSdkVersion="16" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >

<uses-library android:name="com.here.android" android:required="true" />
        <activity
            android:name="com.example.heremap.MainActivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>

        </activity>
        <meta-data android:name="com.here.android.maps.appid"
android:value="XXXXXX"/>
<meta-data android:name="com.here.android.maps.apptoken"
android:value="XXXXXX"/>
    </application>

</manifest>
.

mainactivity.java

    package com.example.heremap;

import android.app.Activity;
import android.os.Bundle;

import com.here.android.mapping.FragmentInitListener;
import com.here.android.mapping.InitError;
import com.here.android.mapping.Map;
import com.here.android.mapping.MapAnimation;
import com.here.android.mapping.MapFactory;
import com.here.android.mapping.MapFragment;

public class MainActivity extends Activity {

    // map embedded in the map fragment
    private Map map = null;

    // map fragment embedded in this activity
    private MapFragment mapFragment = null;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        // Search for the map fragment to finish setup by calling init().
        mapFragment = (MapFragment) getFragmentManager().findFragmentById(
                R.id.mapfragment);
        mapFragment.init(new FragmentInitListener() {
            @Override
            public void onFragmentInitializationCompleted(InitError error) {
                if (error == InitError.NONE) {
                    // retrieve a reference of the map from the map fragment
                    map = mapFragment.getMap();
                    // Set the map center coordinate to the Vancouver region
                    map.setCenter(MapFactory.createGeoCoordinate(49.196261,
                            -123.004773, 0.0), MapAnimation.NONE);
                    // Set the map zoom level to the average between min and max
                    // (with no animation)
                    map.setZoomLevel((map.getMaxZoomLevel() +
                            map.getMinZoomLevel()) / 2);
                } else {
                    System.out.println("ERROR: Cannot initialize Map Fragment");
                }
            }
        });
    }
}
.

activity_main.xml

<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical" >

    <TextView
        android:id="@+id/title"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/hello_world"
        tools:context=".MainActivity" />
<fragment
    class="com.here.android.mapping.MapFragment"
    android:id="@+id/mapfragment"
    android:layout_width="match_parent"
    android:layout_height="match_parent"/>
</LinearLayout>
.

오류 로그 :

 02-26 06:06:47.192: E/AndroidRuntime(808): FATAL EXCEPTION: main 02-26
 06:06:47.192: E/AndroidRuntime(808): java.lang.IllegalAccessError:
 Class ref in pre-verified class resolved to unexpected implementation
 02-26 06:06:47.192: E/AndroidRuntime(808):     at
 com.example.heremap.MainActivity.onCreate(MainActivity.java:27) 02-26
 06:06:47.192: E/AndroidRuntime(808):   at
 android.app.Activity.performCreate(Activity.java:5180) 02-26
 06:06:47.192: E/AndroidRuntime(808):   at
 android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1094)
 02-26 06:06:47.192: E/AndroidRuntime(808):     at
 android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2031)
 02-26 06:06:47.192: E/AndroidRuntime(808):     at
 android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2092)
 02-26 06:06:47.192: E/AndroidRuntime(808):     at
 android.app.ActivityThread.access$600(ActivityThread.java:133) 02-26
 06:06:47.192: E/AndroidRuntime(808):   at
 android.app.ActivityThread$H.handleMessage(ActivityThread.java:1203)
 02-26 06:06:47.192: E/AndroidRuntime(808):     at
 android.os.Handler.dispatchMessage(Handler.java:99) 02-26
 06:06:47.192: E/AndroidRuntime(808):   at
 android.os.Looper.loop(Looper.java:137) 02-26 06:06:47.192:
 E/AndroidRuntime(808):     at
 android.app.ActivityThread.main(ActivityThread.java:4807) 02-26
 06:06:47.192: E/AndroidRuntime(808):   at
 java.lang.reflect.Method.invokeNative(Native Method) 02-26
 06:06:47.192: E/AndroidRuntime(808):   at
 java.lang.reflect.Method.invoke(Method.java:511) 02-26 06:06:47.192:
 E/AndroidRuntime(808):     at
 com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:792)
 02-26 06:06:47.192: E/AndroidRuntime(808):     at
 com.android.internal.os.ZygoteInit.main(ZygoteInit.java:559) 02-26
 06:06:47.192: E/AndroidRuntime(808):   at
 dalvik.system.NativeStart.main(Native Method)
.

주문 및 내보내기 폴더에서 JAR 제거 후 새 오류 및 업데이트 된 로그 결과를 얻는 폴더

02-26 06 : 34 : 09.810 : E / Trace (1266) : 추적 파일 열기 오류 : 아니오 파일 또는 디렉토리 (2) 02-26 06 : 34 : 09.859 : D / BYD_Flex (1266) : GetValue () name= @ nokiaflex @ packageneeddata 02-26 06 : 34 : 09.859 : D / BYD_Flex (1266) : 파일 변형 / cfg / flex.xml 02-26을 찾을 수 없습니다. 06 : 34 : 09.870 : D / BYD_FLEX (1266) : getValue () readflexfromxml= typedValue {t= 0x0 / d= 0x0} 02-26 06 : 34 : 09.870 : D / BYD_Flex (1266) : getValue () name= @ nokiaflex @ setdatausagerminder 02-26 06 : 34 : 09.870 : D / BYD_Flex (1266) : 파일 변형 / cfg / flex.xml 02-26을 찾을 수 없습니다. 06 : 34 : 09.870 : D / BYD_FLEX (1266) : getValue () readflexfromxml= TypedValue {t= 0x0 / d= 0x0} 02-26 06 : 34 : 10.249 : I / Choreographer (1266) : 44 프레임을 건너 뜁니다! 응용 프로그램이 너무 많은 작업을 수행 할 수 있습니다. 주 실. 02-26 06 : 34 : 10.249 : W / TextureView (1266) : TextureView 또는 하위 클래스는 하드웨어 가속 기능을 사용하여 만 사용할 수 있습니다. 02-26. 06 : 34 : 10.459 : I / Choreographer (1266) : 53 프레임을 건너 뜁니다! 그만큼 응용 프로그램은 주 스레드에서 너무 많은 작업을 수행 할 수 있습니다. 02-26. 06 : 34 : 11.679 : I / Choreographer (1266) : 314 프레임을 건너 뜁니다! 그만큼 응용 프로그램은 주 스레드에서 너무 많은 작업을 수행 할 수 있습니다. 02-26. 06 : 34 : 30.191 : I / Choreographer (1266) : 38 프레임을 건너 뜁니다! 그만큼 응용 프로그램은 주 스레드에서 너무 많은 작업을 수행 할 수 있습니다. 02-26. 06 : 34 : 32.183 : I / Choreographer (1266) : 34 프레임을 건너 뜁니다! 그만큼 응용 프로그램은 주 스레드에서 너무 많은 작업을 수행 할 수 있습니다. 02-26. 06 : 35 : 00.068 : I / Choreographer (1266) : 35 프레임을 건너 뜁니다! 그만큼 응용 프로그램은 주 스레드에서 너무 많은 작업을 수행 할 수 있습니다. 02-26. 06 : 35 : 11.672 : I / Choreographer (1266) : 56 프레임을 건너 뜁니다! 그만큼 응용 프로그램은 주 스레드에서 너무 많은 작업을 수행 할 수 있습니다.

도움이 되었습니까?

해결책

안녕하세요 친구 Atlast 오류가 발생하고, errror가 에뮬레이터에 있으면이 config 에뮬레이터를 만들어야합니다.여기에 이미지 설명

라이브러리

에 두 개의 항아리를 추가 한 후

  • com.here.android.sdk.jar
  • com.google.android.maps.sdk.jar

여기에 이미지 설명

와 같이

와 같이 출력 을 얻으십시오.

여기에 이미지 설명

다른 팁

타사 라이브러리 참조로 인해 두 번 추가 되어이 오류가 발생합니다.프로젝트의 빌드 경로에 응용 프로그램 경로를 추가했습니다.따라서 라이브러리 참조가 프로젝트에 자동으로 추가됩니다."탭, 확인을 클릭하고 프로젝트를 청소하고 지금 빌드하십시오. 그것은 작동합니다.

오류

       error opening trace file: No such file or directory (2)
.

Android 가상 장치를 다시 작성하여 SD 카드 크기 (200 MIB를 사용했습니다.)를 사용합니다.

여기에 이미지 설명

일반적으로지도 제어 초기화가 실패 할 때 검은 색 제어를 얻으므로 초기화 완료 기능을 확인하고 오류 코드가 잘못된 것을 나타내는 지 여부를 확인할 수 있습니다. 꽤 종종 정확한 이유를 알려줍니다.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top