Java android development starting - java

I wanna start with android programming. I am using eclipse and installed Android SDK. Then in eclipse i installed ADT Plugin, and after that installed every tool and file for 4.2(Jelly Bean) from SDK manager and also installed all extras from SDK manager (expect Intel x86 Emulator Accelerator - because i use AMD). Then when i create android application project i get this problems:
First, wizard for creating project is not closing after i click finish but it creates app (can see it in package explorer)
Second, i get errors in MainActivity and Values>styles.xml - In console it gives me errors No resource found that matches the given name 'Theme.AppCompat.Light', No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'., No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar', and these errors show in about 15 lines.
I tried adding appcompat-v7-24.2.0.javadoc.jar and appcompat-v7-24.2.0.source.jar files in Java Build Path (project settings), but that doesn't work either.
I really do not know what to do. Before i was using Eclipse Neon, and i even tried installing Eclipse Standard and reinstalling android SDK and ADT, but doesn't work. So please at least try to help me. Thank you in advance :)

Related

Unity3D: APK file missing

Every time I try and build my game, I am unable to find the APK file anywhere, I did however found the APK file in my recent folder, but it doesn't show up in the respective folders I initially selected or allows me to copy and paste the APK file into my Android device.
I don't even get any errors when the game is built (in fact, I get a message in my console stating that my build was successful) so I am confused to why my APK file is not showing up.
It happened after I recently updated my unity 5.6 to unity 2018.3.1 due to Oracle JDK is no longer free for commercial use and unity 2018.3 uses OpenJDK (I am using AdoptOpenJDK/JDK-12.0.1.12-hotspot). Once unity was installed, I didn't receive any errors only a few warnings within a few scripts (which was only a minor problem and I could solve easily).
However, when I go to player settings, I get this one warning: "failed to get available Android API levels. Make sure your Android SDK tools version is 25 or higher and you have an internet connection."
I made sure that my minimum API level is Android 8.0 'Oreo' (API level 26) and the target API level is Android 8.1 'Oreo' (API level 27), I also uninstall Android studio and reinstalled.
I even went as far as deleting all folders inside build tools and platforms from (appdata>local>android>sdk>buildtools) & (appdata>local>android>sdk>platforms) and updating the files for continuing the build.
However, all the methods I've tried have not to work, so I'm asking for help here. Please, does anyone know why is my APK file not appearing at all? Thank you in advance, I really appreciate it! :)
this solution helped me if Are you using the r22 of android SDK, if so, Google decided to move the aapt.exe from tools directory to build-tools//aapt.exe
A quick solution for this is co copy the aapt.exe file from build-tools and paste as shortcut on tools directory. Keep the shortcut name as aapt.exe
another solution is to download jdk(1.8 version is prefered)from oracle site ["http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html"]and set it instead of the build-in jdk form the project preferences then reboot

Can't find SDK Manager in SDK file

I am being pestered by eclipse when I open the program. I get two error messages; "SDK Platform tools component is missing! ..." and "Failed to get the required ADT version number from the SDK. The Android developer toolkit may not work properly".
Both messages give me the option to open the Android SDK manager. When I attempt to open the Android SDK manager from eclipse, I get an initialization and then nothing happens.
I'm aware this is a common problem. Many solutions say to find the Android SDK manager in the SDK directory, though I can't find it anywhere there. The path I am using is "C:\Users\Ant\AppData\Local\Android\sdk".
When I attempt to open the SDK manager from Android Studio, I get something come up, though I have no idea if it is the Android studio version of the SDK manager or not.
All I want to do is install some packages to get everything running smoothly. I have the feeling that I need to open the SDK manager from eclipse to do it though. Is this correct? Is there anything else I can do?
You should go and create the proper environment setup, It seems there is a confusion between Eclipse and android studio working env. Please make sure to install separately the working env. SDK are normally hidden files make sure you are suppose to see hidden files in your computer.
Thanks,
Ashish

ADT Eclipse imports cannot be resolved

I'm working on some Android projects for school and I brought them home to work on over the weekend. I downloaded ADT/Eclipse on my desktop here and picked the folder my projects are in as the workspace.
When I open up the classes in the project to work I just see loads of errors in the code, which stem from errors shown in the imports like
import android.content.Context;
Imagine error marks under "android.content". It's like this with all of imports and when I hover over them the little window says "The xxxx.xxxx cannot be resolved". I'm currently API 19 on my desktop here.
What's the problem here?
Oh, and another thing: in the little console tab-window it says "Unable to resolve target 'android-18'". Could this a cause?
Well if you have ADT installed, you probably don't have API 18 installed. You can install it from the SDK manager in Eclipse.
Another option is to change the app to compile with API 19.
Right click your project > Properties > Android > Select the version to compile with
You should install latest ADT Bundle from Android official website that is available at :http://developer.android.com
and after downloading , don't extract it to desktop , instead extract it to the folder where you have installed Java JDK(java Development Kit). Because PATH might be the problem..

How do I set my Java SDK when creating an Android project in IntelliJ?

I'm trying to get an Android project running in IntelliJ by following the JetBrain instructions here but run into an error message when trying to Select the Project Template (step #2). The error is
"Cannot Create SDK
You need to configure a Java SDK first".
I'm doing this on a mac and followed the first page of instructions before the ones linked above. In particular:
I ran the command tools/android update sdk --no-ui from the terminal after downloading only the Android SDK content. I mention this because it says to "run the SDK Manager", but I see nothing of the sort in what I've unpacked. Running the aforementioned command downloaded and installed many Android API versions and revisions.
The JDK I downloaded was jdk-7u17. I installed it; is that all I need to do?
The error for "configure a Java SDK first" comes up when I press the "New..." button in step 2. Does anyone know how I can configure my Java SDK? Is there something I missed or that is missing from the JetBrain instructions?
EDIT: Apparently, a file browser comes up after clicking OK. This confuses me further, as it accepts setting my JDK location but what I want is to view an Android project. My Android SDK is in the folder named "android-sdk-macosx", but that's not bringing up the Android options when it's selected. How do I get to the Android templates?
Have you downloaded some of the Android SDK's? Try running tools/android sdk (this opens the SDK manager) and download one of the SDK's. Then add this to your project.
Have a look at the IntelliJ documentation, which explains how to setup your SDK.
You have to setup a JDK first (see also Setting up JDK 7 for IntelliJ on the Mac), then you will be able to open your Android project.

Android Project with ActionBarSherlock doesn't get built

I implemented the current version of ActionBarSherlock to my Android Project.
Everything works fine and I don't get any errors.
But when I try to debug or export my project I don't get an .apk-file out of my project. Just a .jar-file with the name of my project.
I've read about some problems the SDK had with building projects that contain external libraries but this was at SDK version 14 and so I hope, this bug is fixed...
So there might be another cause for this problem.
Does anybody know a possible solution?
You cannot get *.jar file as the result of building Android project. This seems very strange to me. There must be something wrong with your project settings (if you changed them), or the project you build is of the wrong type (i.e. it is Java Application instead of Android Application).
You didn't mention which IDE do you use, but I assume you use Eclipse.
Make sure you have installed Android SDK and Eclipse ADT correctly (just in case).
Next thing to try is to create a new Android Application project from existing sources (there should be such option during the process of creation).

Categories

Resources