当运行带有API 17-20的avd时,我会遇到以下错误和崩溃。我在API23中没有这个错误。我使用的是Android Studio2.0。
05-06 02:31:48.252 1544-1544/com.xxx.android E/dalvikvm: Could not find class 'android.os.PersistableBundle', referenced from method com.xxx.android.Splash.access$super
05-06 02:31:48.252 1544-1544/com.xxx.android E/dalvikvm: Could not find class 'android.os.PersistableBundle', referenced from method com.xxx.android.Splash.access$super
05-06 02:31:48.252 1544-1544/com.xxx.android E/dalvikvm: Could not find class 'android.media.session.MediaController', referenced from method com.xxx.android.Splash.access$super
05-06 02:31:48.252 1544-1544/com.xxx.android E/dalvikvm: Could not find class 'android.widget.Toolbar', referenced from method com.xxx.android.Splash.access$super
05-06 02:31:48.252 1544-1544/com.xxx.android E/dalvikvm: Could not find class 'android.app.ActivityManager$TaskDescription', referenced from method com.xxx.android.Splash.access$super
05-06 02:31:48.256 1544-1544/com.xxx.android E/dalvikvm: Could not find class 'android.app.SharedElementCallback', referenced from method com.xxx.android.Splash.access$super
05-06 02:31:48.256 1544-1544/com.xxx.android E/dalvikvm: Could not find class 'android.os.PersistableBundle', referenced from method com.xxx.android.Splash.access$super
05-06 02:31:48.256 1544-1544/com.xxx.android E/dalvikvm: Could not find class 'android.app.SharedElementCallback', referenced from method com.xxx.android.Splash.access$super
05-06 02:31:48.260 1544-1544/com.xxx.android E/dalvikvm: Could not find class 'android.app.assist.AssistContent', referenced from method com.xxx.android.Splash.access$super
05-06 02:31:48.260 1544-1544/com.xxx.android E/dalvikvm: Could not find class 'android.view.SearchEvent', referenced from method com.xxx.android.Splash.access$super
05-06 02:31:48.260 1544-1544/com.xxx.android E/dalvikvm: Could not find class 'android.os.PersistableBundle', referenced from method com.xxx.android.Splash.access$super
05-06 02:31:48.260 1544-1544/com.xxx.android E/dalvikvm: Could not find class 'com.xxx.android.HomeScreen', referenced from method com.xxx.android.Splash.onCreate
05-06 02:31:48.772 1544-1544/com.xxx.android E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.xxx.android, PID: 1544
java.lang.NoClassDefFoundError: com.xxx.android.HomeScreen
at com.xxx.android.Splash.onCreate(Splash.java:28)
at android.app.Activity.performCreate(Activity.java:5231)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2148)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2233)
at android.app.ActivityThread.access$800(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5001)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
at dalvik.system.NativeStart.main(Native Method)
下面是值得怀疑的代码:
public class Splash extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Intent intent = new Intent(this, com.xxx.android.HomeScreen.class); startActivity(intent); finish(); } }
AndroidManifest.xml:
<application
android:name="xxxApp"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/StartupTheme">
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
<activity
android:name="com.xxx.android.Splash"
android:theme="@style/StartupTheme">
<meta-data
android:name="android.app.searchable"
android:resource="@xml/searchable"/>
<intent-filter>
<action android:name="android.intent.action.SEARCH"/>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.xxx.android.HomeScreen"
android:label="@string/app_name"
android:theme="@style/xxxTheme">
<!--android:theme="@style/Theme.AppCompat.NoActionBar">-->
</activity>
null
有什么想法吗?
这是您正在使用的仿真程序的一个错误。AVD安装不正确,堆栈跟踪显示设备的启动程序引发异常。
E/DalvikVM:找不到类“Android.util.ArrayMap”,它是从方法com.android.tools.fd.runtime.restarter.GetActivities引用的
在Android Nougat 7.1操作系统上运行应用程序时,我在Android Studio中遇到以下错误 E/DalvikVM:找不到类“Android.Graphics.Drawable.RippleDrawable”,它是从方法Android.Support.V7.Widget.AppCompatimageHelper.HasOverlapPingRendering引用的 有什么办法可以
这是我的mainactivity.java文件: 这是我的RegistrationForm.java文件 ActivityMain.xml registration.xml 当我运行我的代码时,下面是红色的log cat错误: > 07-08 11:44:38.704 157 8-1578/com.example.kushalpc.app1 E/dalvikvm:找不到类“Android.os.P
** 当我运行相同的应用程序与API级别23或21它正常工作,但我面临的问题API 17 logcat显示E/dalvikvm:找不到类android.util.ArrayMap如果你有任何想法,请与我分享 谢啦 **
运行android studio 2.0 gradle版本2.10 最小sdk 4.0
问题内容: 我已经安装了两个jdk-jdk 1.5和jdk 1.8。我有以下Ant build.xml配置文件: 在安装jdk1.8之前,从Eclipse调用的Ant成功编译了所有源代码。但是现在,我有以下错误消息: 我的JAVA_HOME和JRE_HOME: 并在Eclipse JRE中将其设置为1.5。Java 1.8在安装过程中会设置一些配置吗? 问题答案: 已知低于1.9.0的Apache