how to create a dll of the project - android

Actually I am working on Xamarin.Forms Project in visual studio 2012.When I build the solution then it gives the following error-
Metadata file "Prject name.dll" could not be found.
How to overcome from this problem.

Close VS.
Delete all bin and obj folders in the project (pcl and platform).
Open VS and project.
Make sure you have all projects are selected on your build configurations.
Clean.
Rebuild.
See if that works.
Also what is the version of forms ? Does it happen if you try one of the templates file-> new project ?

Related

Xamarin.Forms Previewer - An android application project must reference a project containing this xaml file in order to render in the previewer

I'm getting the following error when trying to preview XAML documents via the Xamarin.Forms Previewer while in Visual Studio.
An Android Application project must reference the project containing
this xaml file in order to render in the previewer.
I've tried
Closing the XAML file and reopening
Verified the Java SDK path locations are correct
Clean and Rebuilding Solution
Im using Xamarin 4.5.0.486, Android SDK 7.3.1.2, Xamarin.iOS and Xamarin.Mac SDK 10.10, Visual Studio Community Version 2017
Check your android project and make sure the dll of your PCL/.net standard project is reference. In my own case, its referenced but shows a yellow color. I deleted the reference and re-reference by right clicking on the android project>projects>solution>select the PCL/.net standard project > ok
just check if your project structure fits the file system/ folder structure.
rename the folders to fit the project structure helped in my case.
like if your Android Shared Project name is : "AppBla.Shared" and your folder name is
"App4" or something.
i think my solution is help this problem.
it has two problem, one is the solution path, the other one is dll reference.
I'll explain it with the example program Todo(example forum).
first, you have to clean your solution path like below png
secondly, you have to clean your all project (Todo, Todo.android, Todo.ios...)
then, you'll be able to see warning at Todo.dll(in Todo.android referense)
then, you have to delete Todo.dll
and build your Todo project then will create new dll
finally, Add it('new dll') to Todo.anroid project reference and include a Todo project in your Todo.android project(Todo.android reference add-> project -> check Todo).
and restart visual studio
None of the suggestions here worked for me. Upgrading to VS 2019 solved it.
This solved my problem.
Right Click on the project
Click on Manage NuGet Packages
Click on the Update Tab
Select Xamarin.Forms and hit update
Update Xamarin.Forms NuGet Package
This problem can occur for a number of issues. Main problem is that for some reason Android's project can't build or be run inside Xamarin.
For me, the issue was that the latest JDK was not installed. My JRE was, but not JDK. Once I reinstalled JDK and restarted Visual Studio. All was well.

How to transform a project into an Android project

I put my Android Eclipse project in SVN and checked it out again on another computer. However, Eclipse seems to be missing something, because it is not seeing it as an Android project.
What files or settings do I need to set to transform my tree into an Android project?
Update removing the project and reloading it from SVN did the trick. No idea what file was reloaded though, or how to "fix" a project.
Eclipse has problem to recognize project as android project if you checkout from svn.
You need to do somthing like this:
1) Open new android project
2)delete from Your android project -this three files: .classpath / .project / .project.properties
3) add from new android project that you create this files.
4)clean and build your project

Android Studio Error "output path is not specified for modules"

I just recently upgraded to the newest version of Android Studio (0.1.1), but I also used Android Studio to relocate my project to my Dropbox folder. So, I'm not exactly sure which one is causing this problem. When I build or try to run my project I get this error:
Cannot start compilation: the output path is not specified for modules
"actionbarsherlock",
"EmPubLite-EmPubLite".
Specify the output path in Configure Project.
I can't find any reference to "Configure Project" and the Project Structure option under File no longer works in this release.
Solution for Android Studio version < 1.0 :
You just have to go to your Modules settings > Project and specify a "Project compiler output"
and make your modules inherit from project. (For that go to Modules > Paths > Inherit project.
Or you can specify your output for each module if you want.
In order to do so you just need to follow this steps:
Open Project structure (F4 on one of the modules in the project explorer)
Click on Project tab on the left
Define "Project compiler output:" as YOUR_PROJECT_PATH\out (or any folder you want)
Click on Modules tab on the left
Go over all your modules and verify that under the Paths tab the Compiler output is set to "Inherit project compile output path"
I ended up re-importing the project using Gradle and it's back to normal. Very weird issue.
this is a problem that I face in case I open my phonegap project with Android Studio and Webstorm.
They are IntelliJ-based project and I guess they are both writing the files in .idea
Reimporting the project is the solution.
got same error while using studio feature to import from GitHub repository.
I deleted the whole project and .. cloned it using git terminal and imported as new project ... studio prompted to add VCS root, accepted ....everything was fine afterwards. As #lordhong prompted.
I found this:
http://www.chrisdew.com/blog/2013/07/17/android-studio-nosuchmethoderror-lazystringarraylist/
it is realy help for me.
Thus, in my case, the problem was to have two libraries:
protobuf-2.4.1.jar
and new protobuf-2.5.0.jar
it resulted error:
APK path is not specified for module “Example-Example”
To correct this, rename file protobuf-2.4.1.jar to protobuf-2.4.1.jar.disabled
mv protobuf-2.4.1.jar protobuf-2.4.1.jar.disabled
How I finally managed to fix after hours!
File -> Project Structure -> Facets -> choose module's facet -> Packaging. Enter in APK Path absolute path to apk to be created: C:\workspace\MyCompany\MyProject\myProject.apk
Press ok and run your project

R.java not being generated for new Android project

When I create a new android project in Eclipse, and I choose to have a default main activity, my R.java file does not get generated.
I have seen some questions online and on this site about R.java not being generated but all are due to some manual action/mistake that had to be corrected during the development of the application.
However, does anyone know why R.java would not get generated for a brand new android project, where I have made no manual modifications whatsoever?
I think your problem is just the latest update of the SDK.
Test the following operations on two projects :
In the project properties (eclipse) -> java build path -> order and export make sure that all your jars in the libs folder are checked.
And "Android Tools -> Fix Project Properties"
And "Project -> Clean"
I hope you have helped!
ADT version 22 requires that you install "build tools". To get it to work i had to update:
SDK Tools
Platform Tools
Then install:
Build Tools
This link recommends you add build tools to your environment path. I had to do the following before the R.java was generated:
Append build tools to PATH environment variable
Restart Eclipse.
Make sure your project is free of errors and problems. You can use Windows-View to find and rectify them. Common mistakes are in the layout files.
Check the AndroidManifest file and see if the activity names match the classes in your source folder. Clean and rebuild.
R.java creates every time when you create android project first time r.java created by default
so check for the errors and clean the project.

Error: Android source build in eclipse

While trying to add android source to eclipse, I am getting the following errors.
Project 'android' is missing required library: 'out/target/common/obj/JAVA_LIBRARIES/gsf-client_intermediates/javalib.jar'
Project 'android' is missing required library: 'out/target/common/obj/JAVA_LIBRARIES/google-common_intermediates/javalib.jar'
FYI, I have built the source successfully with full_maguro-userdebug configuration (for Galaxy Nexus) before adding this to eclipse. Since I couldn't find "create project from existing source" in Eclipse Indigo, I changed the location of the project to the root directory of the source. I refreshed the project several times with same error.
How to solve this issue?
You should go to Project -> Properties -> Java Build Path.
There open tab Libraries.
In this tab out/target/common/obj/JAVA_LIBRARIES/google-common_intermediates/javalib.jar should be changed to out/target/common/obj/JAVA_LIBRARIES/android-common_intermediates/javalib.jar by selecting javalib.jar from google-common_intermediates, pressing Edit and selecting instead android-common_intermediates.
Entry with gsf-client_intermediates javalib.jar can be simply deleted.
A more comprehensive answer at here: https://groups.google.com/forum/?fromgroups=#!topic/android-platform/XIbR8ZKe7Tw
I would not recommend using eclipse for android source. Android is not a single project and it too big for an IDE like eclipse to handle.
Use simpler plain text editors like vim, emacs to browse the code

Categories

Resources