7

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?

Fustigador
  • 6,339
  • 12
  • 59
  • 115

2 Answers2

4

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.

Nanoc
  • 2,381
  • 1
  • 20
  • 35
0

Invalidating the cache worked for me. Also this answer worked for me: https://stackoverflow.com/a/49805821/2024395

Akii
  • 81
  • 1
  • 4