@@ -139,7 +139,6 @@ class AndroidProjectService extends projectServiceBaseLib.PlatformProjectService
139
139
// Interpolate the activity name and package
140
140
let manifestPath = this . platformData . configurationFilePath ;
141
141
shell . sed ( '-i' , / _ _ P A C K A G E _ _ / , this . $projectData . projectId , manifestPath ) ;
142
- shell . sed ( '-i' , / _ _ A P I L E V E L _ _ / , this . getApiLevel ( ) . wait ( ) , manifestPath ) ;
143
142
144
143
let stringsFilePath = path . join ( this . platformData . appResourcesDestinationDirectoryPath , 'values' , 'strings.xml' ) ;
145
144
shell . sed ( '-i' , / _ _ N A M E _ _ / , this . $projectData . projectName , stringsFilePath ) ;
@@ -178,7 +177,13 @@ class AndroidProjectService extends projectServiceBaseLib.PlatformProjectService
178
177
public buildProject ( projectRoot : string , buildConfig ?: IBuildConfig ) : IFuture < void > {
179
178
return ( ( ) => {
180
179
if ( this . canUseGradle ( ) . wait ( ) ) {
181
- let buildOptions = [ "buildapk" , `-PcompileSdk=${ this . getAndroidTarget ( ) . wait ( ) } ` ] ;
180
+ // note, compileSdk and targetSdk should be the same
181
+ let targetSdk = this . getAndroidTarget ( ) . wait ( ) . replace ( "android-" , "" ) ;
182
+ let buildOptions = [ "buildapk" ,
183
+ `-PcompileSdk=${ this . getAndroidTarget ( ) . wait ( ) } ` ,
184
+ `-PtargetSdk=${ targetSdk } `
185
+ ] ;
186
+
182
187
if ( this . $options . release ) {
183
188
buildOptions . push ( "-Prelease" ) ;
184
189
buildOptions . push ( `-PksPath=${ this . $options . keyStorePath } ` ) ;
0 commit comments