Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin not working with ionic's capacitor #45

Closed
bb1 opened this issue Jun 17, 2022 · 6 comments
Closed

Plugin not working with ionic's capacitor #45

bb1 opened this issue Jun 17, 2022 · 6 comments

Comments

@bb1
Copy link

bb1 commented Jun 17, 2022

It crashes because the strings android:label="@string/app_name" can not be resolved from the generated android/app/src/main/res/xml/config.xml file. It seems like this alias is not supported by capacitor. :/

@kolbasa
Copy link
Owner

kolbasa commented Jun 17, 2022

No problem. I actively make sure that everything works.

However, I cannot reproduce this. I have now created two empty projects. A pure Capacitor project and a Capacitor+Ionic project. Both are working for me.

My steps with Capacitor:

# creating new capacitor project
cap init app test.app.id --web-dir www

# with a black package.json
npm init -y

# and a simple index.html
mkdir www
echo '<html><head></head></html>' > www/index.html

# adding apkupdater plugin
npm install cordova-plugin-apkupdater

# adding android platform
npm install @capacitor/android
cap add android

# deploying app
cap run android

My steps with Capacitor + Ionic:

# creating new capacitor + ionic project
ionic start app blank --type=angular --capacitor --no-interactive

# navigating to app project folder
cd app

# adding apkupdater plugin
npm install cordova-plugin-apkupdater

# adding android platform
ionic capacitor add android

# deploying app
ionic capacitor run android

A few questions that come to mind:

  • Can you give me the full error message?
  • When does the message appear? When launching the app?
  • Capacitor Version?

@kolbasa kolbasa closed this as completed Jun 20, 2022
@mtournay
Copy link

Hi Kolbasa

Same issue in my project, when building apk with gradle

> Task :app:extractReleaseNativeSymbolTables
Unable to extract native debug metadata from android\app\build\intermediates\merged_native_libs\release\out\lib\arm64-v8a\libtoolChecker.so because unable to locate the objcopy executable for the arm64-v8a ABI.
Unable to extract native debug metadata from android\app\build\intermediates\merged_native_libs\release\out\lib\armeabi-v7a\libtoolChecker.so because unable to locate the objcopy executable for the armeabi-v7a ABI.
Unable to extract native debug metadata from android\app\build\intermediates\merged_native_libs\release\out\lib\x86\libtoolChecker.so because unable to locate the objcopy executable for the x86 ABI.
Unable to extract native debug metadata from android\app\build\intermediates\merged_native_libs\release\out\lib\x86_64\libtoolChecker.so because unable to locate the objcopy executable for the x86_64 ABI.
* What went wrong:
Execution failed for task ':capacitor-cordova-android-plugins:verifyReleaseResources'.
> A failure occurred while executing com.android.build.gradle.tasks.VerifyLibraryResourcesTask$Action
   > Android resource linking failed
     ERROR:C:\sources\gestionStockApp2\android\capacitor-cordova-android-plugins\src\main\AndroidManifest.xml:9:1-14:12: AAPT: error: resource string/app_name (aka capacitor.android.plugins:string/app_name) not found.

     ERROR:C:\sources\gestionStockApp2\android\capacitor-cordova-android-plugins\src\main\AndroidManifest.xml:15:1-19:12: AAPT: error: resource string/app_name (aka capacitor.android.plugins:string/app_name) not found.

without your plugin, everything buid. When testing on android device, your plugin works great (ionic capacitor run android -l --external)

build process :

call ionic build
if %errorlevel% NEQ 0 GOTO error

call npx cap copy
if %errorlevel% NEQ 0 GOTO error

call npx cap sync
if %errorlevel% NEQ 0 GOTO error

cd %localdir%\Android
call gradlew.bat build

I hope those explanations may help you finding the issue

@kolbasa kolbasa reopened this Apr 20, 2023
@mtournay
Copy link

btw

λ npm --version
8.19.2
λ ionic -v
6.20.8
λ npx capacitor --version
4.7.3

this could help
not revelant I think : i'm building a react app

@kolbasa
Copy link
Owner

kolbasa commented Apr 20, 2023

Thanks for the detailed description. Now I understand what the problem is.
I will push a fix in the next couple of days.

kolbasa added a commit that referenced this issue Apr 21, 2023
@kolbasa
Copy link
Owner

kolbasa commented Apr 21, 2023

I pushed an update. Should work now.

👍

@mtournay
Copy link

It's working ! thanks a lot
You can close this issue.

@kolbasa kolbasa closed this as completed Apr 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants