Failure [INSTALL_PARSE_FAILED_MANIFEST_MALFORMED] - android

<?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

Related

Android Studio Installs Apk More Than Once

I developed an app and delete Junit tests implementation from my gradle file to remove the tests package. I'm not sure if was after that, but since, android studio doesn't install one, but four times my app, all are the same.
This is my 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="braziliancard.veraodedescontos_lojista">
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.CAMERA" />
<application
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher"
android:theme="#style/AppTheme"
android:allowBackup="true"
android:debuggable="true"
tools:ignore="HardcodedDebugMode">
<activity android:name=".SplashScreenActivity"
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=".MainActivity" 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=".LoginLojista" 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=".utils.ToolbarCaptureActivity" android:theme="#style/AppTheme.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<meta-data
android:name="preloaded_fonts"
android:resource="#array/preloaded_fonts" />
</application>
</manifest>
This is a screenshot of what is happening:
this is my gradle.file (app) file:
buildscript {
repositories {
google()
maven {
url "https://maven.google.com"
}
jcenter()
}
dependencies {
classpath 'me.tatarka:gradle-retrolambda:3.4.0'
}
}
apply plugin: 'com.android.application'
android {
//compileSdkVersion project.androidTargetSdk
compileSdkVersion 26
buildToolsVersion '28.0.3'
defaultConfig {
minSdkVersion 21
targetSdkVersion 26
versionCode 1
versionName "1.0"
}
def validConfig
def keystoreFile
def keystorePassword
def keystoreAlias
try {
Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())
keystoreFile = properties.getProperty('keystore.file')
keystorePassword = properties.getProperty('keystore.password')
keystoreAlias = properties.getProperty('keystore.alias')
validConfig = keystoreFile != null && keystorePassword != null && keystoreAlias != null;
} catch (error) {
validConfig = false
}
if (validConfig) {
System.out.println("Release signing configured with " + keystoreFile)
signingConfigs {
release {
storeFile project.rootProject.file(keystoreFile)
storePassword keystorePassword
keyAlias keystoreAlias
keyPassword keystorePassword
}
}
} else {
System.out.println("Specify keystore.file, keystore.alias and keystore.password in local.properties to enable release signing.")
}
buildTypes {
release {
if (validConfig) {
signingConfig signingConfigs.release
}
debug {
debuggable true
}
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
compileOptions {
targetCompatibility 1.8
sourceCompatibility 1.8
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.google.zxing:core:3.3.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.android.support:design:26'
implementation 'com.android.support:preference-v14:26+'
implementation 'com.android.support:support-v13:26+'
implementation 'com.burgstaller:okhttp-digest:1.17'
implementation 'net.sourceforge.jtds:jtds:1.3.1'
implementation 'com.sunmi:sunmiui:latest.release'
// implementation 'javax.mail:1.4.7'
implementation 'com.android.support:appcompat-v7:26+'
implementation 'com.android.support:design:26+'
implementation 'com.android.support:recyclerview-v7:26+'
implementation 'com.sun.mail:android-mail:1.6.2'
implementation 'com.sun.mail:android-activation:1.6.2'
// debugImplementation 'com.squareup.leakcanary:leakcanary-android:1.5'
// releaseImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.5'
implementation files('/lib/commons-email-1.5.jar')
implementation project(':zxing-android-embedded')
implementation files('/lib/additionnal.jar')
}
I copied the java folder, the layouts, and the AndroidManifest into another app who was working fine, but the android studio still install more than one time the app.
i guess is something about android manifest or gradle, but i have no idea of what. some tips?
You have the same number of shortcut as your number of launcher activities.
In most of the case, only one is needed
<?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="braziliancard.veraodedescontos_lojista">
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.CAMERA" />
<application
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher"
android:theme="#style/AppTheme"
android:allowBackup="true"
android:debuggable="true"
tools:ignore="HardcodedDebugMode">
<activity android:name=".SplashScreenActivity"
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=".MainActivity" android:theme="#style/AppTheme.NoActionBar"/>
<activity android:name=".LoginLojista" android:theme="#style/AppTheme.NoActionBar"/>
<activity android:name=".utils.ToolbarCaptureActivity" android:theme="#style/AppTheme.NoActionBar"/>
<meta-data
android:name="preloaded_fonts"
android:resource="#array/preloaded_fonts" />
</application>
</manifest>

App not installed android studio

I am developing an app for a long time and now I'm trying to install generated apk on my phone, but there is error occurs. But it works fine when I run it on emulator or wi-fi adb connection with the phone. I'm already read a lot of manuals, but nothing helps me yet. I have no slightest idea why it's happening.
Here is my manifest:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="ru.scapegoats.checkers">
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.INTERNET"/>
<application
android:allowBackup="true"
android:icon="#drawable/icon"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity android:name=".activity.game.Game" android:screenOrientation="portrait">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".activity.main.Main" />
</activity>
<activity android:name=".activity.bluetooth.BluetoothMenu" android:screenOrientation="portrait">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".activity.main.Main" />
</activity>
<activity android:name=".activity.session.SessionActivity" android:screenOrientation="portrait">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".activity.main.Main" />
</activity>
<activity android:name=".activity.createsession.CreateSessionActivity" android:screenOrientation="portrait">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".activity.internet.InternetMenu" />
</activity>
<activity android:name=".activity.properties.Properties" android:screenOrientation="portrait">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".activity.main.Main" />
</activity>
<activity android:name=".activity.internet.InternetMenu" android:screenOrientation="portrait">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".activity.main.Main" />
</activity>
<activity android:name=".activity.autorization.AutorizationActivity" android:screenOrientation="portrait">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".activity.main.Main" />
</activity>
<activity android:name=".activity.registration.RegistrationActivity" android:screenOrientation="portrait">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".activity.main.Main" />
</activity>
<activity android:name=".activity.main.Main" android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
<action android:name="android.intent.action.VIEW"/>
</intent-filter>
</activity>
</application>
</manifest>
Here is my build gradle file:
apply plugin: 'com.android.application'
android {
compileSdkVersion 'android-P'
buildToolsVersion '27.0.3'
defaultConfig {
applicationId "ru.scapegoats.checkers"
minSdkVersion 15
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
lintOptions {
checkReleaseBuilds false
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
}
}
ext {
androidSupportVersion = "27.0.1"
gmsVersion = "12.0.1"
retrofitVersion = "2.1.0"
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('androidx.test.espresso:espresso-core:3.1.0-alpha2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation 'androidx.appcompat:appcompat:1.0.0-alpha3'
testCompile 'junit:junit:4.12'
implementation 'org.florescu.android.rangeseekbar:rangeseekbar-library:0.3.0'
implementation "com.squareup.retrofit2:retrofit:${retrofitVersion}"
implementation "com.squareup.retrofit2:converter-gson:${retrofitVersion}"
implementation "com.squareup.retrofit2:adapter-rxjava:${retrofitVersion}"
implementation 'com.squareup.okhttp3:okhttp:3.10.0'
implementation 'com.squareup.okhttp3:logging-interceptor:3.5.0'
implementation 'io.reactivex.rxjava2:rxandroid:2.0.2'
implementation 'io.reactivex.rxjava2:rxjava:2.1.12'
implementation 'com.google.android.material:material:1.0.0-alpha3'
}
I'm tried to run the app on different devices but error always the same.
add android:testOnly="false" and android:debuggable="true" in your manifest section
<application
android:allowBackup="true"
android:icon="#drawable/icon"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/AppTheme"
android:testOnly="false"
android:debuggable="true">
after this clean and Rebuild your project and try to install your apk again.
hope it will work..!! it works for me.
I had changed my LAUNCHER activity to exported=false by mistake. Then removed it and fixed :).
I changed complileSdkVersion to 28 and now it's installs fine.
Build -> Build Bundle (s) / APK (s) -> Build APK (s)

Error type 3 - Error while Launching activity

It works fine in nougat and below. But gives Error type 3 - Error while Launching activity in Oreo. How can I fix it?
Manifest
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.zzz.com.z">
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<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" />
<application
android:allowBackup="false"
android:icon="#mipmap/logo_launcher"
android:label="#string/app_name"
android:largeHeap="true"
android:roundIcon="#mipmap/logo_round_launcher"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity
android:name=".MainActivity"
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=".LiveTrack"
android:label="#string/title_activity_live_track"
android:screenOrientation="portrait"
android:theme="#style/AppTheme.NoActionBar" />
<receiver
android:name=".YourActivityRunOnStartup"
android:enabled="true"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
<receiver
android:name=".ShutDownReceiver"
android:enabled="true"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.ACTION_SHUTDOWN" />
</intent-filter>
</receiver>
<service
android:name=".MyJobService"
android:permission="android.permission.BIND_JOB_SERVICE" />
</application>
</manifest>
Build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion "26.0.1"
defaultConfig {
applicationId "com.zzz.com.z"
minSdkVersion 21
targetSdkVersion 26
versionCode 1
versionName "1.01"
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:26.+'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:design:26.+'
compile 'com.google.android.gms:play-services-location:11.0.4'
compile 'com.android.support:support-vector-drawable:26.+'
testCompile 'junit:junit:4.12'
}
Error:
Error while executing: am start -n
"com.zzz.com.z/com.zzz.com.z.MainActivity" -a
android.intent.action.MAIN -c android.intent.category.LAUNCHER
Starting: Intent { act=android.intent.action.MAIN
cat=[android.intent.category.LAUNCHER] cmp=com.zzz.com.z/.MainActivity
} Error type 3 Error: Activity class
{com.zzz.com.z/com.zzz.com.z.MainActivity} does not exist.
Error while Launching activity
The problem could be in your Manifest file. Check AndroidManifest.xml file.
Check the presence of those intent-filters inside your Activity declaration. Like below.
<activity
android:name=".main.SplashScreenActivity"
android:label="#string/app_name"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
If this information is there, maybe some cache problem occurred. Then, try this:
Go to File -> Invalidate Caches / Restart...

Always show error picked up _JAVA_OPTION -Xmx512M in Android Studio

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.

How to unimport a project from android studio

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.

Categories

Resources