2021-06-22 22:09:42.370 27127-27127/com.example.road E/MapViewLocationManager: init failed
2021-06-22 22:09:42.382 27127-27127/com.example.road D/AndroidRuntime: Shutting down VM
2021-06-22 22:09:42.387 27127-27127/com.example.road E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.road, PID: 27127
로그챗에 이런 오류가 발생했다고 뜨고 자동으로 앱이 중지되는데 이유를 모르겠어요… 어디가 문제 인가요?
[MainActivity.java]
mygps_btn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(MainActivity.this , Mygps.class);
startActivity(intent); // 액티비티 gps로 이동
}
[Mygps.java]
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_mygps);
MapView mapView = new MapView(this);
ViewGroup mapViewContainer = (ViewGroup) findViewById(R.id.map_view);
mapViewContainer.addView(mapView);
}
[androidManifest.xml]
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<meta-data
android:name="com.kakao.sdk.AppKey"
android:value="xxxxxxxxxxxxxxxxxxxxxxxx" />
[build.gradle(app)]
dependencies {
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'com.google.android.material:material:1.3.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation files('\jniLibs\\libDaumMapAndroid.jar')
testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
}