So, i have a project in Android Studio, which I use in a plugin, which is used in an Ionic project, via an aar file. I generate the aar file by clicking in the right side of Android Studio, (where it says Graddle), expanding my project/task/build, and clicking in assemble release. The Graddle starts to work, and I have, in myProject/build/outputs/aar, an aar file. It was ok, for a time. I detected some errors in that code, corrected them, and generated the aar again.
Then, I take that aar file, copied it, and pasted in the folder specified in plugin.xml file:
<resource-file src="aar/library.aar" target="aar/library.aar" />
Then, I compile the project (the plugin, I should say) using packagr:
"packagr": "ng-packagr -p package.json && cd dist && npm pack && move *.tgz ../../"
This way, a tgz file is generated. after that, I go to the project root (the one that uses the plugin) and do
npm install @namespace/my-plugin-name
Everything looks ok. I run the project in a device...and the changes in the aar are not reflected.
Am I doing something wrong? Why are the changes not reflected?
Go to File > Project Structure in Android Studio. Select the app module in the Modules list on the left. Select the Dependencies tab. Click the + button on the lower left to add the dependency.
Add your AAR or JAR as a dependency To use your Android library's code in another app module, proceed as follows: Navigate to File > Project Structure > Dependencies. In the Declared Dependencies tab, click and select Jar Dependency in the dropdown. In the Add Jar/Aar Dependency dialog, first enter the path to your .
Just had the same exact problem and found a workaround.
I changed the aar name on the aar file and gradle file of the proyect importing the library and it finally is showing my changes
Im not sure why cleaning the proyect or even deleting the build folder was not making it work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With