Create Android app in Netbeans to Android Mobile - java

How can I run my android application that I have created using Netbeans on an Android mobile?
I have read this "How to run J2ME application directly on the mobile from NetBeans?"
and the answer was:
In Netbeans, right click your project and click on 'Build'. Now
navigate to the directory where your project is stored and go to the
folder called 'dist'. In that, you will find a JAR file with the name
of your project. Copy that to your cellphone and execute it.
Does this works for Android as well?
THANKS

No, it is not sufficient. Android application format is APK, not JAR, and you need more things set up to make valid app. Please follow any basic Android tutorial to gain elementary knowledge.

Related

Downloading a libgdx Project Gradle Problems

So my friends and I are making a game for Android and we are using Android studio. We are using libgdx. We are also learning how to use github. Anyways, using Android Studio, I uploaded the basic libgdx setup. The one that just displays the Bad Logic image. My friend downloads it from github using Android studio but there are errors everywhere. It says that it can't find the badlogic package and it gives the following error:
This project does not use the Gradle build system. We recommend that you migrate to using the Gradle build system.
I know that libgdx uses gradle. So what is the problem? Why can't we simply upload and then download a simple project?
Thanks!
Try to remove the .gradle directory and re-import the project or use the Setup App Installer from here to create a new gradle project.
Thanks for the help! I finally figured it out.
Basically, when I imported the project, I was just importing with existing project files. These are the steps I took to get it fixed.
Check out from Version Control using Android Studio and the welcome screen.
When asked to open, say NO.
Go to the folder that is associated with the repo.
Create a local.properties file there and in that file it should have
sdk.dir = /YOUR/PATH/TO/SDK/HERE
Then go back to Android Studio.
Click Import Project and select the folder that has it in there.
From then on, it should work forever as the .gitignore file that is generated by libgdx will ignore the local.properties file when pushed. I hope this helps someone!

Trouble installing ADT plugin in eclipse (for developing android apps)

I already had Eclipse (kepler) installed to create java programs.
Now I wanted to develop android apps, so I wanted to install the ADT plugin for Eclipse.
I read the following:
http://developer.android.com/sdk/installing/installing-adt.html#Download
I did those steps exactly.
Then, on that same page, I read this paragraph:
http://developer.android.com/sdk/installing/installing-adt.html#Configure
But I don't understand what I have to do.
When Eclipse restarts, I get a popup diolog which asks me to choose a path which has to lead to a folder. I can't find any folder. I don't see anything changed in my file system.
I don't see any folder which looks like Android SDK. I think I am missing something.
You need the SDK as well. You can find it here:
https://developer.android.com/sdk/installing/index.html?pkg=tools
When you install it you have to insert the path of your SDK in the Eclipse popup dialog
I encourage you to update the SDK on your first launch through SDK manager

Copy an android app from my phone to my PC

I don't know if what I am going to ask is possible. As a matter of fact, I can see that it would be a bad idea, but I thought I would ask just in case. I have an app on my phone that I have been working on in my lab at school. I am stuck at home now and would like to continue working on the app here at home but all my code is on my computer at school. Is there any way to move the app from my phone to my PC so that I can continue working on the app in eclipse?
Thanks
As Scott says, simply copying the app to your PC will not exactly allow you to develop as though you have the source code in front of you, but if you insist, you'll need root access to get a directory listing of your /data directory, then you'll need to adb pull the file.
You are working on an app in school ? ok, so let me guess. are your using eclipse ide to create that app ? if yes, then you can simply copy the whole project and paste it in your pc and run it there from eclipse.
If it is only an app on your mobile , then you can use BlueStack Placer on your PC
Extract the apk of your app from mobile using an application called apk extractor. It is stored in a predefined folder. Connect your phone to PC , copy that apk n a folder i have described below. It must be in a folder called Apk Extractor.
Now, install BlueStack Player. Basically it is a player to run android apps.
Copy the APK file into the Apps folder, which is created by default in the Libraries folder at the time of BlueStacks installation. Right click on that APK file and open with apk handler.exe which is located in C:\Program Files\blue stack(Your BlueStack installation Location)
Your app has been installed in BlueStack Player. It will show on the home screen of the Player
NOTE :- These instructions are tested and i have run it

How can I modify the DroidGap.class file from phonegap-1.0.0.jar archive in eclipse?

I am really very new on android development.
I have made 2-3 apps , those running on my android device already.
Last few days I am facing a stupid problem.
The problem is , creating the app fullscreen for every device. I have read phone gaps wiki
and tried with specific way. But I failed everytime.
When I'm trying to open the DroidGap.class from my Android eclipse project explorer , I got a error. that, "DroidGap.class has no source attached". (after build the phonegap.jar)
Please help me....
first you need to add phonegap.jar to your project
you need to add phone gap plugin to your eclipse
Use the AppLaud Eclipse Plugin for PhoneGap Android
Download and unzip the PhoneGap sources from GitHub
In the AppLaud wizard, select "Enter path to installed PhoneGap"
Enter the directory path to the unzipped sources from GitHub
Now you will be able to modify and debug the sources that comprise phonegap.jar
Caveat: I'm the creator of the AppLaud Plugin
fullscreen?
If you want modify DroidGap.class dowload source code from github and rebuild phonegap.
Rebulid instruction here: https://github.com/callback/callback-android/blob/master/README.md

Convert an java file into android program

hi i am a new android developer. When i am searching for a logic related to my app in google, i found a java application which is related to my android app. After making some changes i succeded in getting output, but i need the code to be in an android based project. When i change to convert it i get lot of errors, is there any possible way to convert the java application into an android app by including any external jar file..... The java application is just a part of my android app, based on that i have to develop more so pls help me....
thanx in Advance
If you intend to include external Java code via .jar files, that is supported in Android. Just put the file into the libs/ directory of your Android project and use the classes as you would somewhere else.
If you are using Eclipse IDE, this might help:
After including the .jar files in the libs/ folder, right click on the required .jar file and select "build path", then click on "add to build path". After doing this, u'll notice that the .jar file is added in the "Referenced libraries" in your project. Once done, you are all good to go and import methods from these files. Hope that helps you remove your errors. Happy coding. :)

Categories