Design tab shows only ruler and cross in Android Studio - java

I imported a project and every design XML file shows the same thing.
Also I can't drag anything onto the area.

The drop down for API version shows 'null'. Do you have the appropriate SDK platform packages installed? Also, does this project build without errors?

Related

Java Dependency Viewer not appearing in the Explorer Window of Visual Studio Code. Any command to force toggle the view?

I have the Java Dependency Viewer extension configured in my Visual Studio Code and it used to work perfectly fine. But off late, whenever I open up VSCode and try to work on a Spring/ Maven Project, the Java dependency viewer fails to automatically load up on the explorer window (Waited for half an hour at times).
I have all the other important JAVA extensions already installed including the Language Support for Java(TM) by Red Hat.
Is there a way that I can manually toggle the viewer? Or, use any JSON setting to force rendering the viewer? Any suggestion ?
Note: I have tried disabling and enabling the extension, and I can see the viewer appearing. However, since this change causes the VSCode to reload itself, the IDE goes back to its initial state of not rendering the viewer.
Edit: I have JAVA (jdk-14), VSCode (v1.45.1) and Language Support for Java(TM) by Red Hat (v0.62.0) installed.
Have you tried to open a java file? Because the extension activated depends on the opened filename extension.
From here, you can know in which situations 'java dependency viewer' will get work:
"activationEvents": [
"onLanguage:java",
"workspaceContains:pom.xml",
"workspaceContains:.classpath",
"workspaceContains:build.gradle",
"onCommand:java.project.create"
], from official docs you can get to know the significance of every configuration.
But it's rare to miss all the conditions, so it's just in case. Then it looks more like there are some problems with the 'java dependency viewer' extension. you can reinstall it.

Debugging Android Studio 2.2 CMake vs NDK-Build

Today I downloaded the new stable version of Android Studio 2.2.
I want to using c++ debugging in my Android Studio Project.
When I start a new project, with the Include C++ Support selected within the wizard, I am able to create a hello-jniString program which debugs exactly as expected; both java and c++ breakpoints are hit..
However when open an existing project, click the project in the project panel and click "Link to C++ project". It seems to link and compiles changes well ... however, when I try to debug only Java breakpoints are hit :(
Any help into this would be greatly appreciated .. completely baffled at the fact that no real support/documentation exists for debugging ndk and that c++ ndk integration is so all over the place when Android seems so mature ..
I had slightly different case (debugging jni of library module, built by cmake), but you may try this.
Run > Edit Configuration > select 'Debugger' tab
add symbol directory of your debug symbol placed.
in my case, that was LIB_MODULE/.externalNativeBuild
I can debug c++ now but still finding how to turn off optimization option.
Good luck!
Following up on this incase someone comes by this,
I had to migrate Android/Application mk files to CMakeLists.txt.
Linked to c++ project within android studio, and 9 months later ... at last ... debugging capabilities

How to convert a specific android project built with ant to gradle?

I am using this framework for one of my projects and i have problems keeping it up to date. It is a little old, uses ant to build the components and is meant for eclipse. I usually use android studio and use gradle to build from interface(not command line).
The project has a host and plugins that are loaded from a server. The plugins are compiled from the command line cmd from windows using "tools/update.sh workspace" and "ant release" commands.
What i succeded so far:
I manually copyed the files from the host component and succeded without too much stroogle to do an android studio project and build it with no errors. And it succesfully loading the plugins.
On the plugin side I have to projects: for every new plugin i do a special android studio project and after everything is ok I adapt the code and copy it to a special template like eclipse project(i edit it with notepad++ no need for eclipse) and i build it with "ant release". That apk then i move it to server.
You see now that it is a little strange but somehow I made it to work. Problem is I'm always on the edge, I almost make it every time with little hacks to pass the build process. I think it is because i work in a mixed situation. I want to port everything on android studio and gradle. And hopefully build everything from the android studio command line.
The host builds in a jar file and is used in the plugin build.
I will put the new source code on request, till then you can see it in action here
To be more specific, the impassable bug appeared when i used MediaPlayer on the plugin. I had to move the wav files on the host witch is opposed to the framework design. But this is anyway the tip of the iceberg. So i would like to port everything from ant to gradle, and eclipse to android studio.
Thanks for your help.
If you have any existing project open in your Android Studio then just close that project. After your project is closed, it will show you a Welcome screen popup, there you can select Import Project option and it will automatically convert your project into Android Studio Project.
Here is what it will look like

I am having challenges changing Project Build Target on Eclipse

I am running Eclipse on Windows and I am having challenges changing/adding Project Build Target on my project's properties. It is set to Android 4.4W by default, and there are no other options.
It is my understanding that Android Wear supports EditText, which I am trying to add on the app that I am building. Unless, of course, I am wrong about AW's support for EditText.
May I please be assisted with this.
A screenshot of my project's properties

intellij import existing eclipse android project failed

After importing i got that error in compilation:
java: Cannot find JDK '<unknown>' for module 'CallsFreeCalls'
Also i can't see Android UI Designer inside JI
here what i have inside Project settings:
i have two choices there, but if i change it, nothing happened :(
this is approving that android designer enabled:
project SDK:
platform settings SDKs:
a building problem was solved by adding into platform setting/SDKs Java 1.6 sdk. But i still don't see Android UI Designer anywhere. Project now builded as well, but JI showing error in XML layout files (not actually repeat while building is done):
Try the following: select that module in the Project tool window (on the left), and press F4 on it. This will open the Project Structure dialog. Make sure to select your module and the Dependencies tab as shown on the picture:
Set your SDK from the Module SDK drop-down.
As for the UI Designer: check if the Android Designer plugin is enabled in Settings/Plugins.

Categories