I was not able to find a solution for this and the things I tried didn't worked..
I have a Android Project in Eclipse ADT. I specified minSdkVersion="15 in the Manifest and I also set this Project to 4.0.3 from the beginning. My Layout displays perfectly in Eclipse but when I upload the App to my Device(s) (Android 4.3 and 4.2.2) it shows the pre-ICS buttons. See attached files..
On Eclipse it looks like this:
(Sorry I can't insert the pictures directly because as a new user I have no points)
On my device:
Any clue what the problem could be? I also checked the Project Properties and set the build target to Android 4.0.3 but without effect.
Make sure you also use targetSdkVersion parameter to target the latest SDK
Do you check the Theme of the actives in manifest?
Read about also in: http://developer.android.com/guide/topics/ui/themes.html#SelectATheme
Related
I am new to developing in Android Studio, I started in Windows 10 but since Win 10 gave me some general issues, I installed Ubuntu 16.04 LTS and installed Android Studio.
Its been quite a difficult one to install Java and Android SDK again and while after all is setup, I started with one tutorial from Google for using Constraint Layout. It was all working fine but suddenly after a reboot of my machine, now I am facing strange issues.
The properties window of any component (imageview or textview) will never load and it shows 'loading' with a forever-rotating-circle.
in even log, I find this,
Image of the properties loading
IllegalArgumentException: Missing attribute definition for orientation
I thought there could be issues with Android repository not installed properly. So, I used
android sdk list -a
and installed the Android repository again. Even after multiple restart of the android studio, i still get the error.
Can someone help?
Edit: Support libraries are indeed added. Support Library in dependency in project structure
Make sure you set the orientation for your LinearLayouts and most of all make sure you are not making any spelling mistakes in your arguments for example in your LinearLayout make sure to have android:orientation="vertical" and double check for spelling mistakes like writing android:orientation="verticall"with two "l" can sometines cause these sorts of errors.
I have been using Android Studio, that worked like a charm. Then I reinstalled my computer and switched to IntelliJ, but I kept the SDK on SD card so I don't have to re/downloading it.
It works, I can build an app, but layout editor is not working. I cant select rendering target.
Here is what I see.
When I open the dropdown menu to select rendering target it says just: <null>.
Any ideas?
First download proper SDKs in the SDK manager, and then you need to select the device on which you want to preview. To do so, click on the icon of the two little phones left of the AppTheme above the editor.
You need to have properly configured the IntelliJ project with the Android SDK.
Check your Project Settings at Ctrl+Shift+Alt+S.
Also check your Gradle settings to see if your SDK version has been defined there.
I have a perfectly working application on Android 4.4.4 Kitkat and below. When i run this application on a device with L-Preview, it crashes, giving me NullPointerException. So, inorder to test the application, i want to change the application's minSdkVersion to L, and run it on an emulator.
Important Note: There are no controls in the application that are specific to L-Preview. I am using Eclipse.
Here is what i have done till now...
Updated SDK and Support libraries to the latest versions.
Created an Emulator with Target as Android L.
Changed the Java Compiler settings for application to 1.7
In the application:
(i) In AndroidManifest.xml, changed minSdkVersion and targetSdkVersion to L.
android:minSdkVersion="L"
android:targetSdkVersion="L"
(ii) In Project Properties -> Android -> Project Build Target, checked Android L(Preview).
As soon as i make these changes, and building the application, there are erros in the application and gen folder becomes empty (Is there some issue with Layouts or Styles? Shoudl i be creating a values-v21 folder in layout and use a different theme? Material Theme? and also a drawable-v21?). When i change back the settings to Pre-L settings that are originally there in the application, everything gets back to normal.
What other changes should i be doing for this to work on a device with L. or Atleast get rid of errors and make this application start on the device with L? Most of the errors are because of R.java that goes missing from gen as soon as i make changes.
Not much we can specifically help with without a stack trace... but a recommendation would be to run the CheckJNI tool as Android L tightened up JNI compliance. It might or might not help you towards solving your problem but it could shed some light.
Here is info about how to run the tool: http://developer.android.com/training/articles/perf-jni.html#extended_checking
I am trying to create an Android Application Project, but I have had a number of problems. As it is now, I cannot get beyond the first dialog box. Here is the screenshot:
I am also reading that I have every sdk up to Android 4.1, even though I only have android 4.2, as shown in the following screenshots:
Additionally, when I open the android developer tools program, the following dialog box comes up:
even though, I have the Android Developer Toolkit version 21.1.0 installed on my machine, as shown by the following screen shot:
I am very confused right now. Could somebody please help me solve these problems? Would really appreciate it.
Holo Light Theme cannot be applied to Android 2.2. You need at least a minimum sdk of Android 3.
So either don't use Holo Theme or set you minimum to Android 3.
Edit: You may look into this instead: Update Android SDK Tool to 22.0.4(Latest Version) from 22.0.1
How to change the version of android application. i did entire code in Android 2.2 version, if i want to install the apk in 2.1 version, it getting parse error. How to change the versions of application. I dont know how to solve this issue. pls guide me to solve this problem.
if you are using eclipse it's very easy
go in eclipse project explorer
then right click on properties
select android from tree view
select your appropriate version.
and then in
in menifest file change
minsdk to 2.1
If you are using eclipse change value in manifest and build target in project configuration (Right click on project->Properties->Android-> Select that one which you need.
You have to also know that there can be some problems because of different version.
Check also this one Android Developer