我将IntelliJ Idea 12.0.4升级到12.10.
现在,我的Android项目中的所有模块都会出错:
错误:找不到默认活动
我恢复到12.0.4并且它有效.
有任何想法吗 ??我认为它可能与一些未安装的插件有关,因为唯一的其他东西可能是本地配置,但我删除了配置文件夹以确认,并没有改变任何东西.
所以,我是Android和Java的初学者.我刚开始学习.我今天在试用Intent时遇到了错误.
Error:Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed with multiple errors, see logs
Run Code Online (Sandbox Code Playgroud)
我在这里找到了一些解决方案并试图实现它们,但它没有用.
这是我的build.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.0"
defaultConfig {
applicationId "com.example.rohan.petadoptionthing"
minSdkVersion 10
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'])
compile 'com.android.support:appcompat-v7:23.0.0'
}
Run Code Online (Sandbox Code Playgroud)
这是我的AndroidManifest:
<?xml version="1.0" encoding="utf-8"?>
Run Code Online (Sandbox Code Playgroud)
package="com.example.rohan.petadoptionthing" >
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name=".MainActivity"
android:label="@string/app_name" >
<intent-filter> …Run Code Online (Sandbox Code Playgroud) 在Eclipse中,我可以将源文件夹添加到我的android项目中作为"链接的源文件夹".如何在Android Studio中实现相同的功能?
或者是否可以添加外部文件夹来构建gradle?
这似乎是明显的合并错误.我正在尝试将现有代码移植到即时应用模块.我试过的是:
清空完成AppModule的清单:
在completeAppModule中添加了实现项目条目
实施项目(":udofy")
在基本模块中添加了以下条目:
android块中的baseFeature为true
依赖项中的应用程序项目(":fullModule")
我已经尝试重建/使缓存无效并重新启动/重新启动工作室但没有帮助.有人可以帮帮我吗?
每当我尝试运行我的应用程序时,屏幕截图中的这个窗口就会弹出我的屏幕.声明找不到默认活动,因为我无法部署我的应用程序
我的代码的清单文件
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.mcs.oodoeg" >
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name=".MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android3.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".MainActivity2"
android:label="@string/app_name" >
</activity>
<activity
android:name=".Sigin"
android:label="@string/app_name" >
</activity>
</application>
</manifest>
Run Code Online (Sandbox Code Playgroud)
这是在单击Run-> Edit Congiguration时获取的窗口,在 此处输入图像描述
我的代码的Gradle文件:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "19.1.0"
defaultConfig {
applicationId "com.example.mcs.oodoeg"
minSdkVersion 16
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions { …Run Code Online (Sandbox Code Playgroud)