LoginSignup
0
1

More than 3 years have passed since last update.

Androidのライブラリ(aar)にライブラリ(aar)を入れて利用できるのか

Posted at

ライブラリ(aar)を入れたライブラリ(aar)を作ろうとしましたが・・・

〇結果

・普通にやってもできない!
・コンパイルは通るが依存関係が分からず、プロジェクトで利用するとライブラリ利用時にNoClassDefFoundErrorで落ちる
・android-fat-aarというライブラリを入れれば、依存関係をマージすることが可能だが、開発はすでに行われていなく、2年は更新されていない(https://github.com/adwiv/android-fat-aar)
・Mavenリポジトリに統合したaarと梱包されたaarをアップしてpom.xmlで依存関係を設定すればできるが、あまりスマートじゃない上に面倒
・統合したaarと梱包したaarをlibsに入れて両方にパスを通せば落ちなくなるが、これまたスマートじゃない

〇参考

Android Studio Create AAR using another AAR file and jar inside(stack overflow)
https://stackoverflow.com/questions/40405465/android-studio-create-aar-using-another-aar-file-and-jar-inside

〇最後に

妙案ありましたら教えてください

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1