0

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.

look at the cross mark on the app dropdown near the run button.

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>

Abhi
  • 1,512
  • 2
  • 22
  • 46

2 Answers2

0

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

Aniruddha K.M
  • 7,361
  • 3
  • 43
  • 52
  • yea..i removed it from the "app" dropdown button which is to the left of the run button and selected edit configuration and removed it using the - mark just after i posted the question. but i am still getting a cross mark(see image in edited question) – Abhi Feb 12 '16 at 05:25
0

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.

Amit Vaghela
  • 22,772
  • 22
  • 86
  • 142
  • check this link https://mobiarch.wordpress.com/2015/04/17/removing-support-library-in-android-studio/ @spongeBob – Amit Vaghela Feb 12 '16 at 05:28
  • yeah i did that Amit. Even removed from the settings.gradle. But I'm getting that cross mark. See the edited question – Abhi Feb 12 '16 at 05:30
  • you need to sync gradle file ,if getting cross @spongeBob – Amit Vaghela Feb 12 '16 at 05:30
  • how? an answer told me to go to tools->android->sync gradle. But i dont see that in my android studio – Abhi Feb 12 '16 at 05:35
  • check my udpdated answer @spongeBob – Amit Vaghela Feb 12 '16 at 05:48
  • http://stackoverflow.com/questions/18368748/android-studio-module-wont-show-up-in-edit-configuration – Amit Vaghela Feb 12 '16 at 06:03
  • select module which you want to run where in NO MODULE dropdown @spongeBob – Amit Vaghela Feb 12 '16 at 06:07
  • I created another project with same name and package and copied the java files and res files..without the library and put the new project in the location of the project with the problem. I'm getting `package com.prematixofs.taxiapp doesn't correspond to the file path com.prematixofs.taxiapp`. Can you tell me how to do this without an error...i replaced the project with error with the new project..with same package name,appname..what else should i change to make it work – Abhi Feb 12 '16 at 07:25
  • This is package doest belong to that file. fix import of your project – Amit Vaghela Feb 12 '16 at 07:46
  • hi..sorry. i named the new project with a wrong spelling. i changed it and it works now. thanks for trying to help – Abhi Feb 12 '16 at 09:04