"classes.dex not found. Try to rebuild project" in Android Studio - intellij-idea

I'm unable to build Android project using Android Studio 0.1.3. Everything worked fine until latest SVN update of the project. This is strange, because no settings were changed (SDK, dependencies etc.). I also didn't update any tools. I keep getting the error:
Android Packager: [trunk] File /home/matis/.AndroidStudioPreview/system/compile-server/apilot_f8e91252/android/intermediate_artifacts/trunk/classes.dex not found. Try to rebuild project
There are no errors in source code, I can build and deploy it on a device without problems using Eclipse. I'm using SDK rev. 17 with SDK Tools rev. 22.
I tried to build source from earlier SVN revision, but the same thing happens.
Has anyone else experienced similar problem? How can I solve it?
Update
After some investigation I found out that dx tool doesn't get called at all (I modified its script so it would create some file if run), but aapt is called properly.

Related

Antivirus warning in kotlin-util-io-1.6.21

I'm learning Kotlin and Spring Boot and recently am running into an antivirus warning about a file called oneeva.a!ml while building my project and gradle downloads kotlin-util-io-1.6.21.jar
org.gradle.internal.resolve.ArtifactResolveException: Could not download kotlin-util-io-1.6.21.jar (org.jetbrains.kotlin:kotlin-util-io:1.6.21)
This happens when I try to build a new Spring Boot project. No one else online seems to have encountered this before. Does anyone have any guidance?
edit: This problem occurs when creating a new spring initializer build using Gradle but not on Maven.
edit 2022-05-14: New gradle projects are working fine now without any differences in configuration
I also got the same issue after creating a new project on Android Studio Bumblebee | 2021.1.1 Patch 3 . I tried manually downloading kotlin-util-io-1.6.21.jar but it is getting blocked on my Windows machine due to some virus detected. Downgrading to kotlin-util-io-1.6.20 worked for me.
Got it resolved by updating your Windows Defender database through Windows Update.
I just updated antivirus database to the latest version, works again.
See: https://youtrack.jetbrains.com/issue/KT-52297

Intellij will not start with the error: "Error: Could not find or load main class com.intellij.idea.Main"

I killed an "idea" process in terminal after Intellij had frozen. The idea.sh script was missing after I killed the process (I ran a find command and checked other directories & the trash but no luck). I have since copied my friends "idea.sh" script into its former location. Now when I run ./idea.sh I get:
"Error: Could not find or load main class com.intellij.idea.Main".
I have tried searching for this class as well but got no results. Google has no info and I'm not very informed on Intellij.
Any hints on what I might need to do to avoid reinstalling Intellij?
I had the same issue after updating the android studio. I was not able to launch it from click on Android Studio icon and after running ./studio.sh it was giving me the same error
I do this to solve my issue
I downloaded the studio and install it in the new directory.
After installation success, copy all the files & folders and paste and replace it into the old location where the studio was installed.
And it is working fine.

Failed to retrieve NativeApplicationBuilder when running IBM MobileFirst 6.3 CLI

We're trying to build our IBM MobileFirst project on version 6.3 via the command line and we always get a BUILD FAILED:
C:\Program Files\IBM\MobileFirst-CLI\mobilefirst-cli\node_modules\generator-worklight-server\lib\build.xml:341: Failed to retrieve NativeApplicationBuilder
What is NativeApplicationBuilder? Is it a Java thing, or something else?
Java Version being used is 1.7.0_80 64-Bit.
The error ended up being because there was no common folder and we are running a hybrid app. Since we use a preprocessing script to build the common folder, it hadn't been run yet. Since there was no common folder, it looked for something native to build which didn't exist either. Therefore, we got the error.
I should have looked closer into the build.xml file where it reported the error. It made sense after I saw that.

Error migrating Worklight 5.0.6 project to 6.1

I am receiving an error trying to upgrade my Worklight project from v5.0.6 to v6.1. I have done all of the pre-migration steps, including removing Tealeaf libraries from the project and adding the new analytics settings to the initOptions.js file.
During the migration, it fails in the step where it is trying to add Worklight Analytics properties to the Worklight properties file. I am getting the following error:
Migrator class com.worklight.upgrader.upgraders.ios.AppAddAnalyticsIPhonePlistXMLUpgrader has failed
Migrating the bcbst_mma_app_wl project from version 5.0.6 to version 6.1.0.0 has failed because Failed reading bcbstmmaappwlMmaIphone-Info.plist
I am not sure what is causing the issue. I thought it may be file permissions since I am using a copy of the actual 5.0.6 project, but the permissions look fine. I have been able to "successfully" migrate the project before by removing that plist file before the upgrade, but the upgrade complained that the file was missing, and it never really worked correctly.
I am using the Consumer edition of Worklight, in case that makes any difference.
EDIT I got the migration to work. I did a chmod 777 on all of the files in the directory and it worked. Not an ideal solution, but it worked. Thanks to #mikerott for pointing me in the right direction.
Are you using a Mac? Often importing projects with the "copy into workspace" checkbox checked will result in files being placed with the Mac "locked" file permission bit set.
Please find the bcbstmmaappwlMmaIphone-Info.plist file in Finder, right-click -> Get Info. See if the "Locked" checkbox is checked. If so, uncheck it and see if you encounter the same problem.
You may have to do this with multiple files.

Worklight fails to install customization jar

I have three projects in my workspace, two deploy to the server correctly, the third has just begun to give this error:
Failed to install and start project customization from file <path>MyProj-customization.jar
I've seen this before on other projects and usually it's sufficient to start the server for another project and come back to the one with problems. When that doesn't work the next recipe (found on developer works) is
Exit Eclipse/Worklight Studio
Delete <workspace>/WorkLightServerHome
delete project bin
Start Studio, rebuild
That also doesn't work. Finally there's a further recipe on developer works
When Eclipse is not running, go to:
1. <path-to-your-Eclipse-folder>\configuration\org.eclipse.osgi
2. Delete the .bundle* files
3. Start Eclipse
4. Build and deploy
Again this does not clear the problem, assuming I've understood step 2 correctly, I found exactly one file whose name is of the form .bundle* and a bundles directory with several sub-directories. I deleted only the .bundlexxx file.
Any other suggestions?
I would have expected that creating a new workspace would fix it, but on this occasion no such luck.
No true solution on this occasion. Normally a new workspace as a method of last resot has always worked in the past. In this case I found no alternative to reinstallation of Worklight.
In addition to the attempts you have tried, also try creating a new workspace and import the 'offending' project to it.
If all fails, have a new instance of Eclipse (Java EE, 4.2.2 SR2), re-install Worklight Studio and import the project.