android-version

Unable to instantiate activity ComponentInfo

谁说胖子不能爱 提交于 2019-11-28 12:47:45
I am developing an application for Froyo as minimum version and Gingerbread as the target version. So, the manifest shows: <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="10"/> I have an emulator and a Nexus One with Gingerbread, and the application deploys and installs correctly. But when it starts, it crashes, and the error thrown in the log is: 09-18 06:35:11.240: ERROR/AndroidRuntime(382): FATAL EXCEPTION: main 09-18 06:35:11.240: ERROR/AndroidRuntime(382): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.my.package/com.my.package.Dashboard}: java

Relationship between OS version, API Level, and Java version

扶醉桌前 提交于 2019-11-28 12:11:43
I know there are a lot of questions on here about Android API Level and Version but this question is different so please don't mark it as a duplicate. I am wondering how Java version 1.6, 1.7, 1.8... relates to those two. The source of my confusion is me trying to use the Pattern.compile method with the Pattern.UNICODE_CHARACTER_CLASS flag as seen below. Pattern pattern = Pattern.compile("\\b" + keywordToCheck + "\\b", Pattern.UNICODE_CHARACTER_CLASS); From the docs on Pattern.UNICODE_CHARACTER_CLASS it says that it says Since: 1.7, which I assume to mean it is available in Java version 1.7

How to Use Unsupported Exception for Lower Platform Version

大兔子大兔子 提交于 2019-11-27 16:05:33
问题 I have a DialogFragment that handles login and fingerprint authentication for my application. This fragment uses two classes that are exclusive to API 23, KeyGenParameterSpec and KeyPermanentlyInvalidatedException . I had been under the impression that I could use these classes, as long as I check the build version before I try to initialize the classes (outlined here): if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { ... } else { ... } But it appears that this is not the case. If I try

ActionBar pre Honeycomb

孤街浪徒 提交于 2019-11-27 12:29:28
I am writing an app for android (2.1 > 3.1) and I would like to use the familiar practice of using the app Icon in Honeycomb apps to go up to the home activity, however, when I run the activity on earlier, non Honeycomb devices where the Activity.getActionBar(); method does not exist yet, the app force closes, how can I only run this specified code if the device is running honeycomb? @Override protected void onStart() { super.onStart(); ActionBar actionBar = this.getActionBar(); actionBar.setDisplayHomeAsUpEnabled(true); } Thanks for any help and have a great day. Android pre-Honeycomb doesn't

Unable to instantiate activity ComponentInfo

断了今生、忘了曾经 提交于 2019-11-27 07:13:43
问题 I am developing an application for Froyo as minimum version and Gingerbread as the target version. So, the manifest shows: <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="10"/> I have an emulator and a Nexus One with Gingerbread, and the application deploys and installs correctly. But when it starts, it crashes, and the error thrown in the log is: 09-18 06:35:11.240: ERROR/AndroidRuntime(382): FATAL EXCEPTION: main 09-18 06:35:11.240: ERROR/AndroidRuntime(382): java.lang

ActionBar pre Honeycomb

馋奶兔 提交于 2019-11-26 16:05:30
问题 I am writing an app for android (2.1 > 3.1) and I would like to use the familiar practice of using the app Icon in Honeycomb apps to go up to the home activity, however, when I run the activity on earlier, non Honeycomb devices where the Activity.getActionBar(); method does not exist yet, the app force closes, how can I only run this specified code if the device is running honeycomb? @Override protected void onStart() { super.onStart(); ActionBar actionBar = this.getActionBar(); actionBar

Android Studio rendering problems

╄→尐↘猪︶ㄣ 提交于 2019-11-26 00:25:33
问题 I\'m using Android Studio 0.2.3 and when opened an activity layout normally, the preview should appear on the right side, so that I can switch between Text and Design mode, which should again show the preview of the layout. But no preview is shown not on the right side neither when I\'m in text mode nor in the design mode. I just get the error rendering problems... When I compile everything and install the app on my device, it works without any errors. For developing and experimenting with