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

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!

Related

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

android studio problem

Hi, i have the next problem, when i open a project in android stuidio, appear the next message
Error:Could not create an instance of Tooling API implementation using the specified Gradle installation 'C:\Program Files\Android\Android Studio\gradle\gradle-2.8'.
what could be? and What i can do?
Thanks for all
Have you tried updating Android Studio?
Also you could show build.gradle file for this project.
klisiecki said:
Have you tried updating Android Studio?
Also you could show build.gradle file for this project.
Click to expand...
Click to collapse
this show the file build.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.5.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Hi!
Try to use last version of android studio gradle plugin.
Just change line
Code:
classpath 'com.android.tools.build:gradle:1.5.0'
to
Code:
classpath 'com.android.tools.build:gradle:2.0.0-alpha3'

Unable to resolve all dependencies in android studio 3.0

I am getting these errors while syncing gradle:-
Error:Unable to resolve dependency for ':[email protected]/compileClasspath': Could not resolve com.android.support:appcompat-v7:26.1.0.
Error:Unable to resolve dependency for ':[email protected]/compileClasspath': Could not resolve com.android.support:design:26.1.0.
Error:Unable to resolve dependency for ':[email protected]/compileClasspath': Could not resolve com.android.support.test:runner:1.0.1.
Error:Unable to resolve dependency for ':[email protected]/compileClasspath': Could not resolve junit:junit:4.12.
Error:Unable to resolve dependency for ':[email protected]/compileClasspath': Could not resolve com.android.support.test.espresso:espresso-core:3.0.1.
METHODS TRIED
i have tried adding GOOGLE MAVEN REPO, mavencentral all with url & without url.
i have tried deleting .gradle folder from C:\Users\<username>/.gradle.
i have tried gradle offline work and online work, both end up with same error message.
tried clean project & rebuilding.
tried INVALIDATE CACHE & RESTART.
tried degrading the android studio version.
I AM USING WINDOWS 64BIT WITH 4GB OF RAM AND DUAL CORE 2.0 GHZ PROCESSOR, AND ANDROID VERSION 3.0, GRADLE VERSION 4.1 & 4.3(LATEST), I HAVE INSATLLED ALL THE NECESSARY TOOLS & EVERYTHING UPDATED IN SDK MANAGER. ANDROID SUPPORT REPOSITORY & GOOGLE OFFLINE REPOSITORY BOTH INSTALLED.
WHENEVER I TRY TO SYNC IT WITH OFFLINE WORK IT END UP WITH ERROR (NO CACHED VERSION OF THIS (DEPENDENCY IS FOUND), AND WHENEVER I TRY TO SYNC WITH ONLINE WORK, THE ERRORS ARE SAME LISTED ABOVE IN BOTH CASES.
I HAVE TRIED EVERYTHING FROM STACK OVER FLOW & YOUTUBE.
BUILD.GRADLE PROJECT:MY APPLICATION.
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
BUILD.GRADLE MODULE:APP
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion "26.0.2"
defaultConfig {
applicationId "com.example.vipinsaini.myapplication"
minSdkVersion 15
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.android.support:design:26.1.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
}
CAN ANYONE PLZ HELP ME SOLVE THIS ISSUE. I am new to android studio plz omit mistakes.
Add google() to allprojects node in your root build.gradle file
allprojects {
repositories {
jcenter()
google()
}
}
Hey,
I have a same problem. I tried to do your solution, but already exist this code in build.gradle file.
I will be happy to another solution.
Thanks.
Try to Invalidate Cache/Restart that got the problem fixed for me
Unable to Resolve Dependencies
After much research and headache... Go to File\Settings\Gradle. Deselect the "Offline work" box. Now you can connect and download any necessary or missing dependencies.
Worked, thank you.
i tried invalidate and restart then delete .gradle file then uncheck the offline work but no use not clear the appcompact error

Problem with Gradle

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!

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.

Categories

Resources