- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在使用 KeyGenParameterSpec 来定义我的 key 规范。当我运行应用程序时,我在日志中收到以下错误:
Caused by: java.lang.ClassNotFoundException: Didn't find class "android.security.keystore.KeyGenParameterSpec$Builder" on path: DexPathList[[zip file "/data/app/com.rsa.mobile.transactionsigningsdk-1/base.apk"],nativeLibraryDirectories=[/vendor/lib64, /system/lib64]]
package com.rsa.mobile.transactionsigningsdk;
import android.os.Bundle;
import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.Snackbar;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.util.Log;
import android.view.View;
import android.view.Menu;
import android.view.MenuItem;
import com.rsa.mobile.transactionsigningsdk.enrollment.DeviceEnrollmentHelper;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
Log.i("Testing message", "App started");
DeviceEnrollmentHelper deh =new DeviceEnrollmentHelper();
deh.enroll();
Log.i("Testing message", "Job Done");
FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
fab.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)
.setAction("Action", null).show();
}
});
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.menu_main, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();
//noinspection SimplifiableIfStatement
if (id == R.id.action_settings) {
return true;
}
return super.onOptionsItemSelected(item);
}
public DeviceEnrollmentResponse enroll() {
if(isEnrolled()) {
return new DeviceEnrollmentResponse(null,StatusReasonCode.DEVICE_ALREADY_ENROLLED);
}
else{
try {
KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance(
"RSA", "AndroidKeyStore");
/*KeyPairGeneratorSpec spec = new KeyPairGeneratorSpec.Builder(android.content.Context this)
.setAlias("trsdk")
.setSubject(new X500Principal("CN=Sample Name, O=Android Authority"))
.setSerialNumber(BigInteger.ONE)
.setKeySize(KEY_SIZE)
.build();*/
keyPairGenerator.initialize(
new KeyGenParameterSpec.Builder(
"trsdk",
KeyProperties.PURPOSE_SIGN)
.setAlgorithmParameterSpec(new ECGenParameterSpec("secp256r1"))
.setDigests(KeyProperties.DIGEST_SHA256,
KeyProperties.DIGEST_SHA384,
KeyProperties.DIGEST_SHA512)
.setUserAuthenticationRequired(true)
.build());
KeyPair keyPair = keyPairGenerator.generateKeyPair();
//Get the public key from the KeyPair
PublicKey pk=keyPair.getPublic();
//remove
Log.i("Testing Message","Inside Enroll()");
Log.i("Testing Message", String.valueOf(pk));
//To Ask
if (pk==null){
return new DeviceEnrollmentResponse(null, StatusReasonCode.UNKNOWN_ERR);
}
else{
return new DeviceEnrollmentResponse(pk, StatusReasonCode.DEVICE_SUCCESSFULLY_ENROLLED);
}
} catch (InvalidAlgorithmParameterException e) {
e.printStackTrace();
} catch (NoSuchAlgorithmException e) {
e.printStackTrace();
} catch (NoSuchProviderException e) {
e.printStackTrace();
}
}
//To Ask
return null;
}
<?xml version="1.0" encoding="utf-8"?>
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme" >
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:theme="@style/AppTheme.NoActionBar" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
apply plugin: 'com.android.application'
android { compileSdkVersion 23 buildToolsVersion "23.0.2"
defaultConfig {
applicationId "com.rsa.mobile.transactionsigningsdk"
minSdkVersion 14
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
} }dependencies {
compile ('com.thoughtworks.xstream:xstream:1.4.7'){
exclude group: 'xmlpull'
}
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.0'
compile 'com.android.support:design:23.1.0' }
11-24 11:07:52.485 27882-27882/? E/AndroidRuntime: Process: com.rsa.mobile.transactionsigningsdk, PID: 27882 11-24 11:07:52.485 27882-27882/? E/AndroidRuntime: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/security/keystore/KeyGenParameterSpec$Builder; 11-24 11:07:52.485 27882-27882/? E/AndroidRuntime: at com.rsa.mobile.transactionsigningsdk.enrollment.DeviceEnrollmentHelper.enroll(DeviceEnrollmentHelper.java:82) 11-24 11:07:52.485 27882-27882/? E/AndroidRuntime: at com.rsa.mobile.transactionsigningsdk.MainActivity.onCreate(MainActivity.java:27) 11-24 11:07:52.485 27882-27882/? E/AndroidRuntime: at android.app.Activity.performCreate(Activity.java:6088) 11-24 11:07:52.485 27882-27882/? E/AndroidRuntime: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106) 11-24 11:07:52.485 27882-27882/? E/AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2307) 11-24 11:07:52.485 27882-27882/? E/AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2416) 11-24 11:07:52.485 27882-27882/? E/AndroidRuntime: at android.app.ActivityThread.access$900(ActivityThread.java:154) 11-24 11:07:52.485 27882-27882/? E/AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1322) 11-24 11:07:52.485 27882-27882/? E/AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102) 11-24 11:07:52.485 27882-27882/? E/AndroidRuntime: at android.os.Looper.loop(Looper.java:135) 11-24 11:07:52.485 27882-27882/? E/AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5290) 11-24 11:07:52.485 27882-27882/? E/AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method) 11-24 11:07:52.485 27882-27882/? E/AndroidRuntime: at java.lang.reflect.Method.invoke(Method.java:372) 11-24 11:07:52.485 27882-27882/? E/AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904) 11-24 11:07:52.485 27882-27882/? E/AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:699) 11-24 11:07:52.485 27882-27882/? E/AndroidRuntime: Caused by: java.lang.ClassNotFoundException: Didn't find class "android.security.keystore.KeyGenParameterSpec$Builder" on path: DexPathList[[zip file "/data/app/com.rsa.mobile.transactionsigningsdk-1/base.apk"],nativeLibraryDirectories=[/vendor/lib64, /system/lib64]] 11-24 11:07:52.485 27882-27882/? E/AndroidRuntime:
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56) 11-24 11:07:52.485 27882-27882/? E/AndroidRuntime: at java.lang.ClassLoader.loadClass(ClassLoader.java:511) 11-24 11:07:52.485 27882-27882/? E/AndroidRuntime: at java.lang.ClassLoader.loadClass(ClassLoader.java:469) 11-24 11:07:52.485 27882-27882/? E/AndroidRuntime: at com.rsa.mobile.transactionsigningsdk.enrollment.DeviceEnrollmentHelper.enroll(DeviceEnrollmentHelper.java:82) 11-24 11:07:52.485 27882-27882/? E/AndroidRuntime: at com.rsa.mobile.transactionsigningsdk.MainActivity.onCreate(MainActivity.java:27) 11-24 11:07:52.485 27882-27882/? E/AndroidRuntime: at android.app.Activity.performCreate(Activity.java:6088) 11-24 11:07:52.485 27882-27882/? E/AndroidRuntime: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106) 11-24 11:07:52.485 27882-27882/? E/AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2307) 11-24 11:07:52.485 27882-27882/? E/AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2416) 11-24 11:07:52.485 27882-27882/? E/AndroidRuntime: at android.app.ActivityThread.access$900(ActivityThread.java:154) 11-24 11:07:52.485 27882-27882/? E/AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1322) 11-24 11:07:52.485 27882-27882/? E/AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102) 11-24 11:07:52.485 27882-27882/? E/AndroidRuntime: at android.os.Looper.loop(Looper.java:135) 11-24 11:07:52.485 27882-27882/? E/AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5290) 11-24 11:07:52.485 27882-27882/? E/AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method) 11-24 11:07:52.485 27882-27882/? E/AndroidRuntime: at java.lang.reflect.Method.invoke(Method.java:372) 11-24 11:07:52.485 27882-27882/? E/AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904) 11-24 11:07:52.485 27882-27882/? E/AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:699) 11-24 11:07:52.485 27882-27882/? E/AndroidRuntime: Suppressed: java.lang.ClassNotFoundException: android.security.keystore.KeyGenParameterSpec$Builder 11-24 11:07:52.485 27882-27882/? E/AndroidRuntime: at java.lang.Class.classForName(Native Method) 11-24 11:07:52.485 27882-27882/? E/AndroidRuntime: at java.lang.BootClassLoader.findClass(ClassLoader.java:781) 11-24 11:07:52.485 27882-27882/? E/AndroidRuntime: at java.lang.BootClassLoader.loadClass(ClassLoader.java:841) 11-24 11:07:52.485 27882-27882/? E/AndroidRuntime: at java.lang.ClassLoader.loadClass(ClassLoader.java:504) 11-24 11:07:52.485 27882-27882/? E/AndroidRuntime: ... 16 more 11-24 11:07:52.485 27882-27882/? E/AndroidRuntime: Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available 11-24 11:07:52.485 32736-32736/? D/AsyncTaskServiceImpl: Submit a task: k 11-24 11:07:52.487 27882-27882/? D/AppTracker: App Event: crash 11-24 11:07:52.487 1092-22412/? W/ActivityManager: getRunningAppProcesses: caller 10156 does not hold REAL_GET_TASKS; limiting output 11-24 11:07:52.489 1092-10061/? W/ActivityManager: getRunningAppProcesses: caller 10156 does not hold REAL_GET_TASKS; limiting output 11-24 11:07:52.490 32736-27837/? D/k: Processing package: com.rsa.mobile.transactionsigningsdk 11-24 11:07:52.490 32736-32736/? D/ChimeraCfgMgr: Loading module com.google.android.gms.vision from APK com.google.android.gms 11-24 11:07:52.492 1092-4065/? D/WifiService: Client connection lost with reason: 4 11-24 11:07:52.503 1092-4736/? W/ActivityManager: Force finishing activity 1 com.rsa.mobile.transactionsigningsdk/.MainActivity 11-24 11:07:52.505 13111-13111/? E/NetworkScheduler.SchedulerReceiver: Invalid parameter app 11-24 11:07:52.505 13111-13111/? E/NetworkScheduler.SchedulerReceiver: Invalid package name : Perhaps you didn't include a PendingIntent in the extras? 11-24 11:07:52.520 1092-27935/? D/DropBoxManagerService: file :: /data/system/dropbox/data_app_crash@1448343472518.txt 11-24 11:07:52.535 1092-1169/? W/ActivityManager: Dismiss app error dialog : com.rsa.mobile.transactionsigningsdk 11-24 11:07:52.537 27882-27882/? I/Process: Sending signal. PID: 27882 SIG: 9 11-24 11:07:52.549 32736-27837/? D/GassUtils: Found app info for package com.rsa.mobile.transactionsigningsdk:1. Hash: b6b6c7a4a5de3ea7df9c51284188b1040033e02a491ec95fee9371f7817bc00c 11-24 11:07:52.549 32736-27837/? D/k: Found info for package com.rsa.mobile.transactionsigningsdk in db. 11-24 11:07:52.562 1092-10061/? I/ActivityManager: Start proc 27936:com.yatra.base/u0a143 for broadcast com.yatra.base/com.moe.pushlibrary.AppUpdateReceiver 11-24 11:07:52.562 367-367/? E/lowmemorykiller: Error writing /proc/27882/oom_score_adj; errno=22 11-24 11:07:52.581 1092-22411/? I/ActivityManager: Process com.rsa.mobile.transactionsigningsdk (pid 27882) has died 11-24 11:07:52.582 1092-1163/? V/ActivityManager: killProcessGroupAsync took 0 ms for PID 27882 on thread 16 11-24 11:07:52.587 27936-27936/? W/ResourcesManager: Asset path '/system/framework/com.google.android.maps.jar' does not exist or contains no resources. 11-24 11:07:52.601 27936-27936/? I/MultiDex: VM with version 2.1.0 has multidex support 11-24 11:07:52.601 27936-27936/? I/MultiDex: install 11-24 11:07:52.601 27936-27936/? I/MultiDex: VM has multidex support, MultiDex support library is disabled. 11-24 11:07:52.601 27936-27936/? I/MultiDex: install 11-24 11:07:52.601 27936-27936/? I/MultiDex: VM has multidex support, MultiDex support library is disabled. 11-24 11:07:52.614 27936-27936/? D/MoEngage_v510: MoEController:Context is null cannot bind service now. 11-24 11:07:52.616 1092-1181/? W/WindowManager: Failed looking up window 11-24 11:07:52.616 1092-1181/? W/WindowManager: java.lang.IllegalArgumentException: Requested window android.view.ViewRootImpl$W@35e88e7 does not exist 11-24 11:07:52.616 1092-1181/? W/WindowManager: at com.android.server.wm.WindowManagerService.windowForClientLocked(WindowManagerService.java:8708) 11-24 11:07:52.616 1092-1181/? W/WindowManager: at com.android.server.wm.WindowManagerService.windowForClientLocked(WindowManagerService.java:8699) 11-24 11:07:52.616 1092-1181/? W/WindowManager: at com.android.server.wm.WindowManagerService.removeWindow(WindowManagerService.java:2620) 11-24 11:07:52.616 1092-1181/? W/WindowManager: at com.android.server.wm.Session.remove(Session.java:187) 11-24 11:07:52.616 1092-1181/? W/WindowManager: at android.view.ViewRootImpl.dispatchDetachedFromWindow(ViewRootImpl.java:3015) 11-24 11:07:52.616 1092-1181/? W/WindowManager: at android.view.ViewRootImpl.doDie(ViewRootImpl.java:5502) 11-24 11:07:52.616 1092-1181/? W/WindowManager: at android.view.ViewRootImpl$ViewRootHandler.handleMessage(ViewRootImpl.java:3321) 11-24 11:07:52.616 1092-1181/? W/WindowManager: at android.os.Handler.dispatchMessage(Handler.java:102) 11-24 11:07:52.616 1092-1181/? W/WindowManager: at android.os.Looper.loop(Looper.java:135) 11-24 11:07:52.616 1092-1181/? W/WindowManager: at android.os.HandlerThread.run(HandlerThread.java:61) 11-24 11:07:52.616 1092-1181/? W/WindowManager: at com.android.server.ServiceThread.run(ServiceThread.java:46) 11-24 11:07:52.618 27936-27936/? I/MoEngage_v510: MoEUtils: SDK initialized. MoEngage SDK version: 510 11-24 11:07:52.618 1092-22411/? W/InputMethodManagerService: Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@34f79c48 attribute=null, token = android.os.BinderProxy@132d42ec
最佳答案
这是因为您使用的设备没有使用 API 23(Android 6.0 或更高版本)
关于android - 在路径 : DexPathList for KeyGenParameterSpec$Builder 上找不到类,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33886416/
BufferedImage image = ImageIO.read(SpriteSheet.class.getResource(path)); BufferedImage image = Image
希望有人能够帮助我解决将我的 React 应用程序推送到 Heroku 时遇到的问题。 heroku 日志反复显示以下错误。 at=error code=H10 desc="App crashed"
我是 Kotlin 的新手,我正在经历这样的例子。 . . package com.example.lambda1 import spark.Spark.get fun main(args: Arra
如果您已经安装了 32 位 JDK,请在中定义一个 JAVA_HOME 变量 Computer>System Properties>System Setting>Enviorment VAriable
我正在开发一个独立于平台的应用程序。我收到一个文件 URL*。在 Windows 上,这些是: file:///Z:/folder%20to%20file/file.txt file://host/f
我在 OSX、Objective-C 上。 我有一个像 这样的路径/NSURL /Users/xxx/Desktop/image2.png 但我将它传递给第三方应用程序,该应用程序会像 excpect
我已经安装了 Android studio 和插件的 DART,FLUTTER 来启动 flutter,但是因为我在创建我的第一个 flutter 项目时无法提供 sdk 路径。 最佳答案 我试图找出
127.0.0.1:8000/api/仅包含来自第二个应用程序的 url,但我将两个 url 模块链接到相同的模式。甚至有可能做到这一点吗? 第一个应用程序: from django.urls imp
对于大量图像(大约 1k,加上相同数量的拇指,在大约 500 个文件夹中),我们要求网站上使用的所有图像 URI 都必须具有 SEO 优化路径。它们已经准备好并提供完整的路径结构(每个文件夹包含一个具
为什么 f 不是一个文件?什么可能导致这种情况? String currentPhotoPath = "file:/storage/sdcard0/Pictures/someFileName.
Gradle 中的项目名称或路径中允许使用哪些字符? 它是否与特定操作系统的目录名称中允许的字符相同(例如: http://en.wikipedia.org/wiki/Filename#Reserve
我有一个包含文件夹路径的表格。我需要找到层次结构中这些文件夹之间的所有“差距”。我的意思是,如果表格包含这 3 个文件夹: 'A' 'A\B\C' 'A\B\C\D\E\F\G' 我需要在层次结构中找
我在 Linux 服务器上的/home/subversion 中安装了 svn - 那里有一个 ROOT 文件夹,其中包含 db 和 conf 等文件夹。没有映射到项目名称的文件夹,请有人告诉我如何列
对于我的图像位置:/src/assets/bitmap/sample.jpg 给出了关键配置: context: resolve('src') output: { path: resolve('b
我需要创建带有圆角的 SVG 路径,以将它们导出到 DXF 进行切割。我的问题是角应该是圆弧,而不是贝塞尔曲线。 使用 arc 命令相对容易处理直角,因为半径也是从拐角到圆弧起点的距离。对于其他角度,
大家好,我正在玩 Airflow,我正在阅读这篇很有帮助的 tutorial .我正在寻求帮助以更好地了解 Admin->Connection 如何在 Conn Type: File (path) 方
我的目标是定义R将用于安装和搜索库的单个路径。我read可以通过更改Rprofile.site安装路径中的R文件来完成。我在那里尝试了两个命令: .libPaths("D:/RLibrary") .L
我有一个问题:当我在一个页面中时,我想返回到上一页。我使用 $routeProvider。如何读取之前的 url? 我尝试在我的 Controller 中使用此代码但不起作用... angular.m
我正在尝试将一个文件从我的主干合并到一个分支(wc),并且对于看起来位于当前合并操作中不涉及的分支上的路径出现奇怪的未找到路径错误。 例如,在我们的 svn 项目中,我们有: 分行 分支 0 分支 1
我有一个树数据序列化如下: 关系:P到C是“一对多”,C到P是“一对一”。所以列 P 可能有重复的值,但列 C 有唯一的值。 P, C 1, 2 1, 3 3, 4 2, 5 4, 6 # in da
我是一名优秀的程序员,十分优秀!