I'm not a native android programmer, but I was told to learn the flow of native android code, when I wanted to run the project, I get a problem like below
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
Where: Build file '/home/pc2/Documents/android_native_project/app/build.gradle' line: 14
What went wrong: A problem occurred evaluating root project 'app'.
Plugin with id 'com.android.application' not found.
- Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. ==============================================================================
2: Task failed with an exception.
- What went wrong: A problem occurred configuring root project 'app'.
Could not get unknown property 'android' for root project 'app' of type org.gradle.api.Project.
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. ==============================================================================
Get more help at https://help.gradle.org
BUILD FAILED in 0s
below is build.gradle(module:app) and don't have build.gradle(project:android)
buildscript {
repositories {
maven { url 'https://plugins.gradle.org/m2/'}
}
dependencies {
classpath 'gradle.plugin.com.onesignal:onesignal-gradle-plugin:[0.12.8, 0.99.99]'
}
}
apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'
repositories {
maven { url 'https://maven.google.com' }
}
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
apply plugin: 'com.chrisney.enigma'
// Set Enigma options:
enigma.enabled = true
enigma.injectFakeKeys = true
enigma.ignoredClasses = ["id.comp.app"]
android {
compileSdkVersion 29
defaultConfig {
applicationId "id.comp.app"
minSdkVersion 21
targetSdkVersion 29
versionCode 5
versionName "1.0.5"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
ndk {
abiFilters 'armeabi-v7a','arm64-v8a','x86','x86_64'
}
}
buildTypes {
debug{
}
release {
minifyEnabled true
shrinkResources true
//debuggable true
signingConfig signingConfigs.tangerangKota
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
kapt {
generateStubs = true
}
lintOptions {
abortOnError false
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
dataBinding {
enabled = true
}
configurations {
implementation.exclude module:'protobuf-lite'
}
}
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
// Native android stuff
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation 'androidx.core:core-ktx:1.3.2'
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation "androidx.coordinatorlayout:coordinatorlayout:1.1.0"
implementation 'com.google.android.material:material:1.2.1'
implementation 'androidx.constraintlayout:constraintlayout:2.0.2'
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0"
implementation "androidx.recyclerview:recyclerview:1.1.0"
// Push notification
implementation platform('com.google.firebase:firebase-bom:25.12.0')
implementation 'com.google.firebase:firebase-analytics'
implementation 'com.google.firebase:firebase-messaging-ktx'
// UI
implementation 'de.hdodenhof:circleimageview:3.1.0'
implementation 'com.github.arcadefire:nice-spinner:1.4.5'
implementation "com.github.StephenVinouze.AdvancedRecyclerView:core:2.0.4"
implementation "com.github.StephenVinouze.AdvancedRecyclerView:pagination:2.0.4"
implementation "com.github.StephenVinouze.AdvancedRecyclerView:gesture:2.0.4"
implementation "com.otaliastudios:autocomplete:1.1.0"
implementation "com.mikepenz:iconics-core:5.1.0"
implementation 'com.mikepenz:fontawesome-typeface:5.9.0.0-kotlin@aar'
implementation 'com.mikepenz:material-design-iconic-typeface:2.2.0.8-kotlin@aar'
implementation 'com.chibde:audiovisualizer:2.2.0'
implementation 'com.github.mukeshsolanki:android-otpview-pinview:2.1.2'
implementation 'com.ebanx:swipe-button:0.8.3'
// Helpers
implementation 'com.github.esafirm.android-image-picker:imagepicker:2.3.1'
implementation 'com.schibstedspain.android:leku:7.2.0'
implementation 'id.zelory:compressor:3.0.0'
implementation 'com.evernote:android-job:1.2.6'
implementation 'com.github.barteksc:android-pdf-viewer:2.8.2'
implementation 'com.github.yalantis:ucrop:2.2.6'
//api 'com.theartofdev.edmodo:android-image-cropper:2.8.0'
implementation 'com.github.florent37:runtime-permission-kotlin:1.1.1'
// Webrtc
/*implementation 'com.github.nhancv:nc-android-webrtcpeer:2.1.0'
implementation ('com.hannesdorfmann.mosby3:mvp:3.1.1'){
exclude group: 'com.android.support'
}
//implementation project(':webrtcpeer')
implementation 'com.github.MrBin99:LaravelEchoAndroid:1.03'*/
// Image
implementation 'com.github.bumptech.glide:glide:3.7.0'
//kapt 'com.github.bumptech.glide:compiler:3.7.0'
// Db
implementation "androidx.room:room-rxjava2:2.3.0"
kapt "androidx.room:room-compiler:2.3.0"
debugImplementation 'com.amitshekhar.android:debug-db:1.0.6'
// Dependency injection
implementation "com.google.dagger:dagger:2.34"
kapt "com.google.dagger:dagger-compiler:2.34"
// ReactiveX
implementation "io.reactivex.rxjava2:rxjava:2.1.9"
implementation "io.reactivex.rxjava2:rxandroid:2.0.2"
// Parser
implementation 'com.google.code.gson:gson:2.8.2'
// Network
implementation 'com.amitshekhar.android:rx2-android-networking:1.0.2'
implementation 'com.squareup.okhttp3:okhttp:3.13.1'
implementation 'com.facebook.stetho:stetho:1.5.1'
implementation 'com.facebook.stetho:stetho-okhttp3:1.5.1'
implementation 'com.localebro:okhttpprofiler:1.0.8'
// Test
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
androidTestImplementation 'io.github.serpro69:kotlin-faker:1.4.1'
// view model
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.8"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.8"
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.2.0'
}
/*configurations {
cleanAnnotations
implementation.exclude group: 'org.jetbrains', module: 'annotations'
}*/
configurations.all {
resolutionStrategy {
force("org.antlr:antlr4-runtime:4.5.3")
force("org.antlr:antlr4-tool:4.5.3")
force("org.intellij:annotations:13.0")
}
}