AndroidStudioでアプリHelloWorld+ライブラリ作成
1400 ワード
概要
AndroidStudioでアプリHelloWorld、ライブラリ作成してHelloworldAppからライブラリ内関数を呼ぶ。
環境
前の記事と同様
メモ
https://developer.android.com/studio/projects/android-library.html
https://github.com/TechBooster/AndroidSamples
本文
普通にHelloWorld作成する。Add New Moduleでライブラリを作成する。
その後、build.gradle(Module:app)のdependenciesタグに次を追加する。
implementation project(":AARPlugin")
dependencies {
implementation project(":AARPlugin") //!!!!
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.1'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
}
Author And Source
この問題について(AndroidStudioでアプリHelloWorld+ライブラリ作成), 我々は、より多くの情報をここで見つけました https://qiita.com/tangotarou2/items/9b6f3d38493d11bf5456著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .