Error:Execution failed for task ':app:processDebugResources'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/volume1/Android Studio/android-sdk-linux/build-tools/23.0.2/aapt'' finished with non-zero exit value 1
gradle:
apply plugin: 'com.android.application'
android {
packagingOptions {
exclude 'META-INF/DEPENDENCIES.txt'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/dependencies.txt'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/LICENSE'
exclude 'META-INF/license.txt'
exclude 'META-INF/LGPL2.1'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/notice.txt'
}
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "com.ibussinesscard"
multiDexEnabled true
minSdkVersion 16
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'])
testCompile 'junit:junit:4.12'
// compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:appcompat-v7:23.1.0'
}
-- I have tried all possible solution available on stack-overflow and on Google..
-- I have issue in resolving imports..
--Rebuild or clean or changing buildToolVersion is not working for me
-- Restarting or build-->Make project is also not working for me
-- multiDexEnabled true is also not working
答案 0 :(得分:1)
I think that you should try to change: compile 'com.android.support:appcompat-v7:23.1.1' to compile 'com.android.support:appcompat-v7:23.0.2' It worked for me.
答案 1 :(得分:1)
添加
multiDexEnabled true
致电v7:23.1.0
试试这个
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "com.ibussinesscard"
minSdkVersion 16
targetSdkVersion 23
versionCode 1
versionName "1.0"
multiDexEnabled true
}
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:23.1.0'
}
然后 Clean-Rebuild-Sync
您的项目。
答案 2 :(得分:1)
import android.graphics.Typeface;
import android.support.design.widget.TabLayout;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.support.v4.view.ViewPager;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.widget.TextView;
import com.google.android.gms.analytics.Tracker;
import com.icrea.findmymacros.fragment.FMMHome_Fragment;
import com.icrea.findmymacros.fragment.MealDetailsWithExistUser_Fragment;
import com.icrea.findmymacros.fragment.MyProfile_Fragment;
import com.icrea.findmymacros.fragment.AddMeal_Fragment;
import com.icrea.findmymacros.app.AppController;
import com.icrea.findmymacros.fragment.PastMealSubmission_Fragment;
import java.util.ArrayList;
import java.util.List;
public class Home_Activity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
try {
super.onCreate(savedInstanceState);
}
}
使用Appcompact扩展您的主要活动
答案 3 :(得分:0)
As you are running linux the issue might because Permissions try to provide Read-write permission to your aapt. Try below steps.
- Open Terminal
- chmod +777 "/volume1/Android Studio/android-sdk-linux/build-tools/23.0.2/aapt"
- Enter.
Try to rebuild the project now.