2015-05-25 19 views
0

我改變了我的階梯compileSdkVersion從21到22並忘了它,一天後我插入我的手機,並希望調試我的應用程序,試圖安裝後一旦我得到這個消息:更改build.gradle現在無法安裝應用程序刪除faild內部錯誤

Installation failed since the device possibly has stale dexed jars that don't match the current version (dexopt error). In order to proceed, you have to uninstall the existing application.

WARNING: Uninstalling will remove the application data!

Do you want to uninstall the existing application?

,打了 「確定」 按鈕後,我得到這個錯誤:

DEVICE SHELL COMMAND: pm uninstall com.themeteam.roeikashi DELETE_FAILED_INTERNAL_ERROR

這是我的gradle這個文件

apply plugin: 'com.android.application' 

android { 
    compileSdkVersion 21 
    buildToolsVersion "21.1.2" 

    defaultConfig { 
     applicationId "com.themeteam.roeikashi" 
     minSdkVersion 15 
     targetSdkVersion 21 
     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.1.1' 
    compile 'com.android.support:support-v4:13.0.+' 
    compile 'com.parse.bolts:bolts-android:1.+' 
    compile fileTree(dir: 'libs', include: 'Parse-*.jar') 
    compile 'com.github.clans:fab:1.5.0' 
    compile 'com.squareup.picasso:picasso:2.5.2' 
    compile 'com.android.support:cardview-v7:22.1.1' 
    compile 'com.android.support:recyclerview-v7:22.1.1' 
} 

我可以使用一些幫助來做什麼,因爲我刪除了所有可以找到與我的應用程序有連接的文件,而且這似乎不起作用。 我也將我的compileSdkVersion更改爲21,但無效。 在此先感謝!

+0

你試過手動卸載應用程序? – kingston

+0

你需要手動卸載apk,我同意@herschel,稍後再安裝 – Aspicas

+0

應用程序不會在設備上存在 –

回答

1

問題出在gradle文件中,compileSdkVersion意外地從21更改爲22,所以我不得不將它更改回來,將buildToolVersion和目標sdk版本更改爲最新版本。

評論是關閉的,我最終刪除了所有手機緩存的數據,因爲我的應用程序確實在手機本身保存了一些數據,並沒有奏效。 剛剛發生在我身上,我應該使用最新版本,並修復它。

這裏的新gradle這個

apply plugin: 'com.android.application' 

android { 
    compileSdkVersion 22 
    buildToolsVersion "22.0.1" 

    defaultConfig { 
     applicationId "com.themeteam.roeikashi" 
     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.1.1' 
    compile 'com.android.support:support-v4:13.0.+' 
// compile 'com.parse.bolts:bolts-android:1.+' 
// compile fileTree(dir: 'libs', include: 'Parse-*.jar') 
    compile 'com.melnykov:floatingactionbutton:1.3.0' 
    compile 'com.squareup.picasso:picasso:2.5.2' 
    compile 'com.android.support:cardview-v7:22.0.0' 
    compile 'com.android.support:recyclerview-v7:22.0.0' 
} 
相關問題