Can't run android from server - android

I have android sdk installed from homebrew in iMac and I need to run an ionic app. Locally it works fine. But when I ionic run android from file server i got this:
iMac-de-Iwwa:ClickNoticias hugo$ ionic run android
cordova-custom-config: Skipping auto-restore of config file backup(s)
Running command: "/Volumes/Sites/apps/Click Notícias/ClickNoticias/hooks/after_prepare/010_add_platform_class.js" "/Volumes/Sites/apps/Click Notícias/ClickNoticias"
add to body class: platform-android
cordova-custom-config: Applied custom config from config.xml to /Volumes/Sites/apps/Click Notícias/ClickNoticias/platforms/android/AndroidManifest.xml
ANDROID_HOME=/usr/local/Cellar/android-sdk/24.4.1_1
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_73.jdk/Contents/Home
Observed package id '..;..;..;var;lib;android-sdk;samples;android-19' in inconsistent location '/usr/local/Cellar/android-sdk/24.4.1_1/samples/android-19' (Expected '/usr/local/Cellar/android-sdk/24.4.1_1/../../../var/lib/android-sdk/samples/android-19')
Observed package id '..;..;..;var;lib;android-sdk;samples;android-20' in inconsistent location '/usr/local/Cellar/android-sdk/24.4.1_1/samples/android-20' (Expected '/usr/local/Cellar/android-sdk/24.4.1_1/../../../var/lib/android-sdk/samples/android-20')
Observed package id '..;..;..;var;lib;android-sdk;samples;android-21' in inconsistent location '/usr/local/Cellar/android-sdk/24.4.1_1/samples/android-21' (Expected '/usr/local/Cellar/android-sdk/24.4.1_1/../../../var/lib/android-sdk/samples/android-21')
Observed package id '..;..;..;var;lib;android-sdk;samples;android-22' in inconsistent location '/usr/local/Cellar/android-sdk/24.4.1_1/samples/android-22' (Expected '/usr/local/Cellar/android-sdk/24.4.1_1/../../../var/lib/android-sdk/samples/android-22')
Observed package id '..;..;..;var;lib;android-sdk;samples;android-23' in inconsistent location '/usr/local/Cellar/android-sdk/24.4.1_1/samples/android-23' (Expected '/usr/local/Cellar/android-sdk/24.4.1_1/../../../var/lib/android-sdk/samples/android-23')
Incremental java compilation is an incubating feature.
:preBuild UP-TO-DATE
:preDebugBuild UP-TO-DATE
:checkDebugManifest
:CordovaLib:preBuild UP-TO-DATE
:CordovaLib:preDebugBuild UP-TO-DATE
:CordovaLib:compileDebugNdk UP-TO-DATE
:CordovaLib:compileLint
:CordovaLib:copyDebugLint UP-TO-DATE
:CordovaLib:mergeDebugProguardFiles
FAILURE: Build failed with an exception.
* What went wrong:
java.io.IOException: Operation not supported
> Operation not supported
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 2.025 secs
Error: /Volumes/Sites/apps/Click Notícias/ClickNoticias/platforms/android/gradlew: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.
* What went wrong:
java.io.IOException: Operation not supported
> Operation not supported
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
I read the error and i've seen this:
Observed package id '..;..;..;var;lib;android-sdk;samples;android-19' in inconsistent location '/usr/local/Cellar/android-sdk/24.4.1_1/samples/android-19' (Expected '/usr/local/Cellar/android-sdk/24.4.1_1/../../../var/lib/android-sdk/samples/android-19')
I actually made a copy of android-sdk to /usr/var/lib/android-sdk just for testing. But it doesn't works.
Someone have any idea of how i can solve this?

I was having a similar problem before, and it essentially means that your Android Home directory wasn't set properly.

Related

React Native: Install to virtual/physical device failed

I'm currently using React Native to code my final year project. I have an issue when build and install it to virtual/physical devices althought a month ago it worked fine. Can someone explain to me wwhat wrongs with my code or files? Does it get corrupted? Because I tried to created a blank new file I still get the same errors.
My error:
> Task :app:processDebugResources FAILED
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.2/userguide/command_line_interface.html#sec:command_line_warnings
183 actionable tasks: 2 executed, 181 up-to-date
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugResources'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> Android resource linking failed
C:\Users\minht\SmartRoom\node_modules\react-native-image-crop-picker\android\build\intermediates\library_manifest\debug\AndroidManifest.xml:10:5-14:15: AAPT: error: unexpected element <queries> found in <manifest>.
* 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 11s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Run CLI with --verbose flag for more details.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
Seems like you need upgrade Gradle from Android studio and then try if you can run your project from Android Studio.

Error deploying Ionic app to Android Phone (Ionic 4)

I am running the command ionic cordova run android with the usb cable connected as expected. The app builds, and then when it starts to build the apk to deploy on to my phone I'm hit with this error in the terminal.
> cordova run android Android Studio project detected ANDROID_HOME=/Users/user/Library/Android/sdk JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_201.jdk/Contents/Home studio Subproject Path: CordovaLib Subproject Path: app publishNonDefault is deprecated and has no effect anymore. All variants are now published. The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.
at build_3e7pv4o3p5wholih0470cvjae.run(/Users/user/Documents/BoutiqueSolicitors/BoutiqueSolicitors/platforms/android/app/build.gradle:148) Configuration 'compile' in project ':app' is deprecated. Use 'implementation' instead. :CordovaLib:preBuild UP-TO-DATE :CordovaLib:preDebugBuild UP-TO-DATE :CordovaLib:compileDebugAidl FAILED
FAILURE: Build failed with an exception.
* What went wrong: null value in entry: incrementalFolder=null
* Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
* Get more help at https://help.gradle.org
BUILD FAILED in 4s 1 actionable task: 1 executed /Users/user/Documents/BoutiqueSolicitors/BoutiqueSolicitors/platforms/android/gradlew: Command failed with exit code 1 Error output: FAILURE: Build failed with an exception.
* What went wrong: null value in entry: incrementalFolder=null
* Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
* Get more help at https://help.gradle.org
BUILD FAILED in 4s [ERROR] An error occurred while running subprocess cordova.
cordova run android exited with exit code 1.
I looked up the error: incrementalFolder=null, and I found that people were saying to fix this error you need to delete .gradle folder inside the root directory of an existing android studio project. I have tried this with no change.
Does anyone know a fix for this? I am clueless, any help would be greatly appreciated.
Subproject Path: CordovaLib Subproject Path: app publishNonDefault is deprecated and has no effect anymore. All variants are now published.-----------> No impact.
The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.----------->No impact.
at build_3e7pv4o3p5wholih0470cvjae.run (/Users/user/Documents/BoutiqueSolicitors/BoutiqueSolicitors/platforms/android/app/build.gradle:148) Configuration 'compile' in project ':app' is deprecated. Use 'implementation' instead. ---------->Modify dependencies in app/build.gradle to use 'implemntation' instead of 'compile'.
:CordovaLib:preBuild UP-TO-DATE :CordovaLib:preDebugBuild UP-TO-DATE :CordovaLib:compileDebugAidl FAILED.------------>look into your aidl related changes; like definition and location of aidl interface.
run command 'gradlew assembleDebug --debug' from android studio terminal and see if it gives more details on build failure.

react-native build release APK failed

I'm doing crossplatform app for mobile devices in react-native. And when I try to create release APK it fails with error:
> Task :app:prepareLintJar UP-TO-DATE
> Task :app:mainApkListPersistenceRelease UP-TO-DATE
> Task :app:bundleReleaseJsAndAssets FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Failed to capture snapshot of input files for task
':app:bundleReleaseJsAndAssets' property '$1' during up-to-date check.
> Failed to create MD5 hash for file
'/Users/developer/dummy_app/.buckd/sock' as it does not exist.
* 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 3s
24 actionable tasks: 1 executed, 23 up-to-date
2:16:52 AM: Task execution finished 'assembleRelease'.
I consider solving a similar problem, like, deleting .buckd/sock file from root folder and invalidatecache/restart, but didn't help!
I had the exact same issue here with Buck
After deleting the whole .buckd folder, the Task :app:bundleReleaseJsAndAssets passed successfully after !
Hope this could help someone !

Google Cloud End Point Error: Process exited before success message

I am facing this error when I run the appengineStart task.
print of the error
The error says: “com.google.cloud.tools.appengine.cloudsdk.internal.process.ProcessRunnerException: Process exited before success message”
I searched on Google, but wasn’t able to find a solution.
Here is the full error log:
10:33:08: Executing task 'appengineStart'...
Executing tasks: [appengineStart]
Configuration on demand is an incubating feature.
Gradle now uses separate output directories for each JVM language, but this
build assumes a single directory for all classes from a source set. This
behaviour has been deprecated and is scheduled to be removed in Gradle 5.0
:backend:compileJava UP-TO-DATE
:backend:processResources NO-SOURCE
:backend:classes UP-TO-DATE
:backend:endpointsDiscoveryDocs UP-TO-DATE
:backend:_zipDiscoveryDocs UP-TO-DATE
:backend:war UP-TO-DATE
:backend:explodeWar UP-TO-DATE
:backend:assemble UP-TO-DATE
:backend:appengineStart
Warning: Google App Engine Java 7 runtime is deprecated.
Warning: See https://cloud.google.com/appengine/docs/deprecations/java7
ago 23, 2018 10:33:24 AM java.util.prefs.WindowsPreferences <init>
ADVERT?NCIA: Could not open/create prefs root node Software\JavaSoft\Prefs
at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5.
ago 23, 2018 10:33:25 AM
com.google.appengine.tools.development.SystemPropertiesManager
setSystemProperties
INFORMA??ES: Overwriting system property key
'java.util.logging.config.file', value
'C:\Users\igor\AppData\Local\Google\Cloud SDK\google-cloud- `sdk\platform\google_appengine\google\appengine\tools\java\config\sdk\logging.properties' with value 'WEB-INF/logging.properties' from 'C:\Users\igor\ud-exercises\ud867\FinalProject\backend\build\exploded-backend\WEB-INF\appengine-web.xml'`
************************************************
Could not open the requested socket: Address already in use: bind
Try overriding --address and/or --port.
Exception in thread "wait-for-process-exit-and-output-handlers" com.google.cloud.tools.appengine.api.AppEngineException: Non zero exit: 2
at com.google.cloud.tools.appengine.cloudsdk.process.NonZeroExceptionExitListener.onExit(NonZeroExceptionExitListener.java:30)
at com.google.cloud.tools.appengine.cloudsdk.internal.process.DefaultProcessRunner.syncRun(DefaultProcessRunner.java:211)
at com.google.cloud.tools.appengine.cloudsdk.internal.process.DefaultProcessRunner.access$200(DefaultProcessRunner.java:38)
at com.google.cloud.tools.appengine.cloudsdk.internal.process.DefaultProcessRunner$3.run(DefaultProcessRunner.java:223)
:backend:appengineStart FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':backend:appengineStart'.
>
com.google.cloud.tools.appengine.cloudsdk.internal.process.ProcessRunnerException: Process exited before success message
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
* Get more help at https://help.gradle.org
BUILD FAILED in 16s
6 actionable tasks: 1 executed, 5 up-to-date
10:33:26: Task execution finished 'appengineStart'.
Could not open the requested socket: Address already in use: bind indicates that you either previously started a dev server and it didn't exit properly, or you have another process using the same port. You need to kill the offending process (or restart your computer, which has the same effect) or change the port on which your dev server runs. Essentially, add the following to your gradle file, changing the port as necessary:
appengine.run.port = 8888

cant compile apk using Game Maker Studio

I just updated the build tools using android SDK manager.
Now I cant compile apk using game maker studio.
Here is the error output from the console.
I dont think i have changed anything except windows update. I have windows 10, 64 bit
Stats : GMA : Elapsed=6821.0873
Stats : GMA : sp=32,au=0,bk=3,pt=0,sc=11,sh=0,fo=4,tl=0,ob=41,ro=3,da=0,ex=1,ma=29,fm=0x49E50A39
cmd /c ""C:\Users\pc\AppData\Roaming\GameMaker-Studio\Android\runner\gradle\gradlew"" build -x assembleDebug
:com.mysite.myapp:preBuild UP-TO-DATE
:com.mysite.myapp:preReleaseBuild UP-TO-DATE
:com.mysite.myapp:checkReleaseManifest
:com.mysite.myapp:preDebugBuild UP-TO-DATE
:com.mysite.myapp:prepareComAndroidSupportMultidex101Library
:com.mysite.myapp:prepareComAndroidSupportSupportV42311Library
:com.mysite.myapp:prepareReleaseDependencies
:com.mysite.myapp:compileReleaseAidl
:com.mysite.myapp:compileReleaseRenderscript
:com.mysite.myapp:generateReleaseBuildConfig
:com.mysite.myapp:generateReleaseAssets UP-TO-DATE
:com.mysite.myapp:mergeReleaseAssets
:com.mysite.myapp:generateReleaseResValues
:com.mysite.myapp:generateReleaseResources
:com.mysite.myapp:mergeReleaseResources
:com.mysite.myapp:processArmeabi-v7aReleaseManifest
Warning: C:\Users\pc\Documents\GameMaker\Cache\MobiPC_App\Android\Default\com.mysite.myapp\src\main\AndroidManifest.xml:28:3-182:17 Warning:
application#android:label was tagged at AndroidManifest.xml:28 to replace other declarations but no other declaration present
Warning: C:\Users\pc\Documents\GameMaker\Cache\MobiPC_App\Android\Default\com.mysite.myapp\src\main\AndroidManifest.xml:29:5-35:16 Warning:
activity#com.mysite.myapp.RunnerActivity#android:label was tagged at AndroidManifest.xml:29 to replace other declarations but no other declaration present
C:\Users\pc\Documents\GameMaker\Cache\MobiPC_App\Android\Default\com.mysite.myapp\src\main\AndroidManifest.xml:28:3-182:17 Warning:
application#android:label was tagged at AndroidManifest.xml:28 to replace other declarations but no other declaration present
C:\Users\pc\Documents\GameMaker\Cache\MobiPC_App\Android\Default\com.mysite.myapp\src\main\AndroidManifest.xml:29:5-35:16 Warning:
activity#com.mysite.myapp.RunnerActivity#android:label was tagged at AndroidManifest.xml:29 to replace other declarations but no other declaration present
:com.mysite.myapp:processArmeabi-v7aReleaseResourcesC:\Users\pc\Documents\GameMaker\Cache\MobiPC_App\Android\Default\com.mysite.myapp\build\intermediates\manifests\full\armeabi-v7a\release\AndroidManifest.xml:78:28-65 : No resource found that matches the given name (at 'value' with value '#integer/google_play_services_version').
FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':com.mysite.myapp:processArmeabi-v7aReleaseResources'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'F:\Android\android-sdk\build-tools\23.0.1\aapt.exe'' finished with non-zero exit value 1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 12.612 secs
Create finished: 01:33:39
I set the buils tools version to the latest version.
In preferences I set the cache path to a shorter one
I also uninstalled an extension called "APPODEAL", i think this was causing problems too.
Now I managed to get apk compiled

Categories

Resources