I compile my android application
everything pass OK
but when I try to debug my application on the mobile device (using eclipse) I get an error:
AndroidManifest is missing
this is strange as the file exist, and complication passes
For all developers who face this problem :
1. Click on your project -> Refresh (F5)
2. Go to "Project" in the menu bar -> Clean (and clean the project)
3. If all else fails, restart eclipse
Related
I'm working on a new app in AndroidStudio, everything was working fine, I was testing the app on my phone, etc.
Then at some point AndroidStudio gave me a popup in the lower right corner, something about Gradle. I didn't quite understand it, and hit Accept or something like that. Then suddenly something happened to all my projects in AndroidStudio (not just the one I was working on):
All build modules are gone.
I can't make any new build modules, because "Error: Gradle project sync failed. Please fix your project and try again". I never synced anything with Gradle previously, why do I suddenly need to do something like this?
Clicking "Sync project with Gradle files" doesn't work: "Plugin [id: 'com.android.application'] was not found in any of the following sources". Where does "com.android.application" even come from? I never added any plugins anywhere.
"Everything" is wrong in all my Java files, I even get "Cannot resolve symbol 'AppCompatActivity'" and "Cannot resolve method 'OnCreate(android.os.Bundle)'". Wtf?
All my Java files have this red symbol, which says "Java file outside of source root". Why are they suddenly in the wrong place?
Nothing is working anymore, restarting AndroidStudio doesn't change anything, switching project doesn't change anything, and where did my build modules go?
How do I make this go back to normal?
Try:
Build -> Clean Project and then Build again
File -> Invalidate cache/restart
check your run/debug configuration in the top toolbar, it should be app by default.
I was programming a fabric minecraft mod in intellij and when I ran the code it said :
Could not find or load main class net.fabricmc.devlaunchinjector.Main
When I compiled the code and tried it in minecraft it worked, but in intellij i couldn't run it.
I was messing around with the files, to see if I can fix it and I found a solution :
Go to "Run Configuration", press the arrow to see the options and tap "Edit
Configurations"
Go to "Minecraft Client" and press the button next to
"net.fabricmc.devlaunchinjector.Main"
search trough your external libraries and find "net.fabricmc.devlauncherinjector.Main"
(it must be right under net.fabricmc-api...) select it, and after that you should see
the "Edit Configurations" window. Press "OK"
If this doesn't work, right click the file and select "Copy Full Path". Then go to
"Edit Configurations" window and paste it where it says
"net.fabricmc.devlauncherinjector.Main"
If the 2 option doesn't work either, close the project, copy the mod folder, and paste
it somewhere else(eg. Desktop, New Folder). And then open your IDE, go to open project
and select the copied folder. Press the "Build.gradle" file and select open as project
and "Trust" .It should now work. If it doesn't , unfortunately I don't know how to fix
it.
thecoopsyt's answer worked for me.
Go to Gradle tab > Reload All Gradle Projects
Wait a few mins for it to check and update your dependencies.
After this I was able to return to testing my project in Intellij... had to fully compile and test before this fix.
In Intellij gradle if
this doesn't work you can put
downloadAssets runClient into a gradle config and it will start a client and download the net.fabricmc.devlauncherinjector.Main
this allows you to use gradles built in Minecraft Client
I have been trying to install crashlytics for the passed 6 hours with no succes.
The first time it started downloading some libraries but something went wrong and I had to delete them all again. I'm talking about the ones that it places in the lib folder it creates (not sure of the exact name of that folder).
After that it simply refuses to redownload them and just sits there on the "build and launch the app" window so it can "verify" its configuration.
So here's the issue, because it doesn't download the stupid libraries i can't import them in any of my classes or use them.
Fabric.with(this, new Crashlytics());
gives errors ofcourse because it can't resolve "Fabric" or "Crashlytics". Why the people at crashlytics don't give you the simple option to download the jar file(s) yourself is beyond me...
In any case, here's what I've tried:
uninstalling the eclipse plugin
searching for EVERY reference to fabric and crashlytics and deleting them if relevant
deleting all contents and whatnot
deleting eclipse's artifacts.xml file
Since it's a git project I even deleted all the project files, created a new git folder and pulled them again there.
manually attempt to put some of the jars from the plugin folder in my libs folder and adding them to my build path
but nothing works... help?
Follow the steps to integrate Crashlytics to application.
If it is first time then fabric will support you in doing the setup.
https://fabric.io/onboard given option to select SDK.
Select SDK and started integrating.
Successfully able to add plugin.
After SDK restarts, clicked on the Fabric toolbar button to start using Fabric!
Logged in -> Selected project -> selected kit to install.
Follow all the steps initiated by tools.
change of android-manifest file.
add code in the java class.
add shown code to kits.properties (Eg: com.crashlytics.sdk.android:crashlytics:2.2.2)
Final step will show you the done. (If you haven't done the three steps properly in step 6 then you can't be proceed further).
I have to build a Decision Support System, but dont have much experience in Java. So after I connected to MySql with Eclipse (with Connector/J) eclipse started to mess up my other projects. Now, when i try to run other projects in eclipse (that are not related to MySql, ex. Guessing Game) the following error message apperars:
Launch configuration DocsConnectionPropsHelper references non-existing project MySql connection test.
Can anyone help me to resolve this problem please?
UPDATE. it seems that when i press "RUN" elcipse is not running the project that im working with, but other
Your update indicates the issue is actually running the wrong project. To avoid that you may want to close projects you're not working on (right click them in package explorer and select close).
If you do need multiple projects open then when clicking the run icon (which defaults to re-run whatever was ran last among your open projects) make sure you have open in the editor window something that can be ran (and is from the project you want to run).
Then click the drop down arrow to the right of the icon. This will open up a small menu with options to change your build configurations or how it should run your program (i.e. as an application or on a server).
To solve the problem:
-click right botton on the project package you want to work on (run)
-choose Run As
-choose Run Configurations...
-choose DocsConnectionPropsHelper - if in the Project box you see not correct title just remove it. Also remove anything what is in the Main Class box.
-click Apply
-the best option is to close Eclipse and reopen it to make sure that all the settings were configured
It worked for me. Hopefully it will work for you too.
I've installed the Facebook API for Android in Eclipse, and imported the project into my Android project. My program builds perfectly fine, but when I try to run it I get
Could not find com_facebook_android.apk!
in the build window, and when the program actually tries to import any of the Facebook API classes it blows up with a java.lang.NoClassDefFoundError: com.facebook.android.Facebook
Probably you added the reference to the Java project in the "Java Build Path" but it's the wrong place.
From the Android guide:
To add a reference to a library project, follow these steps:
In the Package Explorer, right-click the dependent project and select Properties.
In the Properties window, select the "Android" properties group at left and locate the Library properties at right.
Click Add to open the Project Selection dialog.
From the list of available library projects, select a project and click OK.
When the dialog closes, click Apply in the Properties window.
Click OK to close the Properties window
This resolved my problem.
Check out referencing libraries instructions here:
http://developer.android.com/guide/developing/projects/projects-eclipse.html
Make sure you have the latest versions of ADT.
Try to clean your project in eclipse.
Hope this helps
In my case helped, not to have in the referenced projects checked Is Library
(Project Properties > Android)
I am also having issues with this error and have noted that if I run eclipse as root then the error disappears. This makes me think it is a permissions issue
So to help:
On the com Facebook android project right click > android tool > build and export
Then simply build the project into the bin folder of the Facebook project.
Problem solved
I had a similar problem. This was my resolution. I had to add android.jar as a reference.
Android samples error
If nothing works, try deleting the Facebook application for Android (if you have one installed on your phone). This worked for me.