IntelliJ IDEA running Android Native Activity application - android

I am trying to run the native activity sample that comes with the Android NDK. I remember it used to run fine with Eclipse but with IntelliJ IDEA I always get an error saying "Default Activity not found" when I select "Launch default Activity" from the run configuration dialog. If I try to enter the custom activity name like "android.app.NativeActivity" it again cannot find it.
Am I stuck with Eclipse or is there a workaround for this problem?

I'm afraid there is no support for launching NDK Activity right now, please submit a feature request.

Related

How to start developing app for Google Glass?

I am working on a Google glass Android app. I have installed the glass development kit (GDK) in Android SDK. Now I created a glass project using Android Studio (Version 3.3.2). The newly created project is showing an error "Default Activity not found" in run->edit configuration.
Please refer the screenshot for the error.
1.
And 2. By clicking run->Edit Configuration in menu.
I have searched a lot on Google and found many articles regarding the same. All are suggested to set the edit configurations option like below.
Module: app
Package: Deploy default APK
Activity: Launch default Activity
Target Device: USB Device
I did the same, but no one is working for me. After spending the whole day to make it work, I came here. This error is due to the Launcher activity, because there is no launcher activity in Google glass project instead it uses Voice Trigger intent filter. It is similar to wearable apps they also don't have the launcher activity.
Android Studio won't let you use a standard run configuration without specifying a launcher in the manifest.
You could try using the gradle command line instead:
./gradlew installDebug
In case you haven't resolved the issue. I came across similar issue before, two ways worked for me:
Choose "Nothing" as the option. You will be able to run the app manually on the Glass, but your debugger won't work straight away. You have to manually attach the debugger to the process. You may also have to use logcat if there is a bug in the launching process.
Specify an activity (whichever is associated with voice trigger).
Also, I noticed that you created the app using Kotlin. Kotlin activity didn't work in my case, throwing exceptions associated with nullable var when resuming the activity. Non-activity classes worked fine. Please let me know if Kotlin activity worked in your case.

Custom Keyboard - Could not identify launch activity: Default Activity not found

I am following a tutorial on creating a custom keyboard for an Android device. I am using Android Studio 2.1.2. There is no activity in the program because you have to activate the keyboard in the language & input settings.
When I run the program I get this error: "Could not identify launch activity: Default Activity not found
Error while Launching activity"
I have posted on the site but have gotten no response. I followed the tutorial step by step and looked it over for a couple of days. I am new to Android Studio and Android applications and was wondering if anyone knew how to help me.
This is the link to the site I am following: http://code.tutsplus.com/tutorials/create-a-custom-keyboard-on-android--cms-22615
I just figured out what needed to be done.
You have to edit the configurations and change the launch option to "nothing". This way it won't try to launch and activity that does not exist.
run->edit configurations then look for the launch options
Well you have answered it by yourself.
If you are creating an keyboard application(inputmethod) in android, everytime you compile and run your applcation, it will show a warning that there is no default activity since it's InputMethodService, the service. Even you add activity like some settings activity for your keyboard, it will still show you warnings and it's the normal operation.

How do I create an application without a main activity in android studio?

I am creating a live wallpaper in android studio. I do not want any UI besides the wallpaper, so my application contains no activities.
However, when I try to deploy to a device, I get the following error and my wallpaper will not load.
Could not identify launch activity: Default Activity not found
Error while Launching activity
How can I create an application which works that does not have a main activity?
It's perfectly fine to have no activities in your application. The build succeeds, Android Studio only fails when it tries to run it, because it doesn't know what to do.
You need to modify your run configuration. Go to "Run > Edit configurations" and under "Launch options" change "Default Activity" to "Nothing":

On all Android devices,when I press the home button

In my program's any activity ,I press the home button,and then in desktop press my app's icon,I saw the launch activity,not before activity.What happen on my app?
And I found if I use Android Studio run without sign,the app is run normally.A month ago,I move the codes from eclipse to AS,on eclipse IDE not found this problem.Can anybody help me? Very thx.
Maybe grammar errors,sorry.
EDIT:I found this is an Android bug https://code.google.com/p/android/issues/detail?id=26658
And the solution is https://code.google.com/p/android/issues/detail?id=26658#c14
If you are working on real device, make sure you didn't set the flag
Don't keep activities in Developer options.
On emulator check in running configurations that you launch the default activity.
On manifest check that you do not exclude your activities from recent.

run button opens a new AVM

I have troubles compiling my code with eclipse. Each time I click the run button it opens a new AVM.
I am starting to get lost in here any hint or solution please?
The run button in eclipse is designed to launch your code, which has to be done either in the AVM or on hardware connected to your computer. If you are wanting to build the binary without executing you go to the project menu and select Build All. However, it is probably set by default to build automatically, which is also under the project menu. Effectively this means the code you are writing is being built "on the fly" and errors will appear dynamically as you write your code. Is this what you were asking?

Categories

Resources