i always use custom template on my own work to write less code
but on new version Android Studio 4.1 i can't find this directory ??
finally found a god way to automate my code and make custom template and modules
just by make a new android studio plugin
thank for Marcos Holgado for his topics and articles
you could find examples here
https://github.com/marcosholgado/plugin-app
and could learn more from this track
https://caster.io/courses/building-a-plugin-for-android-studio
Related
Is there a way to find duplicated (Copy/pasted code, repeated code) Kotlin code in Android Studio?
I have Android Studio 4.0 but can't find this "Duplicated code fragment" option.
Are there any Android Studio plugins that do this job for Kotlin?
You can install the sonarLint plugin.
It has many rules which are executed on source code to find possible issues like bugs or code smells.
This is done with the rules provided by default.
Other example of repetition:
Just need to install the sonarLint plugin in Preferences/Plugins:
A more advanced tool you could check is Gradle CPD plugin.
This is a Gradle plugin to find duplicate code using PMDs copy/paste detection (= CPD). You can find information about how to install it and how to use it in the same readme of the repository. CPD supports Kotlin since v6.10.0.
The above part is me trying to use the FuelManager class that I have implemented.
These are my implementations in my gradle file.
I am trying to make a dialogflow chat in my android app. I have followed this tutorial, https://code.tutsplus.com/tutorials/create-a-conversational-interface-for-android-with-dialogflow--cms-30845, but I seem to lose my way through the tutorial. I'm a beginner and I am not to used to using android studio and kotlin itself, please help. Thank You.
As mentioned in the docs Fuel's android package does not comes packed with the core package
Add the core package to your build.gradle file, and get the latest version 2.2.2 of both the library:
implementation 'com.github.kittinunf.fuel:fuel:2.2.2'
implementation 'com.github.kittinunf.fuel:fuel-android:2.2.2'
I'm struggling to use Sqlite.net Extensions in my Xamarin Android app.
I get the exeption:
Don't know about System.Collections.Generic.List`1 [app_name.Model.modelName]
The problem is similar to:
Sqlite extension is not working as expected
and
Use SQLiteNetextensions with Xamarin for Android-App
but the answers from there are not working for me and I can't add comments, so I have to start a new question.
I was trying to install different sqlite.net extensions packages and got no result.
Using SQLite.Net Extensions-PCL 2.0.0-alpha2 gives me such exeption:
System.IO.FileNotFoundException: Could not load assembly 'SQLite.Net, Version=3.0.5.0, Culture=neutral, PublicKeyToken='. Perhaps it doesn't exist in the Mono for Android profile?
I'm using Sql-net library:
https://www.nuget.org/packages/sqlite-net-pcl/
Does anyone has a final solution to this problem, please?
Edit:
I had to create a new project and paste everything in from the old one.
I don't think that answers the issue, but it's enough for me...
I'm using Sql-net library:
https://www.nuget.org/packages/sqlite-net-pcl/
The link here you give is the right lib, but you really installing this package? Cause you also said that you're installing SQLite.Net Extensions-PCL 2.0.0-alpha2.
Please try to install the package in the following screenshot, the latest stable version is 1.3.3:
I’m trying to add Realm to Xamarin project.
Project contain two platform-specific projects (Android and iOS) and PCL (.NET framework).
I can successfully add realm separately to each platform, but when I’m trying to move my code to PCL, I have an error “Fody not properly installed. PCLNamespace.MyRealmObject is a RealmObject but has not been woven.”.
I added NuGet Realm package to each project and PCL.
I tried Realm documentation FAQ “Failing to Weave”
and most of solutions from similar issue "Xamarin android Crash"
Non of that helped.
Finally I found what was blocking PCL to use realm. I’m posting an answer for those who would come across similar issue.
When I created new PCL I could add and use Realm without any errors. Making a diff of both PCLs give me an answer; faulty PCL had Microsoft.Bcl.Build packages, and when I delated it from project packages (via Xamarin Studio) that fix an issue.
Although I fix my issue, I’m not understanding how packages could block functionality of the other, so if somebody know an answer for that I would appreciate a comment:)
Thanks
Is your shared project a Shared Project or a PCL?
If it is a PCL, you also need to add the Realm NuGet to the PCL.
Does anyone have any idea where to look for android.support.multidex.MultiDexApplication in Xamarin? I am unable to find it anywhere (tried all support libraries).
To this date (30.11.2015) it doesn't reside anywhere (Xamarin's bugzilla has this issue filled in).
Please review this link "https://developer.xamarin.com/guides/android/advanced_topics/binding-a-java-library/binding-an-aar/"
For Windows, the path of the aar file may be in C:\Program Files (x86)\Android\android-sdk\extras\android\m2repository\com\android\support (multidex & multidex-instrumentation)
In my case, to extend the MultiDexApplication class, using VisualStudio 2015 and Xamarin, I needed to create a new project in the solution, as explained in the link. Later, it had access available in the Android project.