function sendEmail(){
var openSpreadSheet = SpreadsheetApp.openById("<<YOUR SPREADSHEET ID>>").getSheetByName("Sheet1");
var data = openSpreadSheet.getRange(2,1,openSpreadSheet.getLastRow()-1,4).getValues();
for(var i=0;i<data.length;i++){
MailApp.sendEmail({
to:data[i][0],
subject: data[i][1],
htmlBody: data[i][2],
attachments:[DriveApp.getFileById(data[i][3]).getBlob()]
})
}
}
行
中有错误apply plugin: 'com.android.application' android { compileSdkVersion 25 buildToolsVersion "26.0.0" defaultConfig { applicationId "com.example.andt.projectalpha" minSdkVersion 22 targetSdkVersion 25 versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } dependencies { compile fileTree(include: ['*.jar'], dir: 'libs') 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:25.3.1' compile 'com.android.support:design:25.3.1' compile 'com.android.support:cardview-v7:25.3.1-alpha1' testCompile 'junit:junit:4.12'}
建议的解决方案是保持所有版本相同,所以我做了。但是仍然存在错误。
悬停在声明中说“找到版本25.3.1,25.0.0”
答案 0 :(得分:0)
将依赖项中的所有内容更改为 26.0.0-beta1
例如
implementation 'com.android.support:appcompat-v7:26.0.0-beta1'
和
compileSdkVersion 25 (to 26)
targetSdkVersion 25 (to 26)