I previously had a working android project when I was using IntelliJ IDEA 14. I could run the project by pressing the play button, and it would install and start the application on my device.
I recently updated to 14.1. The code still appears to compile fine, I can see that it generates an APK and I can view it in the output folder (out/production/myapp/myapp.apk), but now I get an error when I attempt to run the project:
Error:No main class for module: app
I've tried creating two new projects, one based on the Android->Application Module template and another based on the Android->Gradle: Application Module template, and both have the same issue - they spit out the error above with the default configuration.
I assume that this must work on other users boxes, particularly because I haven't found anything online or any bug reports about it, but I guess there is a very minute possibility that I'm the first one to find this.
Is this an issue with IntelliJ IDEA 14.1 or just my box? Any ideas on how to fix it or where to start would be greatly appreciated.
I was having similar issue.
Do you have haxe plugin installed? Try to uninstall and try after that and it should work.
Related
I need some help finding the Gradle build logs in Android Studio. I keep running into compatibility issues when adding new Android features to my apps. My latest one was adding Room db. My app compiles fine. I add the new dependencies in build.gradle and the app compiles fine again. As soon as I start trying to use Room I try to build my app it fails. I end up spending hours trying to troubleshoot my build.gradle files to find my errors. (This has happened a few times) The Error I got this time is:
org.gradle.api.GradleException: Compilation error. See log for more
details.
I can't find where the log is. I am using Android Studio Chipmunk in Fedora 36. I saw an old posts that showed a buttons and links to the logs. The posts were older and the users were on Windows and Mac-OS. I don't seem to have them in the Linux version. I can't be the only one running into this. This seems like such a novice issue but I have been looking for a while and can't find the answer. I don't know how to effectively troubleshoot this if I can't see the detailed errors. Any help is greatly appreciated.
My build.gradle logs are located in /tmp.
I found them by going to the Help menu then selecting Collect Logs and Diagnostic Data in Android Studio. This then gave me a popup with an option to Show in Files. The file that appears to contain the data is kotlin-daemon.timestamp.log where time stamp is going to by different for you.
I get this error in IDEA, but I don't want to use an Android SDK. I've been able to build and run just fine before, and one day I just opened my project like I usually do, and I started getting this error.
I'm working on a game with libgdx, and I've taken out all android dependencies (in the settings and build files). It has worked just fine before, how do I stop this error from happening?
Also, I can do ./gradlew desktop:build and ./gradlew desktop:run and everything works fine. So I'm guessing it's an IDEA thing...
Edit: In the suggested duplicate, the solution is to add a reference to the Android SDK. I don't want to use the Android SDK, so I can't use the solution on the suggested duplicate.
So I figured it out.
This was an IDEA problem, not a gradlew or LibGDX problem.
If someone wants to use LibGDX but without the Android SDK you need to do the following:
Remove 'android' from settings.gradle
Remove the android macro in the build.gradle
If you get the 'Android Pre Dex' error when trying to run in IDEA, you need to remove all Android references. It was under Project Structure -> Modules, one of the Modules will have an Android reference. Delete it, and you should be good to go!
I'm trying to build an empty HaxePunk project for Android to test the build chain, and while I'm never getting any error, all my attemps have crashed at run time with the same error message :
Error: dlopen failed: cannot locate symbol "stpcpy" referenced by libzlib.so...
I am running the executable on a pretty old phone with Android 4.3 on it ; a Sony Xperia M.
I have been doing a bit of research, and so far I mostly see the same things being repeated : update your NDK (I've been using the latest one from the android dev website and not the one lime setup android downloads), build for previous API versions (which I am also doing with <config:android target-sdk-version="18" /> in my project.xml file). So I don't know what I'm doing wrong, if anything.
Another thing I found is that I'm using the git version of HXCPP, and when I built the Android libs with neko build.n android in the project subdir, it was using -DHXCPP_ANDROID_PLATFORM=26 whereas the Lime build of my project is using -DHXCPP_ANDROID_PLATFORM=9, so that can't be good. However, I don't really know much about Android at all, but I have read that the SDK version and Android platform are two different things, or so I've read.
Any help with this will be much appreciated.
EDIT : Okay so something weird happened : up until now I was trying to install the APK manually by copying it to my phone's files and launching it from there, which kept crashing. I tried lime test android once without changing anything at all and it worked fine, and from then I could manually install the APK like I used to, and the error never happened again. I can't replicate it, but it's still an open case.
After importing my eclipse android app into android studio(Importing Non-Android-Studio project), I've tried to run the app on my phone.
No I'm facing:
Error type 3
Error: Activity class {com.abc.appname/com.abc.appname.MainActivity} does not exist.
I've searched and I've read every single article about this topic but couldn't resolve my problem.
Somehow android studio tries to find my package inside the package.
I've specified the launch activity in the run configuration by going trough the projects directory.
If I specify only the activity name as MainActivity it doesn't works because it request the whole package path.
The other stuff as modules and so on was autogenereted, but I couldn't find anything usefull in there.
Thanks in advance.
Same Problem for me was solved by lowering Compiling SDK from "M preview" to API 22 in Project Structure.
But first try uninstalling app in the emulator or device you are using.
I've also seen this when the app was already installed, but under a Work Profile. Deleting the app from the Work Profile first fixed it.
I have an Android application. In the latest version I've moved some code from it into separate Android Library projects (two). One library depends on another and project depends on both libraries. So, as I understand, one library includes into final application "twice" (or something similar to twice).
On the first launch of application I receive following in Console (I am using Eclipse):
Installation error: 0
Please check logcat output for more details.
Launch canceled!
Can anybody help?
Thanks!
EDIT
On the second launch program starts normally.
EDIT
I tried to reproduce error on the emulator and other device, it didn't reproduce! Can a problem be on my device? May be on file not deleted or something else?
I've reinstalled Android on my phone and problem solved :) Not a good solution, but works.