I am working on a checklist application and one error keeps leading to another. I was instructed to add
implementation 'androidx.recyclerview:recyclerview:1.1.0
and
`implementation com.google.android.material:material:1.1.0`
to my dependencies section within build.gradle (Module: app).
This resulted in the error
"Manifest merger failed : Attribute application#appComponentFactory value=(android.support.v4.app.CoreComponentFactory) from [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91 is also present at [androidx.core:core:1.1.0] AndroidManifest.xml:24:18-86 value=(androidx.core.app.CoreComponentFactory). Suggestion: add
'tools:replace="android:appComponentFactory"' to element at AndroidManifest.xml:5:5-19:19 to override."
So in AndroidManifest.xml I added
tools:replace="android:appComponentFactory"
to the top of my "application" element and I added
xmlns:tools="http://schemas.android.com/tools"
to the top of my manifest element. Now I am receiving multiple log errors that all seem to reference "Couldn't load memtrack module". This seems like an error that could be caused by many different factors. I'm having a lot of difficulty figuring this out and I'm wondering if I just messed up somewhere with my initial attempt to implement recyclerview and material. What should I be looking for to fix this?
build.gradle (Module: app)
apply plugin: 'com.android.application'
android {
compileSdkVersion 32
defaultConfig {
applicationId "com.example.timks.sanctuarychecklist"
minSdkVersion 23
targetSdkVersion 32
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:+'
implementation 'com.android.support.constraint:constraint-layout:2.0.4'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'com.google.android.material:material:1.1.0'
}
AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.example.timks.sanctuarychecklist">
<application tools:replace="android:appComponentFactory"
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
activity_main.xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="match_parent"
android:layout_width="match_parent">
<TextView
android:id="#+id/tasksText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textStyle="bold"
android:text="Sanctuary Inventory"
android:textSize="40dp"
android:textColor="#android:color/black"
android:layout_marginStart="30dp"
android:layout_marginBottom="16dp"
android:layout_marginTop="16dp"
/>
</RelativeLayout>
MainActivity.java
package com.example.timks.sanctuarychecklist;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
public class MainActivity extends AppCompatActivity {
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
}
Related
Like the title suggests, all of a sudden, my Android Studio projects simply can't locate any of my drawable resources that I call when using android:background="#drawable/serving_editor_background" for example, it'll just give me this error code for every single drawable that has been called:
AAPT: error: resource drawable/serving_editor_background (aka com.example.poop123:drawable/serving_editor_background) not found.
Execution failed for task ':app:mergeDebugResources'.
> com.android.build.gradle.tasks.ResourceException (no error message)
ParseError at [row,col]:[2,6]
Message: The processing instruction target matching "[xX][mM][lL]" is not allowed.
It literally does it for every single one (with their respective names and file path), all of the ones that used to work up until now, not a single one works, and I never changed anything in the gradle, but I'll still provide it:
plugins {
id 'com.android.application'
id 'com.google.gms.google-services'
}
android {
compileSdkVersion 30
buildToolsVersion "30.0.3"
defaultConfig {
applicationId "com.example.poop123"
minSdkVersion 23
targetSdkVersion 30
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
implementation 'androidx.appcompat:appcompat:1.3.1'
implementation 'com.google.android.material:material:1.4.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.1'
implementation 'com.ismaeldivita.chipnavigation:chip-navigation-bar:1.3.2'
implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.3.72'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.github.devlight.navigationtabstrip:navigationtabstrip:+'
implementation 'com.google.firebase:firebase-database:20.0.2'
implementation 'androidx.gridlayout:gridlayout:1.0.0'
implementation 'androidx.wear:wear:1.0.0'
testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
compileOnly 'com.google.android.wearable:wearable:2.6.0'
AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.poop123">
<uses-permission android:name="android.permission.WAKE_LOCK" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/Theme.Poop123">
<activity android:name=".EditAddition"></activity>
<activity android:name=".ConfirmAddition" />
<activity android:name=".Goal" />
<activity android:name=".ActivityLevel" />
<activity android:name=".newFoodMenu" />
<activity android:name=".foodLibrary" />
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
I'm getting really frustrated at this, because I changed absolutely nothing (just a specific XML code for a certain activity), and now none of the drawables can be found.
If any more info, let me know.
Bascially, I loaded up an old version of the project, copy pasted all the new code into the current project, noticed that on one of the drawable's, I had an extra
<?xml version="1.0" encoding="utf-8"?>
And for some reason it completely clogged up the whole thing, and the exception messages it gave, had 0 to do with it in a sense, had to manually find the problem myself.
First of all locate the drawable folder of your project and see the resources. if you found the resources try android:src="#drawable/resource"
Recently I had problems with AAPT2. The problems were caused by my username that contained non-ascii characters. I created another Windows account(without non-ascii characters) and installed Android Studio on it. Then I opened my older project and when AS asked me to update I agreed to that. Now when I try to build my app I get these errors:
Android resource linking failed
D:\Android_Studio\Praca\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values-v28\values-v28.xml:7: error: resource android:attr/dialogCornerRadius not found.
D:\Android_Studio\Praca\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values-v28\values-v28.xml:11: error: resource android:attr/dialogCornerRadius not found.
D:\Android_Studio\Praca\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:2970: error: resource android:attr/fontVariationSettings not found.
D:\Android_Studio\Praca\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:2971: error: resource android:attr/ttcIndex not found.
error: failed linking references.
Most of threads I found of StackOverflow suggest that this problem might be related to support library, they say that version of it might be wrong. How could I change the version? My project also uses OpenCV library and configuration of it might be invalid.
What I tried already was cleaning and rebuilding project and adjusting compileSDKVersion in Gradle.
Here is values-v28.xml file
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Base.Theme.AppCompat" parent="Base.V28.Theme.AppCompat"/>
<style name="Base.Theme.AppCompat.Light" parent="Base.V28.Theme.AppCompat.Light"/>
<style name="Base.V28.Theme.AppCompat" parent="Base.V26.Theme.AppCompat">
<!-- We can use the platform styles on API 28+ -->
<item name="dialogCornerRadius">?android:attr/dialogCornerRadius</item>
</style>
<style name="Base.V28.Theme.AppCompat.Light" parent="Base.V26.Theme.AppCompat.Light">
<!-- We can use the platform styles on API 28+ -->
<item name="dialogCornerRadius">?android:attr/dialogCornerRadius</item>
</style>
And here is Manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.kawa.praca">
<uses-feature
android:name="android.hardware.camera"
android:required="true" />
<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion="18" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity android:name=".Powitanie">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".Trening" />
<activity android:name=".Zdjecia" />
<provider
android:name=".DbProvider"
android:authorities="com.example.kawa.praca"
android:exported="true" />
<provider
android:name="android.support.v4.content.FileProvider"
android:authorities="com.example.android.fileprovider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="#xml/file_paths" />
</provider>
<activity android:name=".AddActivity" />
<activity android:name=".UserPanel" />
<activity android:name=".ScoringPanel" />
<activity android:name=".Scoring" />
<activity android:name=".NewPlanActivity" />
<receiver
android:name=".PlanReceiver"
android:enabled="true"
android:exported="true" />
<activity android:name=".ChartsActivity"></activity>
</application>
</manifest>
Also below is my build.gradle file app module. In this file in sub-clause 'dependencies' entries with support library are underlined and AS shows me a warning:
All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 28.0.0, 26.1.0. Examples include com.android.support:animated-vector-drawable:28.0.0 and com.android.support:customtabs:26.1.0
I tried changing versions to newer or older but this warning still appears.
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
defaultConfig {
applicationId "com.example.kawa.praca"
minSdkVersion 24
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner
"android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
sourceSets { main { jni.srcDirs = ['src/main/jni', 'src/main/jniLibs/'] }
}
// Encapsulates your external native build configurations.
externalNativeBuild {
// Encapsulates your CMake build configurations.
cmake {
// Provides a relative path to your CMake build script.
path "../CMakeLists.txt"
}
}
//buildToolsVersion '27.0.3'
buildToolsVersion '28.0.3'
productFlavors {
}
}
repositories {
maven { url 'https://jitpack.io' }
}
dependencies {
//implementation 'com.github.PhilJay:MPAndroidChart:v3.1.0-alpha'
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:animated-vector-drawable:28.0.0'
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support:customtabs:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.android.support:support-v4:26.1.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-
core:3.0.1'
implementation project(':openCVLibrary340')
//implementation 'com.jjoe64:graphview:4.2.2'
}
dependencies {
implementation 'com.android.support.constraint:constraint-layout:+'
}
I had the same error fixed it by updating the compilesdkversion to 28, since currently my build tools version is 28.0.3 , hence the version should be same as to have a perfect build.
Also check for your implementation 'com.android.support:appcompat-v7:28.0.0'
Change the respective Dependency versions to 28, it will prevent run time crashing
Recently after adding Firebase to my code it says "Program type already present"
full stack:
Error: Program type already present: com.firebase.client.android.AndroidCredentialStore
build.gradle app:
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
defaultConfig {
applicationId "com.example.user.candleclub"
minSdkVersion 23
targetSdkVersion 26
versionCode 1
versionName "1.0"
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support:cardview-v7:26.1.0'
implementation 'com.android.support:design:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.google.firebase:firebase-database:16.0.6'
implementation 'com.google.firebase:firebase-storage:16.0.5'
implementation 'com.google.firebase:firebase-auth:16.1.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.github.yukuku:ambilwarna:2.0.1'
implementation 'com.android.support:support-annotations:28.0.0'
// implementation 'com.github.kencheung4:android-StickerView:1.0.0'
implementation 'com.github.hotchemi:permissionsdispatcher:3.1.0'
annotationProcessor 'com.github.hotchemi:permissionsdispatcher-processor:3.1.0'
implementation project(':android-StickerView')
implementation 'com.vanniktech:emoji:0.5.1'
implementation 'com.vanniktech:emoji-ios:0.5.1'
implementation 'com.vanniktech:emoji-one:0.5.1'
implementation 'com.vanniktech:emoji-google:0.5.1'
implementation 'com.vanniktech:emoji-twitter:0.5.1'
implementation 'com.firebase:firebase-client-android:2.5.2'
implementation 'com.google.firebase:firebase-measurement-connector-impl:17.0.5'
implementation "android.arch.core:runtime:1.1.1"
implementation "android.arch.core:common:1.1.1"
implementation 'com.google.android.gms:play-services-location:16.0.0'
implementation 'com.google.android.gms:play-services-places:16.0.0'
implementation 'com.google.firebase:firebase-messaging:17.3.4'
implementation 'com.google.android.gms:play-services-maps:16.1.0'
implementation 'com.google.firebase:firebase-core:16.0.7'
}
apply plugin: 'com.google.gms.google-services'
project gradle:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.1'
classpath 'com.google.gms:google-services:4.1.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
manifest.xml:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.example.user.candleclub">
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.INTERNET" />
<meta-data
tools:replace="android:value"
android:name="android.support.VERSION"
android:value="26.1.0" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity android:name=".ChooseFrame" />
<activity android:name=".PrintActivity" />
<activity android:name=".MainMenu">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".MainActivity" />
</application>
</manifest>
Tried adding all kinds of dependencies but it didn't fix it. Anyone has an idea?
EDIT: After commenting out all Firebase dependencies there is no error. Does anyone know why? Is there a way to use Firebase's storage without the error?
I'm trying to use the fantastic card.io library to scan credit cards just like Über manages to do on my Moto X 2nd Gen and the library is not working. It gives the following output on Android Monitor:
I/card.io: card.io 5.4.2 09/27/2016 11:38:46 -0500
E/card.io: Failed to load native library: dlopen failed: cannot locate symbol "__aeabi_memcpy"
referenced by "/data/app/br.com.feliperochamachado.cardscantest-2/lib/arm/libcardioDecider.so"...
I/card.io: Processor not Supported. Skipping camera.
Since Über does work properly on this same phone, and it does use card.io, I believe it is a problem with my setup, but it is a very simple test app that only try to reproduce the barebones guidelines to get it working. Here is my gradle.build file:
apply plugin: 'com.android.application'
android {
compileSdkVersion 24
buildToolsVersion "24.0.0"
defaultConfig {
applicationId "br.com.feliperochamachado.cardscantest"
minSdkVersion 19
targetSdkVersion 24
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:24.1.1'
compile 'io.card:android-sdk:5.4.2'
testCompile 'junit:junit:4.12'
}
And here is my manifest.xml:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="br.com.feliperochamachado.cardscantest">
<!-- Permission to vibrate - recommended, allows vibration feedback on scan -->
<uses-permission android:name="android.permission.VIBRATE" />
<!-- Permission to use camera - required -->
<uses-permission android:name="android.permission.CAMERA" />
<!-- Camera features - recommended -->
<uses-feature android:name="android.hardware.camera" android:required="false" />
<uses-feature android:name="android.hardware.camera.autofocus" android:required="false" />
<uses-feature android:name="android.hardware.camera.flash" android:required="false" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<!-- Activities responsible for gathering payment info -->
<activity android:name="io.card.payment.CardIOActivity" android:configChanges="keyboardHidden|orientation" />
<activity android:name="io.card.payment.DataEntryActivity" />
</application>
</manifest>
The code that calls the scanning activity follows:
public void onScanPress(View v) {
Intent scanIntent = new Intent(this, CardIOActivity.class);
// customize these values to suit your needs.
scanIntent.putExtra(CardIOActivity.EXTRA_REQUIRE_EXPIRY, true); // default: false
scanIntent.putExtra(CardIOActivity.EXTRA_REQUIRE_CVV, false); // default: false
scanIntent.putExtra(CardIOActivity.EXTRA_REQUIRE_POSTAL_CODE, false); // default: false
// MY_SCAN_REQUEST_CODE is arbitrary and is only used within this activity.
startActivityForResult(scanIntent, MY_SCAN_REQUEST_CODE);
}
And my layout is very simple:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="#+id/activity_main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="#dimen/activity_vertical_margin"
android:paddingLeft="#dimen/activity_horizontal_margin"
android:paddingRight="#dimen/activity_horizontal_margin"
android:paddingTop="#dimen/activity_vertical_margin"
android:orientation="vertical"
tools:context="br.com.feliperochamachado.cardscantest.MainActivity">
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Scan Card"
android:onClick="onScanPress"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hello World!" />
</LinearLayout>
Clicking on the button will write the aforementioned warnings to the Android Monitor, skip using the camera altogether, and display a data entry form instead.
I can't find what is wrong. Perhaps the library SDK is not bundling the needed libs, but I don't even know where to look to check it out!
Importing the SampleApp inside the SDK into Android Studio 2.2.2 gives the same result!
I've commented on two issues on the card.io github projects:
https://github.com/card-io/card.io-Android-SDK/issues/166
https://github.com/card-io/card.io-Android-source/issues/100
The sample app worked fine on a Moto X 1st Gen device.
Since ÜBER does work correctly on my device, I've tried to downgrade the library version and it did work correctly with the version 5.4.0. Just had to change my gradle dependcies to this:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:24.1.1'
compile 'io.card:android-sdk:5.4.2'
testCompile 'junit:junit:4.12'
}
I'll be giving this feedback on card.io's issue tracker on github.
EDIT: It also works fine with version 5.4.1!
I have started learning android.
I am using Android Studio 1.5 and Java jdk 1.8.0_65.
I am sure that the environment variables path are properly set.
So what I try to do is, start android studio -> create new project -> select phone and tablet with minumum sdk API 8 -> add a blank activity -> finish
At first there are no problems, but when I try to change the theme to material light, this is the error I get,
I have tried clearing the cache and restarting, but it doesn't work
The app dependencies look like this
In the dropdown menu of Android version to use when rendering layouts in the IDE, I get only one option
The build.gradle file
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "com.example.jeet.myapplication"
minSdkVersion 8
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:design:23.1.1'
}
The AndroidManifest.xml file
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.jeet.myapplication">
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity
android:name=".MainActivity"
android:label="#string/app_name"
android:theme="#style/AppTheme.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
And if it helps, these are the packages installed in the SDK manager,
What should I do to solve these issues? I could use another theme, but I would like to understand the reason for these problems and solve them.
Your activity will be extending "AppCompatActivity" which requires that an appcompat theme need to be used. You can change it to "Activity" and try other themes.