I"m new in coding. So I don't know if I'm questioning correctly, but I really need help with this issue. I took a look at this posts: getting error while try to generate signed APK android studio 3 and Dalvik VM error: Exception found "Javax.xml.namespace.QName.class", but still didn't get a clue of what is wrong.
My app was running perfectly until I tried to generate the signed-apk, now it fails building, it says that there is 4 errors and app:mergeDebugResources failed. I get this message:
"FAILURE: Build failed with an exception.
- What went wrong:
Execution failed for task ':app:mergeDebugResources'.
C:\Users\Ulla\AndroidStudioProjects\CalculaPrazoCPC - Teste - Copia (2)\app\src\main\res\dtplugin\deployJava1.dll:1:1: Error: The content is not permited in the prolog. I tried to generate signed-apk in another project, more simpler, and it went ok, so I think that's not my windows system that have the problem...
Could it be something wrong with my dependencies?
My build.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "23.0.3"
defaultConfig {
applicationId "com.ullaapps.calculaprazocpc"
minSdkVersion 21
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.2.0'
compile 'com.google.code.gson:gson:2.3.1'
compile 'com.android.support:design:22.2.0'
}
I'm using in my xml files: android.support.v7.widget.SwitchCompat and android.support.v7.widget.AppCompatRadioButton. The gson I'm using because I have a list of custom objects stored in the sharedPreference.
The deployJava1.dll opens in my project/Android Studio, with many strange characters and with this message: " This document contains very long lines. Soft wraps were forcibly enabled to improve editor performance."
I updated my AndroidStudio to 3.0.1, and started to get this error instead:
java.lang.UnsupportedClassVersionError: com/android/build/gradle/AppPlugin : Unsupported major.minor version 52.0
So I took a look at this post: Unsupported major.minor version 52.0 when rendering in Android Studio
I tried the many solutions there but with no success. When I tried this solution: " On OSX, this is found under File > Project Structure > SDK. Or from the welcome screen in Configure > Project Defaults > Project Structure. Select the Use the embedded JDK (recommended) option instead of using your own JDK." It started show again the errors with deployJva1.dll, msvcr100.dll and classes.jsa and running with stacktrace got this:
- Exception is: org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:mergeDebugResources'.
and:
C:\Users\Ulla\AndroidStudioProjects\CalculaPrazoCPC - Teste - Copia C:\Users\Ulla\AndroidStudioProjects\CalculaPrazoCPC - Teste - Copia (2)\app\src\main\res\plugin2\msvcr100.dll Error:Error: The file name must end with .xml Error:Error: The file name must end with .xml Error:Error: The file name must end with .xml C:\Users\Ulla\AndroidStudioProjects\CalculaPrazoCPC - Teste - Copia (2)\app\src\main\res\server\classes.jsa Error:Error: The file name must end with .xml Error:Error: The file name must end with .xml Error:Error: The file name must end with .xml
I want to cry!!! I'm getting really frustrated now that I would publish my app and this happens. If someone can help me I would be very grateful.