Android Only compiling with API 20: Android 4.4 (KitKat Wear) - java

When I was building an app I attempted to place down an editText, but I got this error:
Exception raised during rendering: java.lang.System.arraycopy([CI[CII)V
Exception details are logged in Window > Show View > Error Log
After looking this up I came across someone else having this problem (Android app in Eclipse: Edit text not showing on Graphical layout). The problem was that the app was being compiled with KitKat Wear and KitKat wear doesn't support editText.
It should've been simple enough, all I needed to do was click on the
green droid on top of the Graphical Layout XML and choose a different API. But for me it was only showing "Automatically Pick Best" and "API 20: Android 4.4W". And Automatically Pick Best just chose 4.4W. So I tried making the app again but when I went to the New Android Application, all that was opening up under Compile With was 4.4W. I tried choosing different Target SDKs and Minimum Required SDKs but nothing worked. Help?

You have to download the API 19 or the one that you want. Go to Android SDK Manager and download the API, after that it'll be shown to you in the green droid of the Graphical Layout XML your new downloaded API, choose it and everything is gonna be fine.

Related

How to show the application design window in android studio?

I downloaded Android Studio a few days ago but I have a problem in the application design window that does not appear when I open the xml file or any other file as the image appears below it knowing that I have the latest version of Android Studio and the jdk
Android Studio problem
If what I understand is correct, look at this image and click the middle button. This should display both the code and the xml preview.

Please provide the path to the Android SDK: Android SDK path not specified [duplicate]

This question already has answers here:
Android SDK path not specified
(6 answers)
Closed 4 years ago.
When I run Android Studio, it says
Please provide the path to the Android SDK: Android SDK path not specified
I tried the to try the solutions that were already posted, but I didn't understand them.
Also, I already have java installed, but I want to word with kotlin.
Cancel the dialogue box asking for the Android SDK path and do the following:
Open Android Studio IDE. Find the down arrow icon, should be second last icon in the toolbar. Click that. You will see a path for Android SDK Location:. Click the edit link to the right of that. This will bring up the SDK Components Screen. If you can check the boxes there, check them. They may already be checked or they may be disabled. You can leave the path as is, for me its:
C:\Users\<user name>\AppData\Local\Android\Sdk
Depending on whether you had Android Studio before it may say it has detected a previous version and it will only download the components it needs. This is normal. Now click the NEXT button. A confirmation screen will come up with Setup Type and SDK Folder. If you want to change your SDK Folder this is your last chance, if not, click NEXT again.
It may bring up a Terms & Conditions screen, click the Accept radio button then NEXT. It will go and download the Android base SDK. When it's completed click FINISH.
You will then be taken to the Platforms screen where you can select which Android platforms you want to support. ie, Android 9.0 (Pie), Android 8.1 (Oreo). Select all the platforms you need then click APPLY.
The downloader will grab all those packages for you. Next, click the SDK Tools tab. Check the boxes of the tools you want and click APPLY. It may bring up a Terms & Conditions screen again, click the Accept radio button then NEXT. When completed just click FINISH and you're good to go.
This is an issue with the Android Studio Plugin for Kotlin. When you use the latest version of Kotlin, you also have to make sure to update the plugin:
Tools > Kotlin > Configure Kotlin Plugin Updates
If the answers mentioned above and at several other threads in Stack overflow did not solve your issue of Android Studio then probably you and I have the same issue. I was stuck here since last 20 days and was struggling over it. Finally able to resolve it.
Go back to the Android Studio download page. Bottom of the page contains download link to "sdk-tools-windows-4333796.zip". Just download the same and extract to a suitable location. Now mention the path to this folder in Android Studio. It will then install the suitable tools for Android Studio to work.
You can find the path going into Android Studio -> Configure -> SDK Manager -> On the top left it should say SDK Path.
Usually it is
C:\Users\<username>\AppData\Local\Android\sdk
Go to SDK Manager under Android SDK location provide the path which you gave during installation. If you had installed by default it should be in your
C>Users>USERNAME>AppData>Local>Android>SDK.
NOTE: AppData is hidden by default. So enable hidden items from View.
Took me a while to figure this out as the documentation is not clear on this at all. Cancel the dialogue box asking for the Android SDK path and do the following:
Open Android Studio IDE. Find the down arrow icon, should be second last icon in the toolbar. Click that. You will see a path for Android SDK Location:. Click the edit link to the right of that. This will bring up the SDK Components Screen. If you can check the boxes there, check them. They may already be checked or they may be disabled. You can leave the path as is, for me its:
C:\Users\<user name>\AppData\Local\Android\Sdk
Depending on whether you had Android Studio before it may say it has detected a previous version and it will only download the components it needs. This is normal. Now click the NEXT button. A confirmation screen will come up with Setup Type and SDK Folder. If you want to change your SDK Folder this is your last chance, if not, click NEXT again.
It may bring up a Terms & Conditions screen, click the Accept radio button then NEXT. It will go and download the Android base SDK. When it's completed click FINISH.
You will then be taken to the Platforms screen where you can select which Android platforms you want to support. ie, Android 9.0 (Pie), Android 8.1 (Oreo). Select all the platforms you need then click APPLY.
The downloader will grab all those packages for you. Next, click the SDK Tools tab. Check the boxes of the tools you want and click APPLY. It may bring up a Terms & Conditions screen again, click the Accept radio button then NEXT. When completed just click FINISH and you're good to go.

Android Menu Doesn't Appear Under Android Studio's "Tools" Menu. How to bring it up?

I'm trying to make an emulator with the AVD Manager but I need to go to the Android menu under "Tools." It's not there (Firebase and Kotlin are, though).
How can I get the Android menu on here?
I does not appear at first time using Android Studio. You need to create a project on it and restart 2 or 3 times. With me worked but I don't remember perfectly.
Obs: if you need emulate your apk you can use your phone directly. I used cross compilators like Cordova and get the emulation on my phone. For me it works faster and more accurately.

Android Studio - package java.awt.image does not exist

I have a problem running my project on Android Studio. I am working on an Android project that has a native Java library inside it. It was running fine all the time. But suddenly when I open Android Studio, I find this error:
There is also an error in the .gradle of the project:
It says that URI is not registered.
When Android Studio is started, I find this message:
It seems that there is something wrong in Java configuration, but I can't find out what is the problem?
It was running fine all the time
Not on Android, it wasn't.
It seems that there is something wrong in Java configuration
No. You are using classes that are not part of the Android SDK.
The java Swing and AWT API are not part of the Android SDK and thus aren't including with it. You must find an Android equivalent image library to use in your app. There are few good ones around just depends on what functionality you need to have available to you in you app. Try searching Picasso and or Volley. Picasso is very popular and well known. it has a lot of feature including networking functionality for loading images from the web. The Volley library isn't an image library but an networking library that contains some predefined classes for loading images over the internet.
So this just happened to me. I'm not 100% on the details of how I got it working again, but its roughly this (on my Mac):
Quit Android Studio
I went to ~/Library/Application%20Support/ and deleted the AndroidStudio3.2 directory
I relaunched Android Studio and I got some warning dialog about plugins not existing.
Chose the button that is something about reinstalling or fixing (or whatever isn't deleting or ignoring)
Another dialog comes up. There are a bunch of plugins that are in red. Deselect all the red ones. Then reselect all those ones that were previously red.
Android Studio asks you something and if you want to restart Android Studio. Pick the thing that includes restarting.
And once Android Studio restarts, chose to rebuild your project, and then it worked.
Good Luck and I hope this works for you too.

Android AndEngine: java.lang.IllegalArgumentException: No EGLConfig found

I'm doing a REALLY simple app, a basic hello world to test AndEngine and I am currently having some problems when running it:
I set my emulator properties as RealMayo suggests in his videos and it should work but I get this error instead
07-23 13:10:23.014: E/AndroidRuntime(1485): java.lang.IllegalArgumentException: No EGLConfig found!
Anyone has encountered the same situation, or may know how to solve it?
I am almost tempted to not us AndEngine at all... as a simple app has been really difficult to run.
NOTE: I have found some posts but they are at least 3 months old and the use of emulators has been fixed not long ago.
Anyways Thank you! :)
make sure your AVD is at least Android version 4.0.3
see this thread http://www.andengine.org/forums/gles2/api-level-t8230.html
just to add a small addition to the answer above (answer #1): make sure along creating an AVD with API level 15 (Android 4.0.3), that imported AndEngine library's project target is also built with Android 4.0.3. To validate: right click on AndEngine library in eclipse project, choose "properties", in the left pane of opened window click on "Android" label; in right pane verify that "Android 4.0.3" checkbox is checked. If "Android 4.0.3" option is not listed there, just import it with Android SDK Manager.
The comment from Ravikumar11 about GPU helped me get this resolved.
Additionally, I had to:
Update the SDK with all options for my current API (17) and the general tools (binary downloads that are not API-specific)
As eclipse suggests after SDK update, run Check for Updates in eclipse and a bunch of stuff gets loaded subsequently
From there, I was able to run my AndEngine app in the emulator

Categories