Is it possible to add your own private custom libraries as part of the library dependency that comes built into Android Studio?
The idea is that this can be a way to deliver libraries from our mobile library team to our app development team quickly and easily.
Related
I'm looking for some help to setup my Visual Studio for Mac project properly. I'm new to Visual Studio Mac and would appreciate a shove down the right road.
I have a large class library, originally developed in visual studio 2017 on Windows.I'd like to use much of that code to develop an iOS application. This class library requires references to:
System
System.Runtime.Serialization
System.ServiceModel
System.ServiceModel.Web
System.Web.
I have tried porting that code to a Portable Class Library in Visual Studio for Mac. However PCLs don't allow you to reference the above assemblies (unless I'm missing something).
So I then ported it to .NET Library project (Other -> .NET -> Library) project. However, my iOS app won't allow references to that project type because VS for Mac says it has an "Incompatible Target Framework: .NETFramework, Version-v4.6.1).
What project type should I be using for this class library so that it can reference the needed .NET assemblies and it can be referenced from my iOS application?
Possible options:
Use a different Portable Class Library (PCL) profile.
Use a .NET Standard project.
Use a shared project.
For everything apart from System.Web, there are PCL profiles that have the assemblies you are looking for. You can see which assemblies are available on the Mac by looking in the PCL directory:
/Library/Frameworks/Mono.framework/Versions/Current/lib/mono/xbuild-frameworks/.NETPortable
If you open a terminal window there you can run a search, find . -name "System.ServiceModel.Web.dll", or browse the folders using Finder to find a PCL profile that has the assemblies you need.
Another possibility would be to use a .NET Standard 2.0 project which has a lot of assemblies that can be used and supports being referenced by a Xamarin.iOS project. You may need to install some other System.* NuGet packages to provide the required assemblies.
The namespaces available in .NET Standard 2.0 are documented:
https://learn.microsoft.com/en-us/dotnet/api/?view=netstandard-2.0
Another option is using a shared project. This does not have assembly references itself but is basically shared code that is compiled into all projects that reference it. Here you can use #ifdefs for any code that is iOS or Android specific.
I am trying to setup an NDK library module structured very similar to the gen-libs module in the Android-NDK sample project. It identifies what I want in an Android NDK library module to allow me to incorporate 3rd party Native Libs:
src/main/cpp
CMakeLists.txt
Android manifest
build.gradle
I am NOT looking to add C or C++ source files to my app module.
Instead, I am looking to create an Android-NDK library module within Android Studio, so that I can incorporate 3rd Party Native Libs.
However, I am Unable to easily reproduce the structure of the gen-libs module in Android-NDK sample hello-libs.
More specifically, Android Studio does not provide any option to create a "New => Module => Android Library => Add NDK/C++ support"
I suppose I can recreate this NDK module manually, but before I do that, I would like to ask the community if, for a brand new project, is there any easy way to auto-create the gen-libs module structure from hello-libs beside manual method?
Feel free to use your copy/paste skills to produce the project manually. The wizard won't do it for you, at least for now.
You can also create an app project and switch it to library by changing one line in build.gradle.
You can also create a library module, right click on this module, and choose 'Link C++ Project with Gradle' from the popup menu (or from File menu).
I downloaded the cocos3.14.1 in the cocos2dx official website, and then use the online method to create a project structure, and then compiled out android
Studio version of "proj.android-studio", and finally with the android studio to the success of this project can also be run. But then how do I develop it? Map, event, interface, logic how to write?
After importing there will be an activty inheritance Cocos2dxActivity, and a package "org.cocos2dx.lib". But I do not know what to do
You have to write most of the game logic in C++ and keep your class files in "Classes" directory.
You would have to update the android project include these C++ files.
If you're using a mac, it is easier to develop it in Xcode, and build it for android in the last step. That way you can debug all the game logic in Xcode and simulator quickly.
In the project that is initially created, your game logic starts in the AppDelegate file (by setting things like the design resolution etc), and the first scene is the "HelloWorld" scene.
Since you're new to this, why not just purchase a book and get started, or read any of the many tutorials available online.
I created an Android client / appengine cloud endpoints server project with Android Studio. I would now like to generate the iOS Objective-C sources of the endpoint to use for an iOS port of the Android client. How can I generate the source? I cannot find the endpoints.sh or any other command line tools with the project. Also, the gradle sources for the endpoints plugin seems to have java-libs only hardcoded.
You can't generate an iOS client from Android. You need a computer with Xcode installed. See here. The endpoints SDK only allows Java client library generation, because of this, and also because most other clients are generated dynamically and/or external from the client generator service.
I am new to Xamarin. I have few confusion here.
Question:
How does Xamarin get the Native Look and Feel of the UI Components?.
Does Xamarin Provide their own Widgets [ like button, Layouts, ..].
Here is my understanding Correct me if I am wrong?.
1) Develop the UI [ button, layout...] by native SDK. For example iOS use Xcode. for Android ?.
2) Consider the button, when the button is pressed, the the code which is going to get executed
is common across the platform.
3) So, Since UI are directly from their respective SDK, we get the Native Look and Feel.
Kindly correct me where I misunderstood?.
I think you are way off.
Xamarin provides C# and the .Net (Mono) runtime on iOS and Android. At the same time they expose the native APIs on each platform to C#. So they built a way for C# to call into Objective-C and Java (and vice versa).
This means you develop native UIs on each platform, and can share backend business logic between platforms. A Xamarin app can share somewhere between 50-75% of its code across platforms. There is no general sharing of the UI across platforms, since this would abstract away the native APIs.
To break it down:
Android
Use Xamarin Studio or Visual Studio to develop your C# backend code
Use Xamarin's Android designer to layout native Android XML layouts
iOS
Use Xamarin Studio or Visual Studio* to develop your C# backend code
Use XCode on a Mac to layout storyboard or XIB files for native iOS UI layout
Both options you can create your UI from code as well, but the native APIs will be different on each platform.
*A mac is needed to compile for iOS