[英]Android Manifest Default Activity not found
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
package="com.gmail.mansur.project">
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.Manifest.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission
android:name="android.permission.ACCESS_CACHE_FILESYSTEM"
tools:ignore="ProtectedPermissions" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.INSTALL_SHORTCUT" />
<uses-permission android:name="android.permission.UNINSTALL_SHORTCUT" />
<uses-permission android:name="android.permission.BROADCAST_STICKY" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<application
android:allowBackup="true"
android:hardwareAccelerated="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/mylogo"
android:supportsRtl="true"
android:theme="@style/AppTheme.NoActionBar"
tools:ignore="GoogleAppIndexingWarning"
>
<activity
android:name=".FirstActivity"
android:isScrollContainer="true"
android:label="@string/app_name"
android:screenOrientation="portrait"
android:theme="@style/Mansur"
android:windowSoftInputMode="adjustPan">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".MainActivity"
android:hardwareAccelerated="true"
android:isScrollContainer="true"
android:label="@string/app_name"
android:screenOrientation="portrait"
android:theme="@style/Mansur"
android:windowSoftInputMode="adjustPan">
</activity>
<activity
android:name=".StartActivity"
android:label="Bilgi Teknolojileri"
android:logo="@mipmap/mylogo"
android:screenOrientation="portrait"
android:theme="@style/AppTheme"
android:windowSoftInputMode="adjustPan"
tools:ignore="ExtraText" />
<service
android:name="com.example.myapplicationservices.MyApplicationService"
android:enabled="true"
android:exported="false" />
<!--android:stopWithTask="false"-->
</application>
</manifest>
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
release = [
versionName: "6.1.1",
versionCode: 6101
]
setup = [
compileSdk: 28,
buildTools: "28.0.3",
minSdk : 14,
targetSdk : 28
]
versions = [
androidX: '1.0.0',
constraintLayout: '1.1.3'
]
}
repositories {
google()
jcenter()
mavenCentral()
maven { url 'https://jitpack.io' }
maven {
url "https://maven.google.com"
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
// classpath 'com.android.tools.build:gradle:3.2.0'
}
}
allprojects {
repositories {
google()
jcenter()
mavenCentral()
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
maven {
url "https://maven.google.com"
}
}
}
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
multiDexEnabled true
applicationId "com.gmail.mansur.project"
minSdkVersion 22
targetSdkVersion 28
versionCode 1
versionName '1.1'
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
// setProperty("archivesBaseName", "MaterialDrawer-v$versionName-c$versionCode")
}
buildTypes {
// debug {
// applicationIdSuffix ".debug"
// versionNameSuffix "-DEBUG"
// try {
// signingConfig signingConfigs.debug
// } catch (ex) {
// }
// minifyEnabled false
// }
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/notice.txt'
exclude 'META-INF/android.support.design_material.version'
exclude 'META-INF/androidx.localbroadcastmanager_localbroadcastmanager.version'
exclude 'META-INF/androidx.transition_transition.version'
exclude 'META-INF/androidx.appcompat_appcompat.version'
exclude 'META-INF/androidx.swiperefreshlayout_swiperefreshlayout.version'
exclude 'META-INF/androidx.cursoradapter_cursoradapter.version'
exclude 'META-INF/androidx.drawerlayout_drawerlayout.version'
exclude 'META-INF/androidx.print_print.version'
exclude 'META-INF/androidx.versionedparcelable_versionedparcelable.version'
exclude 'META-INF/androidx.interpolator_interpolator.version'
exclude 'META-INF/androidx.fragment_fragment.version'
exclude 'META-INF/androidx.customview_customview.version'
exclude 'META-INF/androidx.documentfile_documentfile.version'
exclude 'META-INF/androidx.legacy_legacy-support-core-utils.version'
exclude 'META-INF/androidx.vectordrawable_vectordrawable.version'
exclude 'META-INF/androidx.loader_loader.version'
exclude 'META-INF/androidx.viewpager_viewpager.version'
exclude 'META-INF/androidx.asynclayoutinflater_asynclayoutinflater.version'
exclude 'META-INF/androidx.recyclerview_recyclerview.version'
exclude 'META-INF/androidx.core_core.version'
exclude 'META-INF/proguard/androidx-annotations.pro'
exclude 'META-INF/androidx.vectordrawable_vectordrawable-animated.version'
exclude 'META-INF/androidx.slidingpanelayout_slidingpanelayout.version'
exclude 'META-INF/androidx.cardview_cardview.version'
exclude 'META-INF/androidx.coordinatorlayout_coordinatorlayout.version'
exclude 'META-INF/androidx.legacy_legacy-support-core-ui.version'
exclude 'META-INF/com.google.android.material_material.version'
}
repositories {
maven { url 'https://jitpack.io' }
maven { url "http://clojars.org/repo" }
}
compileOptions {
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_1_8
}
buildToolsVersion '28.0.3'
productFlavors {
}
// lintOptions {
// abortOnError false
// }
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
// implementation 'com.android.support:appcompat-v7:28.0.0'
// implementation 'com.android.support:appcompat-v7:28.0.0-alpha1'
// implementation 'com.android.support:design:28.0.0-alpha1'
// implementation 'com.android.support:design:28.0.0'
// implementation 'com.android.support:support-v4:28.0.0-alpha1'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation project(':myapplicationwebapi')
implementation project(':myapplicationservices')
implementation 'com.android.support:recyclerview-v7:28.0.0'
implementation 'de.hdodenhof:circleimageview:2.2.0'
implementation 'com.github.leinardi:FloatingActionButtonSpeedDial:master-SNAPSHOT'
implementation 'com.kaopiz:kprogresshud:1.2.0'
implementation 'com.yarolegovich:lovely-dialog:1.1.0'
implementation 'com.muddzdev:styleabletoast:2.1.2'
implementation 'com.annimon:stream:1.2.1'
implementation project(':recyclerrefreshlayout')
implementation 'com.android.support:support-annotations:28.0.0'
implementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.android.support.test:runner:1.0.2'
implementation 'com.mikepenz:materialdrawer:6.1.1'
implementation 'com.google.android.material:material:1.0.0'
implementation "com.google.android.material:material:${versions.androidX}"
implementation "androidx.appcompat:appcompat:${versions.androidX}"
implementation "androidx.recyclerview:recyclerview:${versions.androidX}"
implementation "androidx.cardview:cardview:${versions.androidX}"
implementation "androidx.constraintlayout:constraintlayout:${versions.constraintLayout}"
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.github.bumptech.glide:glide:3.8.0'
// the sample uses more advanced functions of the fastadapter
// https://github.com/mikepenz/FastAdapter/
implementation 'com.mikepenz:fastadapter-commons:3.3.0'
// used to generate the Open Source section
// https://github.com/mikepenz/AboutLibraries
implementation 'com.mikepenz:aboutlibraries:6.2.0'
//used to provide different itemAnimators for the RecyclerView
//https://github.com/mikepenz/ItemAnimators
implementation 'com.mikepenz:itemanimators:1.1.0'
// used to provide the MiniDrawer to normal Drawer crossfade effect via a SlidingPane layout
// --> https://github.com/mikepenz/MaterialDrawer/blob/develop/app/src/main/java/com/mikepenz/materialdrawer/app/MiniDrawerActivity.java
// https://github.com/mikepenz/Crossfader
implementation 'com.mikepenz:crossfader:1.6.0'
// used to provide the two step crossfade DrawerLayout. Which allows to have a mini layout which transforms to a normal layout within the drawer
// --> https://github.com/mikepenz/MaterialDrawer/blob/develop/app/src/main/java/com/mikepenz/materialdrawer/app/CrossfadeDrawerLayoutActvitiy.java
// https://github.com/mikepenz/CrossfadeDrawerLayout
implementation('com.mikepenz:crossfadedrawerlayout:1.1.0')
implementation 'com.mikepenz:google-material-typeface:3.0.1.3.original@aar'
implementation 'com.mikepenz:fontawesome-typeface:5.3.1.1@aar'
implementation 'com.mikepenz:octicons-typeface:3.2.0.5@aar'
//font
implementation 'com.mikepenz:material-design-iconic-typeface:2.2.0.5@aar'
implementation 'com.mikepenz:meteocons-typeface:1.1.0.5@aar'
implementation 'com.mikepenz:community-material-typeface:2.7.94.1@aar'
implementation 'com.mikepenz:weather-icons-typeface:2.0.10.5@aar'
implementation 'com.mikepenz:typeicons-typeface:2.0.7.5@aar'
implementation 'com.mikepenz:entypo-typeface:1.0.0.5@aar'
implementation 'com.mikepenz:devicon-typeface:2.0.0.5@aar'
implementation 'com.mikepenz:foundation-icons-typeface:3.0.0.5@aar'
implementation 'com.mikepenz:ionicons-typeface:2.0.1.5@aar'
implementation 'com.mikepenz:pixeden-7-stroke-typeface:1.2.0.3@aar'
implementation 'com.nikhilpanju.recyclerviewenhanced:recyclerviewenhanced:1.1.0'
// implementation 'org.jetbrains:annotations:15.0'
}
configurations.all {
resolutionStrategy.force "com.mikepenz:iconics-core:3.1.0"
resolutionStrategy.force "com.mikepenz:fastadapter:3.3.0"
resolutionStrategy.force "com.android.support:support-v4:${versions.androidX}"
resolutionStrategy.force "com.android.support:appcompat-v7:${versions.androidX}"
resolutionStrategy.force "com.android.support:cardview-v7:${versions.androidX}"
resolutionStrategy.force "com.android.support:recyclerview-v7:${versions.androidX}"
resolutionStrategy.force "com.android.support:design:${versions.androidX}"
resolutionStrategy.force "com.android.support:support-annotations:${versions.androidX}"
}
I have tried: 我努力了:
1-İnvalidate Caches / Restart 2-Check Filter intent 3-Manifest delete after created 4-Clean Project/Rebuild Project 1-禁用缓存/重新启动2-检查过滤器的意图3-创建清单后删除清单4-清理项目/重建项目
I couldn't find the solution to the problem , i did sync gradle but not improved. 我找不到该问题的解决方案,但我确实同步了gradle但没有改进。 Also added in manifest "" didn't work again :) 还添加在清单“”中不再起作用:)
Help me thank you :) 帮我谢谢你:)
You could move 你可以移动
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
to another activity, and click File -> Invalidate Caches / Restart...
, then clicking on Invalidate and Restart
. 到另一个活动,然后单击File -> Invalidate Caches / Restart...
,然后单击Invalidate and Restart
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.