2016-03-02 83 views
1
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這個:錯誤:較新:執行失敗的任務':app:dexDebug'。 com.android.ide.common.process.ProcessException

 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' 

} 

- 我曾嘗試對堆棧溢出,並在谷歌提供的所有可能的解決方案..

- 我有問題解決進口..

- 重建或清潔或更換buildToolVersion是不是爲我工作

- 重新啓動或建設 - >做的項目也沒有爲我工作

- multiDexEnabled真實也沒有工作

enter image description here

+0

'編譯「com.android.support擴展您的主要活動23.1.0'' –

+0

我已經添加multiDexEnable ..不工作 – tiger

回答

1

添加

  1. multiDexEnabled真正

  2. 呼叫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您的項目。程序兼容性-V7:

+0

@ IntelliJ Amiya ..不工作 – tiger

+0

'buildToolsVersion「23.0.1」' –

+0

yes ..我將buildToolsVersion更改爲23.0。 1 – tiger

1

我認爲你應該嘗試更改: 編譯'com.android.support:appcompat-v7:23.1.1' 來編譯'com.android.support:appcompat-v7:23.0.2' 它爲我工作。

+0

,,沒了..不工作 – tiger

0

當你運行的是Linux的問題可能是因爲權限儘量提供讀寫權限您AAPT。嘗試以下步驟。

  1. Open Terminal
  2. chmod +777 "/volume1/Android Studio/android-sdk-linux/build-tools/23.0.2/aapt"
  3. Enter.

試着現在重建項目。

+0

那麼我應該怎麼做才能解決 – tiger

+0

同樣的錯誤..... – tiger

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

+0

已經擴展與Appcompact – tiger

相關問題