i migrate to eclipse to Android studio and install the latest version of Android studio 1.3 and i am using too many libraries projects and some of jar files. but now when i try to run this project its always show me
Picked up _JAVA_OPTIONS: -Xmx512M
Error:Execution failed for task ':app:preDexDebug'.
com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.7.0_79\bin\java.exe'' finished with non-zero exit value 3
i place there he write hat remove _JAVA_OPTION -Xm512 will remove app in you project but nothing happen. this is is below my gradle.
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.2.2'
}
}
apply plugin: 'android'
repositories {
mavenCentral()
}
android {
compileSdkVersion 22
buildToolsVersion '21.0.1'
defaultConfig {
applicationId "com.iptikarpromotion"
minSdkVersion 9
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.2.0'
compile files('libs/google-http-client-1.16.0-rc.jar')
compile files('libs/gson-2.1.jar')
compile files('libs/google-play-services.jar')
compile project(':libraries:ImageSliderLibrary')
compile project(':libraries:CircularImageView')
compile project(':libraries:GalleryViewLibrary')
}
And manifist is
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.iptikarpromotion" >
<permission
android:name="com.example.iptikarpromotion.permission.MAPS_RECEIVE"
android:protectionLevel="signature"></permission>
<uses-permission android:name="com.example.androidmapsv2.permission.MAPS_RECEIVE"/>
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-feature
android:glEsVersion="0x00020000"
android:required="true"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.CALL_PHONE" />
<application android:name="com.iptikarpromotion.utils.ApplicationData"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:largeHeap="true"
android:hardwareAccelerated="true"
android:theme="#style/AppTheme" >
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="AIzaSyBVgaZHjJmXd6pQNRISnzzSbEN0B3aJuns"/> <!-- bebug key= AIzaSyBVgaZHjJmXd6pQNRISnzzSbEN0B3aJuns -->
<activity
android:name=".activity.SplashActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".activity.LoaderActivity" android:screenOrientation="portrait"> </activity>
<activity android:name=".activity.HomeActivity" android:screenOrientation="portrait"> </activity>
<activity android:name=".activity.DetailActivity" android:screenOrientation="portrait"> </activity>
<activity android:name=".activity.WebviewActivity" android:screenOrientation="portrait"> </activity>
<activity android:name=".activity.MapActivity" android:screenOrientation="portrait"> </activity>
<activity android:name=".activity.GalleryViewActivity" android:screenOrientation="portrait"></activity>
<activity android:name=".activity.MyFavourateActivity" android:screenOrientation="portrait"></activity>
<activity android:name=".activity.MyAdsActivity" android:screenOrientation="portrait"></activity>
<activity android:name=".activity.ContactUsActivity" android:screenOrientation="portrait"></activity>
<activity android:name=".activity.OurServicesActivity" android:screenOrientation="portrait"></activity>
<activity android:name=".activity.QuicklyPickActivity" android:screenOrientation="portrait"></activity>
<activity android:name=".activity.AllCategoriesGridViewActivity" android:screenOrientation="portrait"></activity>
<activity android:name=".activity.AllCategoriesChildActivity" android:screenOrientation="portrait"></activity>
<activity android:name=".activity.PromotionActivity" android:screenOrientation="portrait"></activity>
</application>
</manifest>
This my jar files
gson-2.1.jar
google-play-services.jar
google-http-client-1.16.0-rc.jar
AndroidEasingFunctions-1.0.0.jar.
Thanks
Remove Java_option in Environment Variable of System of Windows. Exit Android Studio and run it again.
Related
Project is working fine and not gerenating any error message when Minimum SDK is set to 21, but this Error message occurs when i set it to 19.
Error:Execution failed for task ':app:processArmeabi-v7aDebugManifest'.
Manifest merger failed with multiple errors, see logs
I am sharing my gradle and Manifest file, Kindly guide me what i am doing wrong here.
Project Level build gradle File.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.3'
classpath 'com.google.gms:google-services:2.1.0'
classpath 'com.google.code.gson:gson:2.2.4'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
App Level Build Gradle File
apply plugin: 'com.android.application'
android {
splits {
abi {
enable true
reset()
include 'x86', 'armeabi-v7a'
universalApk true
}
}
compileSdkVersion 23
buildToolsVersion "23.0.3"
defaultConfig {
applicationId com.myapp.app
minSdkVersion 19
targetSdkVersion 23
versionCode 39
versionName "1.0"
multiDexEnabled true
ndk {
abiFilters "armeabi", "armeabi-v7a", "x86"
}
}
dexOptions {
javaMaxHeapSize "4g" //specify the heap size for the dex process
}
lintOptions {
abortOnError false
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
productFlavors {
}
}
dependencies {
compile 'com.squareup.okhttp:logging-interceptor:2.6.0'
compile 'org.glassfish:javax.annotation:10.0-b28'
compile 'com.android.support:appcompat-v7:23.3.0'
compile 'com.android.support:design:23.3.0'
compile 'com.google.maps.android:android-maps-utils:0.4'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.google.android.gms:play-services-maps:9.0.0'
compile 'com.google.android.gms:play-services-analytics:9.0.1'
compile 'com.google.android.gms:play-services-location:9.0.1'
compile 'com.google.android.gms:play-services-ads:7.5.0'
compile 'io.card:android-sdk:5.4.0'
compile 'it.sephiroth.android.library.targettooltip:target-tooltip-library:1.3.15'
compile 'com.github.michaelye.easydialog:easydialog:1.4'
compile 'com.google.android.gms:play-services:9.0.1'
}
Android Manifest File
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.App.MyApp">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.CALL_PHONE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<!-- GCM Permissions -->
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<application
android:name=".AnalyticsSampleApp"
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:largeHeap="true"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<service android:name=".application.services.LogoutService" />
<!-- GCM RECEIVER -->
<receiver
android:name="com.google.android.gms.gcm.GcmReceiver"
android:exported="true"
android:permission="com.google.android.c2dm.permission.SEND">
<intent-filter>
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<category android:name="com.App.MyApp" />
</intent-filter>
</receiver>
<service
android:name=".GoogleCloudMessaging.GcmService"
android:exported="false">
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
</intent-filter>
</service>
<!-- GCM RECEIVER -->
<activity
android:name=".MyAppMainActivity"
android:configChanges="orientation|keyboardHidden"
android:label="#string/app_name"
android:screenOrientation="portrait"
android:theme="#style/AppTheme.NoActionBar" />
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
<activity
android:name=".MapsActivity"
android:label="#string/title_activity_maps">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".SplashDefaultActivity" />
</activity>
<activity
android:name=".SplashDefaultActivity"
android:label="#string/app_name"
android:screenOrientation="portrait"
android:theme="#style/AppTheme.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".SplashVideoActivity"
android:label="#string/app_name"
android:screenOrientation="portrait"
android:theme="#style/AppTheme.NoActionBar" />
<activity
android:name=".VideosListActivity"
android:configChanges="orientation|keyboardHidden"
android:label="#string/title_activity_videos_list"
android:screenOrientation="portrait"
android:theme="#style/AppTheme" />
<activity
android:name=".VideoActivity"
android:configChanges="orientation|screenSize"
android:label="#string/title_activity_video"
android:theme="#style/AppTheme" />
<activity
android:name=".application.activities.taskMapActivity"
android:label="#string/task_map"
android:screenOrientation="portrait"
android:theme="#style/AppTheme" />
<activity
android:name=".application.activities.checkout.LoginActivity"
android:label="#string/checkout_login_Activity"
android:screenOrientation="portrait"
android:theme="#style/AppTheme" />
<activity
android:name=".application.activities.SectionsActivity"
android:label="#string/section_screen"
android:screenOrientation="portrait"
android:theme="#style/AppTheme" />
<activity
android:name=".application.activities.streetFullScreenActivity"
android:label="#string/street_full_screen"
android:screenOrientation="portrait"
android:theme="#style/AppTheme" />
<activity
android:name=".application.activities.streetFullScreenSectionActivity"
android:label="#string/street_full_screen_section"
android:screenOrientation="portrait"
android:theme="#style/AppTheme" />
<activity
android:name=".HomeActivity"
android:label="#string/title_activity_home"
android:screenOrientation="portrait"
android:theme="#style/AppTheme" />
<activity
android:name=".TestActivity"
android:label="#string/title_activity_test"
android:theme="#style/AppTheme" />
<activity
android:name=".gameActivity"
android:label="#string/title_activity_game_day"
android:parentActivityName=".MyAppMainActivity"
android:screenOrientation="portrait"
android:theme="#style/AppTheme.NoActionBar">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".SplashDefaultActivity" />
</activity>
<activity
android:name=".taskViewActivity"
android:label="#string/title_activity_task_view"
android:parentActivityName=".gameActivity"
android:screenOrientation="portrait"
android:theme="#style/AppTheme.NoActionBar">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.App.MyApp.gameActivity" />
</activity>
<activity
android:name=".TeamActivity"
android:label="#string/title_activity_team"
android:parentActivityName=".MyAppMainActivity"
android:screenOrientation="portrait"
android:theme="#style/AppTheme.NoActionBar">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".SplashDefaultActivity" />
</activity>
<activity
android:name=".LegalActivity"
android:label="#string/title_activity_legal"
android:screenOrientation="portrait"
android:theme="#style/AppTheme.NoActionBar" />
<activity android:name=".game.SimplestreetViewerActivity" />
<activity android:name=".game.insiderActivity" />
<activity android:name=".CoachesBioActivity" />
<activity
android:name=".TeamStandingsActivity"
android:label="#string/title_activity_team_standings"
android:theme="#style/AppTheme" />
<activity
android:name=".WebViews.Slider_News_View"
android:label="#string/title_activity_news__web__views"
android:screenOrientation="portrait"
android:theme="#style/AppTheme" />
<activity
android:name=".WebViews.MyAppGear"
android:label="#string/title_activity_MyApp_gear"
android:screenOrientation="portrait"
android:theme="#style/AppTheme" />
<activity
android:name=".ContactsActivity"
android:label="#string/title_activity_contacts"
android:screenOrientation="portrait"
android:theme="#style/AppTheme" />
<activity
android:name=".SettingsActivity"
android:label="#string/title_activity_settings"
android:screenOrientation="portrait"
android:theme="#style/AppTheme" />
<activity
android:name=".videonPlayerActivity"
android:configChanges="orientation|screenSize" />
<activity android:name=".LollipopVideoListActivity" />
<activity
android:name=".MyAppPromotionActivity"
android:label="#string/title_activity_MyApp_promotion"
android:theme="#style/AppTheme"
android:screenOrientation="portrait"
></activity>
</application>
</manifest>
Error Log
2016-09-29 18:03:52,218 [79526482] WARN - .tools.idea.model.ManifestInfo - getMergedManifest failed Manifest merger failed with multiple errors, see logs
2016-09-29 18:04:04,174 [79538438] INFO - pl.ProjectRootManagerComponent - project roots have changed
2016-09-29 18:04:28,192 [79562456] INFO - .diagnostic.PerformanceWatcher - Pushing properties took 0ms; general responsiveness: ok; EDT responsiveness: ok
2016-09-29 18:04:28,266 [79562530] INFO - .diagnostic.PerformanceWatcher - Indexable file iteration took 74ms; general responsiveness: ok; EDT responsiveness: ok
2016-09-29 18:04:29,657 [79563921] INFO - pl.ProjectRootManagerComponent - project roots have changed
2016-09-29 18:04:31,543 [79565807] INFO - .diagnostic.PerformanceWatcher - High memory usage (free 200 of 1246 MB) while dumping threads to C:\Users\taha\.AndroidStudio2.2\system\log\threadDumps-20160928-195850-AI-145.3276617\20160929-180431\threadDump-20160929-180431.txt
2016-09-29 18:04:39,732 [79573996] INFO - .diagnostic.PerformanceWatcher - Pushing properties took 3ms; general responsiveness: ok; EDT responsiveness: ok
2016-09-29 18:04:40,045 [79574309] INFO - .diagnostic.PerformanceWatcher - Indexable file iteration took 313ms; general responsiveness: ok; EDT responsiveness: ok
2016-09-29 18:04:40,045 [79574309] INFO - indexing.UnindexedFilesUpdater - Unindexed files update started: 10932 files to update
2016-09-29 18:04:47,545 [79581809] INFO - .diagnostic.PerformanceWatcher - Unindexed files update took 7500ms; general responsiveness: 0/24 sluggish, 17/24 very slow; EDT responsiveness: ok
2016-09-29 18:04:47,846 [79582110] WARN - .tools.idea.model.ManifestInfo - getMergedManifest failed Manifest merger failed with multiple errors, see logs
2016-09-29 18:04:48,529 [79582793] INFO - attrs.AttributeDefinitionsImpl - Found tag with unknown parent: AndroidManifest.AndroidManifestCompatibleScreens
2016-09-29 18:04:48,529 [79582793] INFO - attrs.AttributeDefinitionsImpl - Found tag with unknown parent: AndroidManifest.AndroidManifestSupportsInput
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="sam.gymnotes" >
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:theme="#style/NoActionBar" >
<meta-data
android:name="com.google.android.gms.version"
/>
<activity
android:name=".activity_ExcersiseView"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".dialog_new_excersise"
android:label="dialog_new_excersise"
android:theme="#style/Theme_Dialog" >
</activity>
<activity
android:name=".activity_IconChooser"
android:label="#string/title_activity_icon_chooser" >
</activity>
<activity
android:name=".activity_WorkoutView"
android:label="#string/title_activity_activity__workout_view" >
</activity>
<activity
android:name=".dialog_are_you_sure"
android:label="#string/title_activity_dialog_are_you_sure"
android:theme="#style/Theme_Dialog" >
</activity>
<activity
android:name=".activity_SetView"
android:label="#string/title_activity_activity__set_view" >
</activity>
<activity
android:name=".dialog_edit_workout"
android:label="#string/title_activity_dialog_date_picker"
android:theme="#style/Theme_Dialog" >
</activity>
<activity
android:name=".dialog_new_set"
android:label="#string/title_activity_dialog_new_set"
android:theme="#style/Theme_Dialog" >
</activity>
<activity
android:name=".dialog_edit_note"
android:label="#string/title_activity_dialog_edit_note"
android:theme="#style/Theme_Dialog" >
</activity>
<activity
android:name=".dialog_3option"
android:label="#string/title_activity_dialog_convert"
android:theme="#style/Theme_Dialog" >
</activity>
<activity
android:name=".activity_Info"
android:label="#string/title_activity_info" >
</activity>
</application>
</manifest>
The above is my manifest file, I have gone through numerous answers on here for a malformed manifest and I cannot figure out what the issue is. What is causing the 'Error while Installing APK'. All I get when trying to run is
pkg: /data/local/tmp/sam.gymnotes
Failure [INSTALL_PARSE_FAILED_MANIFEST_MALFORMED]
gradle;
apply plugin: 'com.android.application'
android {
compileSdkVersion 24
buildToolsVersion '24.0.0'
defaultConfig {
applicationId "sam.gymnotes"
minSdkVersion 14
targetSdkVersion 24
versionCode 4
versionName "1.1"
}
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:24.0.0'
compile 'com.android.support:design:24.0.0'
compile 'com.google.android.gms:play-services:9.2.0'
}
1) Put </manifest> in the end of the file.
2) Use following code for gms version
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
EDIT
try this answer
-> File
-> project structure
-> app
-> dependencies
-> click on +
-> library dependency
-> select play-services (October 2015: com.google.android.gms:play-services:7.8.0)
-> Rebuild
I'm trying to import a project in android studio but the gradle build is failing. I've been struggling for hours but can't get it to work. What should I do?
This is what the gradle console says:
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':azurMobile:processDebugManifest'.
Manifest merger failed with multiple errors, see logs
Try:
Run with --stacktrace option to get the stack trace. Run with --info or > --debug option to get more log output.
BUILD FAILED
Here's AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.viatom.azur"
android:versionCode="16"
android:versionName="02.04.02" >
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
<uses-permission android:name="android.permission.CHANGE_CONFIGURATION" />
<uses-sdk
android:minSdkVersion="12"
android:targetSdkVersion="21" />
<application
android:allowBackup="true"
android:icon="#drawable/icon"
android:label="#string/app_name"
android:theme="#style/AppBaseTheme" >
<activity
android:name="com.viatom.azur.activity.MainActivity"
android:label="#string/app_name"
android:configChanges="orientation|screenSize|fontScale|locale|layoutDirection">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.viatom.azur.activity.ECGMain"
android:label="#string/app_name"
android:configChanges="orientation|screenSize|fontScale|locale|layoutDirection">
</activity>
<activity
android:name="com.viatom.azur.activity.OtherInfo"
android:label="#string/app_name"
android:configChanges="orientation|screenSize|fontScale|locale|layoutDirection">
</activity>
<activity
android:name="com.viatom.azur.activity.ECGDetail"
android:label="#string/app_name"
android:configChanges="orientation|screenSize|fontScale|locale|layoutDirection" >
</activity>
<activity
android:name="com.viatom.azur.activity.ECGAnalyze"
android:label="#string/app_name"
android:configChanges="orientation|screenSize|fontScale|locale|layoutDirection"
android:screenOrientation="behind">
</activity>
<activity
android:name="com.viatom.azur.activity.DailyCheck"
android:label="#string/app_name"
android:configChanges="orientation|screenSize|fontScale|locale|layoutDirection">
</activity>
<activity
android:name="com.viatom.azur.activity.SPO2Main"
android:label="#string/app_name"
android:configChanges="orientation|screenSize|fontScale|locale|layoutDirection">
</activity>
<activity
android:name="com.viatom.azur.activity.TempMain"
android:label="#string/app_name"
android:configChanges="orientation|screenSize|fontScale|locale|layoutDirection">
</activity>
<activity
android:name="com.viatom.azur.activity.SLMMain"
android:label="#string/app_name"
android:configChanges="orientation|screenSize|fontScale|locale|layoutDirection" >
</activity>
<activity
android:name="com.viatom.azur.activity.SLMDetail"
android:label="#string/app_name"
android:configChanges="orientation|screenSize|fontScale|locale|layoutDirection">
</activity>
<activity
android:name="com.viatom.azur.activity.PedMain"
android:label="#string/app_name"
android:configChanges="orientation|screenSize|fontScale|locale|layoutDirection">
</activity>
<activity
android:name="com.viatom.azur.activity.AboutCheckme"
android:label="#string/app_name"
android:configChanges="orientation|screenSize|fontScale|locale|layoutDirection">
</activity>
<activity
android:name="com.viatom.azur.activity.AboutApp"
android:label="#string/app_name"
android:configChanges="orientation|screenSize|fontScale|locale|layoutDirection">
</activity>
<activity
android:name="com.viatom.azur.activity.SettingsActivity"
android:label="#string/app_name"
android:configChanges="orientation|screenSize|fontScale|locale|layoutDirection">
</activity>
<activity
android:name="com.viatom.azur.activity.Monitor"
android:label="#string/app_name"
android:configChanges="orientation|screenSize|fontScale|locale|layoutDirection">
</activity>
<activity
android:name="com.viatom.azur.activity.SpotCheck"
android:label="#string/app_name"
android:configChanges="orientation|screenSize|fontScale|locale|layoutDirection">
</activity>
<service android:name="com.viatom.azur.bluetooth.BTUtils">
<intent-filter>
<!-- 为该Service组件的intent-filter配置action -->
<action android:name="com.viatom.azur.BTUtils" />
</intent-filter>
</service>
<!-- 友盟统计 -->
<meta-data android:value="549a0bc4fd98c5dfb5000242" android:name="UMENG_APPKEY"></meta-data>
<meta-data android:value="Google Play" android:name="UMENG_CHANNEL"/>
</application>
build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "com.viatom.azur"
minSdkVersion 12
targetSdkVersion 21
ndk {
moduleName "adpcm_docode"
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
compile project(':library')
compile project(':mPChartLib')
compile project(':swipeMenuListView')
compile 'com.actionbarsherlock:actionbarsherlock:4.4.0#aar'
compile 'com.android.support:support-v4:21.0.0'
compile files('libs/umeng-analytics-v5.2.4.jar')
}
EDIT:
Logcat:
1:21:11 PM Executing tasks: [clean, :azurMobile:generateDebugSources, :azurMobile:generateDebugAndroidTestSources, :azurMobile:compileDebugSources, :azurMobile:compileDebugAndroidTestSources, :library:generateDebugSources, :library:generateDebugAndroidTestSources, :library:compileDebugSources, :library:compileDebugAndroidTestSources, :mPChartLib:generateDebugSources, :mPChartLib:generateDebugAndroidTestSources, :mPChartLib:compileDebugSources, :mPChartLib:compileDebugAndroidTestSources, :swipeMenuListView:generateDebugSources, :swipeMenuListView:generateDebugAndroidTestSources, :swipeMenuListView:compileDebugSources, :swipeMenuListView:compileDebugAndroidTestSources]
1:21:19 PM Gradle build finished with 1 error(s) in 8s 310ms
In the manifest file delete the commented other language codes
<!-- 为该Service组件的intent-filter配置action --> and <!-- 友盟统计 -->
and then build
You have problems with manifest merger...
Whenever you are trying to compile your project all of the other manifest are being put together for each module. You can find more informations from here and here
In other words, if you have more than one build types, their manifest will be merged. So you need to show us your project structre and all of the other manifest.
So we can understand whats wrong when its being merged.
On the other hand you can add versionName and versionCode to gradle
defaultConfig {
versionCode 16
versionName "02.04.02"
}
Also you may need to delete them from manifest.
I'm trying to add GCM to my app, so I'm following this guide.
But I'm getting unresolved symbol error on:
import android.support.v7.app.AppCompatActivity;
and on my R library
This is my manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.examplegcm"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="16"
android:targetSdkVersion="21" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WAKE_LOCK"/>
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE"/>
<uses-permission android:name="com.example.examplegcm.permission.C2D_MESSAGE"/>
<uses-permission android:name="com.google.android.c2dm.permission.SEND"/>
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<application
android:allowBackup="true"
android:icon="#drawable/logo"
android:label="#string/app_name"
android:theme="#style/MyTheme" >
<receiver
android:name="com.google.android.gms.gcm.GcmReceiver"
android:exported="true"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="com.example.examplegcm" />
</intent-filter>
</receiver>
<service
android:name="com.example.examplegcm.chatGCM.MyGcmListenerService"
android:exported="false" >
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
</intent-filter>
</service>
<service
android:name="com.example.examplegcm.chatGCM.MyInstanceIDListenerService"
android:exported="false">
<intent-filter>
<action android:name="com.google.android.gms.iid.InstanceID"/>
</intent-filter>
</service>
<activity
android:name=".MainApplication"
android:label="#string/app_name"
android:theme="#android:style/Theme.NoDisplay" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
...
</application>
</manifest>
Here are my gradles:
Top Level:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.2.3'
classpath 'com.google.gms:google-services:1.3.0-beta1'
}
}
allprojects {
repositories {
jcenter()
}
}
App:
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion '22.0.1'
defaultConfig {
applicationId "com.alaarami.letsrun"
minSdkVersion 16
targetSdkVersion 21
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
compile 'com.android.support:support-v4:21.0.3'
compile files('libs/slf4j-api-1.7.12.jar')
compile files('libs/slf4j-simple-1.7.12.jar')
apply plugin: 'com.google.gms.google-services'
compile 'com.google.android.gms:play-services:7.5.0'
}
Compile Sdk Version: 16
Build Tools Version: 22.0.1
jdk: 1.8
Installed SDK's:
UPDATE:
It's resolved... I dunno how. Didn't do anything
Add to your dependencies
compile 'com.android.support:appcompat-v7:21.0.3'
This is the artifact that contains AppCompatActivity.
I downloaded a library from github and imported it. I don't think it was done right. How to unimport it. I deleted the project from windows file explorer. Now when I build I get Task 'compileDebugSource' not found in project:BackgroundMailLibrary.
I just found that that lib is deprecated and want to use the new one. Please help.
.
I removed the library by clicking on it and selecting edit configuration and clicking the - mark. But am still getting the cross mark
build.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "23.0.0 rc2"
defaultConfig {
applicationId "com.prematixsofs.taxiapp"
minSdkVersion 15
targetSdkVersion 22
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:22.2.0'
compile files('libs/activation.jar')
compile files('libs/additionnal.jar')
//compile files('libs/mail.jar')
}
Manifest:
<?xml version="1.0" encoding="utf-8"?>
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.DISABLE_KEYGUARD" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-library android:name="com.google.android.maps" />
<service
android:name=".KioskService"
android:exported="false" />
<uses-permission android:name="android.permission.GET_TASKS" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppFullScreenTheme" >
<activity
android:name=".MainActivity"
android:label="#string/app_name"
android:windowSoftInputMode="adjustPan" >
</activity>
<activity
android:name=".RegisterActivity"
android:label="#string/title_activity_register"
android:windowSoftInputMode="adjustPan" >
</activity>
<activity
android:name=".BaseActivity"
android:label="#string/title_activity_base" >
</activity>
<activity
android:name=".LoginActivity"
android:label="#string/title_activity_login"
android:windowSoftInputMode="stateHidden" >
</activity>
<activity
android:name=".BlankActivity"
android:label="#string/title_activity_blank" >
</activity>
<activity
android:name=".DateVehiclePicker"
android:label="#string/title_activity_date_vehicle_picker" >
</activity>
<activity
android:name=".MailImage"
android:label="#string/title_activity_mail_image" >
</activity>
<activity
android:name=".EditUserDetails"
android:label="#string/title_activity_edit_user_details" >
</activity>
<activity
android:name=".DynamicTextViewActivity"
android:label="#string/title_activity_dynamic_text_view" >
</activity>
<activity
android:name=".SplashScreenActivity"
android:label="SplashScreen" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<service
android:name=".KioskService"
android:exported="false" />
<activity
android:name=".DisplayBookingHistory"
android:label="#string/title_activity_display_booking_history" >
</activity>
</application>
If it is a library dependence
go to file-->project structure-->on the right side tab select dependency and remove that
you can also remove it from you build.gradle file
if it is imported as a module
go to file-->project structure-->on top left corner click the (-) mark
In Android studio window,
Remove from File > Project Structure > Dependencies > - button. Then if it is still there you can remove the module by going to the settings.gradle file and removing it from the include line.
If you have disable run button than follow
Click Run on the menu and then Edit Configurations then click on Android Application on the left and click the + button. Choose Android Application from the pop-up menu. Then pick the module (its normally app or something like that). Then click apply and ok.
If you have more errors after that, try to re-import the project in Android Studio.