【发布时间】:2019-06-11 09:34:45
【问题描述】:
//calling Activity written in kotlin but activity is
//not started and giving below-mentioned exception
异常:android.content.ActivityNotFoundException: 找不到明确的活动类 com.myApp.personal/com.myApp.personal.camera.CameraActivityKt 您是否在 AndroidManifest.xml 中声明了此活动?
//while Registered in manifest file:
<activity
android:name=
".camera.CameraActivity"android:screenOrientation="fullSensor"/>
try{
File f = setUpPhotoFile(prefixString); mCurrentPhotoPath =
f.getAbsolutePath();
Intent intent = new Intent(this, CameraActivityKt.class);
intent.putExtra(IConstant.PATH, mCurrentPhotoPath);
startActivityForResult(intent, actionCode);
}
catch(Exception ex) {
e.printStackTrace();
}
【问题讨论】:
-
可以添加清单吗?您是否在清单中添加了此活动?
-
@VedprakashWagh 不工作已经尝试过您添加的链接
-
清单活动是
CameraActivity。关于CameraActivityKt的例外情况@
标签: android kotlin android-manifest android-fragmentactivity androidx