Problem with Gradle - Android Studio

Hi, I'm not an android studio expert and I need help.
I downloaded this project from github (it does not allow me to insert the link) and uploaded it to Android Studio, when I tried to create the apk file I get this error:
Error:Android Source Generator: Error: Can't find bundle for base name messages.AndroidJpsBundle, locale it_IT
java.util.MissingResourceException: Can't find bundle for base name messages.AndroidJpsBundle, locale it_IT
at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:1564)
at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1387)
at java.util.ResourceBundle.getBundle(ResourceBundle.java:773)
at org.jetbrains.jps.android.AndroidJpsBundle.getBundle(AndroidJpsBundle.java:22)
at org.jetbrains.jps.android.AndroidJpsBundle.message(AndroidJpsBundle.java:32)
at org.jetbrains.jps.android.AndroidSourceGeneratingBuilder.computeModuleDatas(AndroidSourceGeneratingBuilder.java:1276)
at org.jetbrains.jps.android.AndroidSourceGeneratingBuilder.doBuild(AndroidSourceGeneratingBuilder.java:130)
at org.jetbrains.jps.android.AndroidSourceGeneratingBuilder.build(AndroidSourceGeneratingBuilder.java:114)
at org.jetbrains.jps.incremental.IncProjectBuilder.runModuleLevelBuilders(IncProjectBuilder.java:1314)
at org.jetbrains.jps.incremental.IncProjectBuilder.runBuildersForChunk(IncProjectBuilder.java:991)
at org.jetbrains.jps.incremental.IncProjectBuilder.buildTargetsChunk(IncProjectBuilder.java:1063)
at org.jetbrains.jps.incremental.IncProjectBuilder.buildChunkIfAffected(IncProjectBuilder.java:954)
at org.jetbrains.jps.incremental.IncProjectBuilder.buildChunks(IncProjectBuilder.java:787)
at org.jetbrains.jps.incremental.IncProjectBuilder.runBuild(IncProjectBuilder.java:376)
at org.jetbrains.jps.incremental.IncProjectBuilder.build(IncProjectBuilder.java:183)
at org.jetbrains.jps.cmdline.BuildRunner.runBuild(BuildRunner.java:138)
at org.jetbrains.jps.cmdline.BuildSession.runBuild(BuildSession.java:308)
at org.jetbrains.jps.cmdline.BuildSession.run(BuildSession.java:137)
at org.jetbrains.jps.cmdline.BuildMain$MyMessageHandler.lambda$channelRead0$0(BuildMain.java:235)
at org.jetbrains.jps.service.impl.SharedThreadPoolImpl.lambda$executeOnPooledThread$0(SharedThreadPoolImpl.java:42)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
can someone help me solve the problem?
My version of android studio is 3.2 gradle 4.6
thanks!

Related

[Q] Error while referencing Xposed based library from xposed modules

Hi all.
I have developed few Xposed android modules in Eclipse and they are all were developed in the same worksapce.
During the development i have realized that i have common functionality between the modules and i decided to create a library with the common behavior where all other modules have to import this library to their build path.
The common library is called 'ModulesCommon' and it is using the Xposed API (HookMethod for example) . Additionally some of the modules them-self use the Xposed APIs.
What i have done in Eclipse is to add XposedBridgeApi.jar to the build path of ModulesCommon and to the build path of the modules that use Xposed API.
In the Build path menu of ModulesCommon and the modules i have navigated into the Build path menu to the tab of "Order and Export" and removed the export sign from XposedBridgeApi.jar .
Every thing worked fine but now i am trying to move the project to Android Studio.
I have created a new project and imported ModulesCommon library with one of the modules that uses Xposed API.
The dependencies block of ModulesCommon contains:
PHP:
dependencies {
provided files('lib/XposedBridgeApi.jar')
}
The dependencies block of the module contains:
PHP:
dependencies {
compile 'com.google.android.gms:play-services:6.5.87'
compile project(':modulesCommon' )
}
The module compiles and installed on the device but i keep getting the same error all the time:
PHP:
W/dalvikvm( 1933): Class resolved by unexpected DEX: Lcom/mol/locationreportmodule/GpsModule;(0x41d70e00):0x41a17000 ref [Lde/robv/android/xposed/IXposedHookLoadPackage;] Lde/robv/android/xposed/IXposedHookLoadPackage;(0x41ac9598):0x40006000
W/dalvikvm( 1933): (Lcom/mol/locationmodule/GpsModule; had used a different Lde/robv/android/xposed/IXposedHookLoadPackage; during pre-verification)
I/dalvikvm( 1933): Failed resolving Lcom/pol/locationmodule/GpsModule; interface 4712 'Lde/robv/android/xposed/IXposedHookLoadPackage;'
W/dalvikvm( 1933): Link of class 'Lcom/pol/locationmodule/GpsModule;' failed
Does anybody can help me to solve this dependency problem?
Thank you!

Creating xslx.-File in Android

Hi Guys,
I want to create a xslx-File in my Android Application. Im Using Apache poi-ooxml-3.12.jar for it. But while calling the XSSFWorkbook Constructor I get the following exception:
FATAL EXCEPTION: main
Code:
java.lang.VerifyError: org/apache/poi/xssf/usermodel/XSSFWorkbook
This is my Code (HSSFWorkbook Constructor is working btw):
Code:
Workbook workbook;
if (StringOperationsUtil.getFileExtension(file).equalsIgnoreCase("XLSX")){
workbook = new XSSFWorkbook();
} else {
//default xls
workbook = new HSSFWorkbook();
}
These are my gradle dependencies:
Code:
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:21.0.3'
compile 'com.opencsv:opencsv:3.4'
compile 'org.apache.poi:poi:3.12'
compile 'org.apache.poi:poi-ooxml:3.12'
compile 'com.android.support:multidex:1.0.0'
}
Also the apache team didn't answer me. I can't believe that it's not possible to create the newest excel file in an android application. Does really any Android Developer is not using xlsx files? I really can't believe this. Please let me know, if you guys know something about that issue.
Thanks in advance!
I tried to use the older poi.jar 3.8 and now i get this error:
Error:Execution failed for task ':app:dexDebug'.
> com.android.ide.common.internal.LoggedErrorException: Failed to run command:
G:\android-sdk\build-tools\21.1.2\dx.bat --dex --no-optimize --multi-dex --main-dex-list G:\Development\workspace\FPT\app\build\intermediates\multi-dex\debug\maindexlist.txt --output G:\Development\workspace\FPT\app\build\intermediates\dex\debug --input-list=G:\Development\workspace\FPT\app\build\intermediates\tmp\dex\debug\inputList.txt
Error Code:
1
does anybody know how i fix this?
thanks

How do you change apk file name?

I have tried this :
Code:
buildTypes{
applicationVariants.all { variant ->
variant.outputs.each { output ->
output.outputFile = file("$project.buildDir/apk/test.apk")
}
}
But it doesn't work with version of gradle I have:
Error15, 0) Gradle DSL method not found: 'buildTypes()'
Possible causes:<ul><li>The project 'HexapodController' may be using a version of Gradle that does not contain the method.
Gradle settings</li><li>The build file may be missing a Gradle plugin.
Apply Gradle plugin</li>

Build issue after importing a non gradle (Titanium Android Module) existing project in Android Studio

Build issue after importing a non gradle (Titanium Android Module) existing project in Android Studio which has different folder structure.
I have an existing project based on Titanium framework but want to use it in Android Studio for further development.
Imported existing project into Android Studio “Open an existing project” opening the folder which has AndroidManifest.xml file. Added external Titanium libraries required for the project, few errors got resolved.
Facing build issues :
Cannot resolve symbol “@drawable/appicon”
Class referenced in the manifest com.xxxx.xxxxx was not found in the project or the libraries
Cannot resolve symbol “@string/app_name”
Cannot resolve symbol “@style/Theme.AppCompact”
Cannot resolve symbol “@style/Theme.AppCompact.Translucent”
Cannot resolve symbol “@style/Theme.Titanium”
Please help me out resolving this errors.

New projects in Android Studio Dolphin failes with Duplicate class errors

Hello
I try to create new projects with Android Studio Dophin (2021.3.1) which fails nevertheless with java or kotlin on win and linux systems:
Default gradle version: 7.4
Default android gradle plugin version 7.3.0
Compile SDK Version: 32
Target SDK Version: 32
Min SDK Version: 21
Create a new project with Basic Activity will fail with the folliwing error:
Duplicate class androidx.lifecycle.ViewModelLazy found in modules lifecycle-viewmodel-2.5.1-runtime (androidx.lifecycle:lifecycle-viewmodel:2.5.1) and lifecycle-viewmodel-ktx-2.3.1-runtime (androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1)
Duplicate class androidx.lifecycle.ViewTreeViewModelKt found in modules lifecycle-viewmodel-2.5.1-runtime (androidx.lifecycle:lifecycle-viewmodel:2.5.1) and lifecycle-viewmodel-ktx-2.3.1-runtime (androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1)
Go to the documentation to learn how to Fix dependency resolution errors.
Click to expand...
Click to collapse
Any hints?

Categories

Resources