Android Studio - creating a release build - error


#1

Hey Guys,

debugging is working perfect without any problems, but i still have problems building a release with actual version of Juce 4 and Android Studio.

I build for Android 4.4.2 ... after many hours of trying i tell you the steps, of which ich hope are correct :

 

- debugging works on my Samsung Galaxy Tab 4 (yeah!)

 

- i change "build variants" to "armeabiv7aRelease"

- i go to "edit configuration" and press fix signing error

- i add my generated key-File (*.jks)

- it now says: "Gradle Project sync failed"


Error:(180, 0) Gradle DSL method not found: 'android()'
Possible causes:<ul><li>The project 'AndroidStudio' may be using a version of the Android Gradle plug-in that does not contain the method (e.g. 'testCompile' was added in 1.1.0).
<a href="fixGradleElements">Fix plugin version and sync project</a></li><li>The project 'AndroidStudio' may be using a version of Gradle that does not contain the method.
<a href="open.wrapper.file">Open Gradle wrapper file</a></li><li>The build file may be missing a Gradle plugin.
<a href="apply.gradle.plugin">Apply Gradle plugin</a></li>
 

- i tried to change the "guild.gradle - file / dependencies" into other versions without success

dependencies { classpath 'com.android.tools.build:gradle-experimental:0.3.0-alpha7' }  (original)

 

Please, what else can i do to make it work ?

 

Thanks

Jens

 

 


#2

for example if try this gradle version:  

classpath 'com.android.tools.build:gradle:1.5.0'
 

Android Studio says:

Error:(1, 0) Plugin with id 'com.android.model.application' not found.
<a href="openFile:/Users/../Documents/MinimalDJ/Builds/AndroidStudio/app/build.gradle">Open File</a>

 

Update 1 hour later:

- after reading and searching in WWW and trying to make changes to the model{} now i understand that it must be the experimental version

i give it up for now until someone tells me how to do it right :-)
 


#3

Try:

classpath 'com.android.tools.build:gradle-experimental:0.3.0-alpha7'

That should help.


#4

Hi Rory,

thanks for the tip, but i still get the same error; Gradle DSL method not found: 'android()'

Meanwhile i went back from Android Studio 1.5 to 1.4.1, but with same result.


#5

I'm pretty close to going back to my Ant build. Things are building for me fine in Studio but nothing runs on my phone. It makes things pretty hard to debug ;)