@Abraham94 wrote:
Hi!
Im learning ionic but I have a problem, I have been trying to solve this, but I dont know how.When I launch:
sudo ionic cordova run android
in my app I recieve that error:
`
Configure project :app
±----------------------------------------------------------------
| cordova-android-support-gradle-release: 27.+
±----------------------------------------------------------------Task :app:preBuild UP-TO-DATE
Task :CordovaLib:preBuild UP-TO-DATE
Task :CordovaLib:preDebugBuild UP-TO-DATE
Task :CordovaLib:checkDebugManifest UP-TO-DATE
Task :CordovaLib:processDebugManifest UP-TO-DATE
Task :app:preDebugBuild UP-TO-DATE
Task :CordovaLib:compileDebugAidl NO-SOURCE
Task :app:compileDebugAidl NO-SOURCE
Task :CordovaLib:packageDebugRenderscript NO-SOURCE
Task :app:compileDebugRenderscript UP-TO-DATE
Task :app:checkDebugManifest UP-TO-DATE
Task :app:generateDebugBuildConfig UP-TO-DATE
Task :app:prepareLintJar UP-TO-DATE
Task :app:generateDebugSources UP-TO-DATE
Task :CordovaLib:compileDebugRenderscript UP-TO-DATE
Task :CordovaLib:generateDebugBuildConfig UP-TO-DATE
Task :CordovaLib:generateDebugResValues UP-TO-DATE
Task :CordovaLib:generateDebugResources UP-TO-DATE
Task :CordovaLib:packageDebugResources UP-TO-DATE
Task :CordovaLib:generateDebugRFile UP-TO-DATE
Task :CordovaLib:prepareLintJar UP-TO-DATE
Task :CordovaLib:generateDebugSources UP-TO-DATE
Task :CordovaLib:javaPreCompileDebug UP-TO-DATE
Task :CordovaLib:compileDebugJavaWithJavac UP-TO-DATE
Task :CordovaLib:processDebugJavaRes NO-SOURCE
Task :CordovaLib:transformClassesAndResourcesWithPrepareIntermediateJarsForDebug UP-TO-DATE
Task :app:javaPreCompileDebug UP-TO-DATE
Task :app:mainApkListPersistenceDebug UP-TO-DATE
Task :app:generateDebugResValues UP-TO-DATE
Task :app:generateDebugResources UP-TO-DATE
Task :app:mergeDebugResources UP-TO-DATE
Task :app:createDebugCompatibleScreenManifests UP-TO-DATE
Task :app:processDebugManifest UP-TO-DATE
Task :app:processDebugResources UP-TO-DATETask :app:compileDebugJavaWithJavac FAILED
/home/abraham/Escritorio/vengavamoh/SafeJewellery/platforms/android/app/src/main/java/com/zencity/cordova/bgloc/LocationUpdateService.java:6: error: package org.apache.http does not exist
import org.apache.http.HttpResponse;
^
/home/abraham/Escritorio/vengavamoh/SafeJewellery/platforms/android/app/src/main/java/com/zencity/cordova/bgloc/LocationUpdateService.java:7: error: package org.apache.http.client.methods does not exist
import org.apache.http.client.methods.HttpPost;
^
/home/abraham/Escritorio/vengavamoh/SafeJewellery/platforms/android/app/src/main/java/com/zencity/cordova/bgloc/LocationUpdateService.java:8: error: package org.apache.http.entity does not exist
import org.apache.http.entity.StringEntity;
^
/home/abraham/Escritorio/vengavamoh/SafeJewellery/platforms/android/app/src/main/java/com/zencity/cordova/bgloc/LocationUpdateService.java:9: error: package org.apache.http.impl.client does not exist
import org.apache.http.impl.client.DefaultHttpClient;
^
/home/abraham/Escritorio/vengavamoh/SafeJewellery/platforms/android/app/src/main/java/com/zencity/cordova/bgloc/LocationUpdateService.java:662: error: cannot find symbol
DefaultHttpClient httpClient = new DefaultHttpClient();
^
symbol: class DefaultHttpClient
location: class LocationUpdateService
/home/abraham/Escritorio/vengavamoh/SafeJewellery/platforms/android/app/src/main/java/com/zencity/cordova/bgloc/LocationUpdateService.java:662: error: cannot find symbol
DefaultHttpClient httpClient = new DefaultHttpClient();
^
symbol: class DefaultHttpClient
location: class LocationUpdateService
/home/abraham/Escritorio/vengavamoh/SafeJewellery/platforms/android/app/src/main/java/com/zencity/cordova/bgloc/LocationUpdateService.java:663: error: cannot find symbol
HttpPost request = new HttpPost(url);
^
symbol: class HttpPost
location: class LocationUpdateService
/home/abraham/Escritorio/vengavamoh/SafeJewellery/platforms/android/app/src/main/java/com/zencity/cordova/bgloc/LocationUpdateService.java:663: error: cannot find symbol
HttpPost request = new HttpPost(url);
^
symbol: class HttpPost
location: class LocationUpdateService
/home/abraham/Escritorio/vengavamoh/SafeJewellery/platforms/android/app/src/main/java/com/zencity/cordova/bgloc/LocationUpdateService.java:677: error: cannot find symbol
StringEntity se = new StringEntity(params.toString());
^
symbol: class StringEntity
location: class LocationUpdateService
/home/abraham/Escritorio/vengavamoh/SafeJewellery/platforms/android/app/src/main/java/com/zencity/cordova/bgloc/LocationUpdateService.java:677: error: cannot find symbol
StringEntity se = new StringEntity(params.toString());
^
symbol: class StringEntity
location: class LocationUpdateService
/home/abraham/Escritorio/vengavamoh/SafeJewellery/platforms/android/app/src/main/java/com/zencity/cordova/bgloc/LocationUpdateService.java:691: error: cannot find symbol
HttpResponse response = httpClient.execute(request);
^
symbol: class HttpResponse
location: class LocationUpdateService
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /home/abraham/Escritorio/vengavamoh/SafeJewellery/platforms/android/app/src/main/java/org/apache/cordova/file/AssetFilesystem.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
11 errorsFAILURE: Build failed with an exception.
- What went wrong:
Execution failed for task ‘:app:compileDebugJavaWithJavac’.Compilation failed; see the compiler error output for details.
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.Get more help at https://help.gradle.org
BUILD FAILED in 4s
24 actionable tasks: 1 executed, 23 up-to-date
/home/abraham/Escritorio/vengavamoh/SafeJewellery/platforms/android/gradlew: Command failed with exit code 1 Error output:
/home/abraham/Escritorio/vengavamoh/SafeJewellery/platforms/android/app/src/main/java/com/zencity/cordova/bgloc/LocationUpdateService.java:6: error: package org.apache.http does not exist
import org.apache.http.HttpResponse;
^
/home/abraham/Escritorio/vengavamoh/SafeJewellery/platforms/android/app/src/main/java/com/zencity/cordova/bgloc/LocationUpdateService.java:7: error: package org.apache.http.client.methods does not exist
import org.apache.http.client.methods.HttpPost;
^
/home/abraham/Escritorio/vengavamoh/SafeJewellery/platforms/android/app/src/main/java/com/zencity/cordova/bgloc/LocationUpdateService.java:8: error: package org.apache.http.entity does not exist
import org.apache.http.entity.StringEntity;
^
/home/abraham/Escritorio/vengavamoh/SafeJewellery/platforms/android/app/src/main/java/com/zencity/cordova/bgloc/LocationUpdateService.java:9: error: package org.apache.http.impl.client does not exist
import org.apache.http.impl.client.DefaultHttpClient;
^
/home/abraham/Escritorio/vengavamoh/SafeJewellery/platforms/android/app/src/main/java/com/zencity/cordova/bgloc/LocationUpdateService.java:662: error: cannot find symbol
DefaultHttpClient httpClient = new DefaultHttpClient();
^
symbol: class DefaultHttpClient
location: class LocationUpdateService
/home/abraham/Escritorio/vengavamoh/SafeJewellery/platforms/android/app/src/main/java/com/zencity/cordova/bgloc/LocationUpdateService.java:662: error: cannot find symbol
DefaultHttpClient httpClient = new DefaultHttpClient();
^
symbol: class DefaultHttpClient
location: class LocationUpdateService
/home/abraham/Escritorio/vengavamoh/SafeJewellery/platforms/android/app/src/main/java/com/zencity/cordova/bgloc/LocationUpdateService.java:663: error: cannot find symbol
HttpPost request = new HttpPost(url);
^
symbol: class HttpPost
location: class LocationUpdateService
/home/abraham/Escritorio/vengavamoh/SafeJewellery/platforms/android/app/src/main/java/com/zencity/cordova/bgloc/LocationUpdateService.java:663: error: cannot find symbol
HttpPost request = new HttpPost(url);
^
symbol: class HttpPost
location: class LocationUpdateService
/home/abraham/Escritorio/vengavamoh/SafeJewellery/platforms/android/app/src/main/java/com/zencity/cordova/bgloc/LocationUpdateService.java:677: error: cannot find symbol
StringEntity se = new StringEntity(params.toString());
^
symbol: class StringEntity
location: class LocationUpdateService
/home/abraham/Escritorio/vengavamoh/SafeJewellery/platforms/android/app/src/main/java/com/zencity/cordova/bgloc/LocationUpdateService.java:677: error: cannot find symbol
StringEntity se = new StringEntity(params.toString());
^
symbol: class StringEntity
location: class LocationUpdateService
/home/abraham/Escritorio/vengavamoh/SafeJewellery/platforms/android/app/src/main/java/com/zencity/cordova/bgloc/LocationUpdateService.java:691: error: cannot find symbol
HttpResponse response = httpClient.execute(request);
^
symbol: class HttpResponse
location: class LocationUpdateService
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /home/abraham/Escritorio/vengavamoh/SafeJewellery/platforms/android/app/src/main/java/org/apache/cordova/file/AssetFilesystem.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
11 errorsFAILURE: Build failed with an exception.
- What went wrong:
Execution failed for task ‘:app:compileDebugJavaWithJavac’.Compilation failed; see the compiler error output for details.
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.Get more help at https://help.gradle.org
BUILD FAILED in 4s
[ERROR] An error occurred while running subprocess cordova.cordova build android --device exited with exit code 1. Re-running this command with the --verbose flag may provide more information.`
How can I solve it? I was searching on internet but any solution works for me
Thanks!
Posts: 1
Participants: 1