How do you install NetBeans IDE the Android plugin? Is this link working or any alternative? http://kenai.com/projects/nbandroid/pages/Install
When i try i get failure:
Also this gives failure: http://kenai.com/projects/nbandroid/downloads/directory/archives or http://kenai.com/projects/nbandroid/downloads/download/archives/nbandroid-dev-2011-11-10_13-25-27.zip
SERVER ERROR
We're sorry, but something went wrong.
We've been notified about this issue and we'll take a look at it shortly.
I was using Netbeans for my JAVA project before, but when I started with Android I found it more useful to start with Eclipce. So if you not have to use NB, I recommend you to switch.
Kenai.com site no longer hosts these plugins. I recommend going to Install Plugins..|Settings | Add (Give it a name e.g. Android or NB)|Ok http://nbandroid.org/updates/updates.xml or if you're having a lazy connection download the plugins directly from http://nbandroid.org/downloads/ and add them from the Download tab and proceed as usual.
Android common library,
Android Core, Android Ddmlib,
AndroidPrefs, Android Project
SDK Library,
first only install these and then go for next it will work!!
Related
This question is NOT ABOUT how to debug the javascript-land of an React-Native app. It is about how to debug native libraries (means: JAVA-Code in this case) in the node_modules-folder.
While it is very easy for me to debug native iOS-parts of RN-Applications with XCode, i stumbled upon various issues with Android Studio...
The main thing is, that the node_modules-Folder is not present after importing the project into Studio, why it is not possible to setup breakpoints to debug thru.
Versions:
Android Studio 2.2.2 (most recent version currently)
react-native 0.38.0 (latest version also)
gradle 1.3.1 (preconfigured from react-native init)
also tried with upgrade to gradle 2.2.2
Android SDKs and -Build Tools from up to Version 23 installed including NDK
How I did it / Steps to reproduce
1. create new react native project:
react-native init debugTest
2. install third party library with native code that you want to debug natively
cd debugTest &&
react-native install react-native-sqlite-storage
3. ensure that everything would work on android side:
launch GenyMotion
launch an AVD
run the application with this command in terminal:
react-native run-android
(this will open up packager and everything else that is needed to transfer the js-bundle).
If one wants to omit this step, it is necessary to start the packager manually:
node node_modules/react-native/local-cli/cli.js start
4. launch Android Studio
with the upcoming starter dialog, choose "Import Project"
select the directory "android" of your project and click on "import"
(these steps are taken from official RN-documentation):
If you want to use Android Studio to work on native code, from the
Welcome screen of Android Studio choose "Import project" and select
the android folder of your app.
5. Android Studio asks to update gradle version from pre-configured 1.3.2 to 2.2.2. I have first denied it for the whole workflow, later on i tried it out (both did not differ significantly for me)
6. One have to deactivate Instant Run due to this issue
7. Click on "Run" or "Debug" in the Toolbar of Android Studio
So far everything works fine. I was able to set a breakpoint in MainApplication.java::onCreate and could step into this method then.
But here are the questions:
The node_modules-Folder isn't present in Android Studio and can't be debugged this way. How to achieve that?
Debugging the onCreate-Method and going further down into the Java-Stack, very offen it happened that the "Sourcecode does not match the byte code".
The debugger was hanging somewhere else in comments of source code but not on exactly that line, which was selected to execute.
Android SDKs:
I have installed all SDKs and build tools and NDK and everything else since version 23:
TL;DR:
How to debug native libraries that are present in node_modules-Folder of an react native application with Android Studio, because they are not visible in AS thus no breakpoint could be passed?
UPDATE
Finally i've found out the root cause. For me it wasn't working due to the fact, that the library i wanted to debug, wasn't shown in Android Studio. But this was a mistake by myself because the library wasn't setup correctly, why gradle wasn't able to take notice of it.
So, this question can be used like a blog post how to do it right (and will be sufficient if the 3rd party library works out of the box with "rnpm-link" or "react-native link") [which wasn't the case here in my example]
Have you done rnpm link or react-native link ? Once you do that, there will be additional modules along with the app module, something like this.
You can look at all the java code in the native module and put breakdpoints , debug etc.
Bam.... i can answer my first of the two questions now by myself. Thx to #agent_hunt, who put me into the right direction...
In this example application the bindings wasn't setup correctly. "rnpm link" and the newer one "react-native link", which is part of "react-native install", didn't worked correctly here for the android-part because it is not implemented in the 3rd-party-library right now, that i've used for this example.
That's why gradle didn't take notice of the library. After setting it up correctly, the folder react-native-sqlite-storage appeared in Android Studio and i was able to pass a breakpoint and to stop the execution there.
Nevertheless, debugging this library works fine, but when i wan't to step into lower/"deeper" methods of android SDK, it still has issues to point to the correct line of code ("Sourcecode does not match the byte code")
I'm working on a Ionic Application and there are a few bugs on Custom Java Plugin imported to the app.
I'm not a Java developer but I wish to understand what happen in those plugins while I run the Ionic Application.
Looking on Google I found a few things like adb logcat that is something terrible and impossible to read.
I tried creating a few messages in the Java Plugin in this way:
Log.d("MyMessage", "Something is happening");
And using grep in the adb logcat to see only my messages but unfortunately it is not enough even because I can not pass a variable as message... so I don't exactly know what is going on in the Plugin while using the app.
I know about JDB but I don't know how to run it together with the Ionic App.
Basically I just wish to create breakpoints or to print dynamic variables while the Plugin is executed to understand where are bugs but I can not find anything useful.
I'm a Javascript developer and I have several tools to debug my Front-End stuff so I think it is quite weird it doesn't exist a way to debug much more complex, back-end, code...
I hope you can help me to do that.
For those still looking for a solution:
You can debug java plugins with Android studio and an Android emulator.
Step 1:
Install Android studio and SDK tools.
Step 2: Get a virtual device running. In order to use the emulator you need to have the Intel x86 emulator accelerator installed. I personally had issues here, I had to disable Hyper-V before it would run. This and other solutions can be found here: The intel x86 emulator accelerator (HAXM installer) revision 6.0.5 is showing not compatible with windows.
Step 3: Do a build for Android in your Ionic project (if you haven't already done so)
Step 4: Navigate to
File > New > Import Project and then navigate to your Ionic project. Don't import the entire project, just the Android folder ( {ProjectName} > platforms > android)
*WARNING: Don't update the gradle if you are presented with the option to do so. This may break the ability to build Android from within the Ionic folder. *
Not updating the gradle may result in a "Gradle project sync failed" error. In my case the solution was to run File -> Invalidate caches / Restart
And that's pretty much it. Once the project is loaded you can use the project tab to navigate to the plugin you want to debug, place breakpoints where you want them, and run debug.
am not new to java programming. I recently downloaded the android SDK to begin practice android programming.
my eclipse Ide hasn't really been friendly with me because, at first it refused to install the adt plugin I donwloaded. till I installed it from google. and now it find it difficult to run even the helloworld program. it gives me several errors.
something about */user/***/res/value/*.xml not found or dark theme something not found, appcompat.v7 no resoirse found .
and also do I really to install all the items in the android SDK before I can compile anything. because the file size of my android-SDK-windows file is way over 10gb. and it looks odd plus my data bundle has been exhausted.
thanks..
Welcome to android Platform
Question1: "my eclipse Ide hasn't really been friendly with me"
Practice makes you perfect. Eclipse is a good tool once you get to know it
Question2: "Do I really to install all the items in the android SDK before I can compile anything"
No, you just need any once of the API ex: API-14 install it
Question3: "It find it difficult to run even the helloworld program"
Download a sample project online import into your eclipse and run it if you are new to android
Happy Coding !!
when using eclipse for android development it will always gives you errors its a nightmare that ull get used to. first of all make sure that the theme is fit for the sdk version that you mentioned in the manifest and two make sure that you have downloaded all the required items in the SDK. and try and refresh the project few times or even restart eclipse.
i am updating android sdk 23 and i'm getting this error. I am using windows xp.
Error:
Cannot complete the install because of a conflicting dependency.
Software being installed: Android Development Tools 23.0.0.1245622 (com.android.ide.eclipse.adt.feature.feature.group 23.0.0.1245622)
Software currently installed: Android Developer Tools 22.3.0.v201310242005-887826 (com.android.ide.eclipse.adt.package.product 22.3.0.v201310242005-887826)
Only one of the following can be installed at once:
ADT Package 22.6.3.v201404151837-1123206 (com.android.ide.eclipse.adt.package 22.6.3.v201404151837-1123206)
ADT Package 23.0.0.1245622 (com.android.ide.eclipse.adt.package 23.0.0.1245622)
Cannot satisfy dependency:
From: Android Development Tools 23.0.0.1245622 (com.android.ide.eclipse.adt.feature.feature.group 23.0.0.1245622)
To: com.android.ide.eclipse.adt.package [23.0.0.1245622]
Cannot satisfy dependency:
From: Android Development Tools 22.6.3.v201404151837-1123206 (com.android.ide.eclipse.adt.feature.group 22.6.3.v201404151837-1123206)
To: com.android.ide.eclipse.adt.package [22.6.3.v201404151837-1123206]
Cannot satisfy dependency:
From: ADT Package 22.3.0.v201310242005-887826 (com.android.ide.eclipse.adt.package.feature.group 22.3.0.v201310242005-887826)
To: com.android.ide.eclipse.adt.feature.group 22.2.0
Cannot satisfy dependency:
From: Android Developer Tools 22.3.0.v201310242005-887826 (com.android.ide.eclipse.adt.package.product 22.3.0.v201310242005-887826)
To: com.android.ide.eclipse.adt.package.feature.group [22.3.0.v201310242005-887826]
I had the same problem, and was thinking of downloading a clean copy of Eclipse and then going through the installation of all the plug-in, but the sheer amount of hard work defeated my resolve.
I found another way out to update ADT 23 without any hassles on the current instance of Eclipse. :)
I was not sure if the approach will work or not, hence I did not capture the process, Please bear with me. In any case I can't post images I do not have reputation :P
Here's what I did:
Go to the Install new Software option from Help.
Open the available software sites.
Select Your Android site and remove it. Before removing copy the Location, we are going to use the same URL again.
Click OK (this will take you back to the previous screen).
paste the copied URL back into the "Work With" combo on the screen. Click Add.
It will flash a message saying it already has the options available.
Choose to uninstall the previous version and install new.
Voila, it installs ADT 23.
Hope that helps.
This seems to be a problem in the SDK tools rev. 23 update of Google. A lot of people have problems with this upgrade, see:
http://code.google.com/p/android/issues/detail?id=72584
http://code.google.com/p/android/issues/detail?id=72419
The only solution so far is to download a clean version of Eclipse.
I don't like to start with a clean copy and install all the other plugins, so I'll try to copy the SDK folders from this Clean Eclipse instance to your current one.
Edit:
I ended up with setting up a clean copy because I did not want to start more problems. I did the following:
download the Eclipse (luna) bundle you like to use: Eclipse IDE for Java Developers
install Android SDK
I could not update the SDK itself to version 23 so I had to do the following
download the Eclipse Android bundle
make a backup your current android-sdk folder
unzip and copy the sdk folder and copy it over the old android-sdk folder
(The new SDK folder only contains 4.4)
Now you should have a working eclipse and you can start installing all the other plugins you like to use again.
Im new to android development and ive seen some old tutorials before regarding its development on Eclipse. i recently download the new Android Studio to use for the development. However, i found something new called gradle files that are present in the projects folder along with the normal files that used to be in the project.
Everytime i try to run the app i get the following error:
"
Gradle:
FAILURE: Could not determine which tasks to execute.
* What went wrong:
Task 'assemble' not found in root project 'SampleProject'.
* Try:
Run gradle tasks to get a list of available tasks.
"
Could anyone please explain whats the use of gradle? and do i have to use it while developing android apps?
Thank you
Version 0.2.1 of Studio was just released and provides a better error. You should upgrade and see what happens, but it's likely that your project has another problem that should be fixed instead of randomly adding a task that shouldn't be added.
In your top directory file with name build.gradle just put:
task assemble {}
You can see it in known issues here
Get started with gradle here!
Edit: Android Studio 0.2.1 solves this error: http://tools.android.com/recent/androidstudio021released
Android Studio is bleeding edge (not yet beta).
For more stable solution use Eclipse with ADT, e.g. ADT-bundle http://developer.android.com/sdk/index.html
You can develop in Eclipse with ADT and run Gradle build using Nodeclipse/Enide Gradle for Eclipse
(marketplace)
Some screenshots for Gradle for Eclipse: