Questions tagged [parcel]

In Android, a Parcel is a container for a message (data and object references). It's a high-performance alternative to Java's standard serialization.

This should not be confused with That Parcel is an application bundler for HTML, CSS, and Js

537 questions
4
votes
1 answer

How to run production build of a ReactJS app with Parcel bundler?

I'm just trying to generate a build using parcel build /src/index.html, I'm able to build the app, but when I try to open the build form a browser, it says it is unable to access index.js from index.html after build.
4
votes
0 answers

Bundle a React App as a single file JS with Parcel

I have a react app that opens a widget in a div. I want to bundle it using parcel, ideally as a single js file. Currently my build command looks like this // package.json "build:widget": "parcel build src/index.js --no-source-maps -d docs" which…
Will
  • 4,498
  • 2
  • 38
  • 65
4
votes
4 answers

Why do I get ‘does not implement abstract member’ warning while using kotlinx.android.parcel.Parcelize?

I am getting this error while trying to read the bundle from another fragment where I am sending the NewVehicle object. Error : Class 'NewVehicle' is not abstract and does not implement abstract member public abstract fun describeContents(): Int…
Sweta Jain
  • 3,248
  • 6
  • 30
  • 50
4
votes
3 answers

Unresolved reference: Parcelize after adding necessary tools in gradle and updating to kotlin latest version

I am trying to annotate a data class with @parcelize and get the following error - Here is my gradle file - apply plugin: 'com.android.application' apply plugin: 'kotlin-android-extensions' apply plugin: 'kotlin-android' apply plugin:…
Alon Shlider
  • 1,187
  • 1
  • 16
  • 46
4
votes
0 answers

Error when importing images in SSR React App: "SyntaxError: Invalid or unexpected token �PNG"

I'm trying to run SSR React (16.3.0) App using simple express server. After building and running babel-node server.js got error regarding imported PNG file: /home/dev/test/src/assets/bg.png:1 (function (exports, require, module, __filename,…
goldjunge
  • 331
  • 1
  • 4
  • 12
4
votes
1 answer

Parceable readString() nullable warning

Since the latest update Android Studio gives me following warning: Expected type does not accept nulls in Kotlin, but the value may be null in Java This warning shows up at following code snipped: data class Person( …
Kacper Kogut
  • 707
  • 6
  • 15
4
votes
0 answers

Kapt + LoganSquare not working propertly on mapping

I'm using the Kotlin to build my application for Android. Then I choose the LoganSquare library to do the parse from JSON -> Object. After some work, I get this result: @JsonObject class Line(@PrimaryKey @JsonField var id : Int, …
Pedro Paulo Amorim
  • 1,838
  • 2
  • 27
  • 50
4
votes
2 answers

Parceler unwrap giving wrong data

I'm using parceler library to implement Parcelable interface. I have such model @Parcel(Parcel.Serialization.BEAN) public class Ads { private Long id; private String title; private String description; private AdsType adsType; private String…
StupidFox
  • 376
  • 3
  • 19
4
votes
1 answer

Parcelable creation from a bundle does not call constructor

I have a class that implements Parcelable. I safe this object to the bundle in an activites onSaveInstanceState and I try to recreate the object in onCreate. This looks like following: @Override protected void onCreate(Bundle savedInstanceState) { …
prom85
  • 16,896
  • 17
  • 122
  • 242
4
votes
2 answers

Parcelable writeToParcel(): What's the best way to write multiple variables of the same type?

I have ten strings: str1, str2, str3...,str10 (not actual string names). Do I have to do dest.writeString(str_n) for all 10 strings or is there an easier way to do this? How would I read them back in? Example: @Override public void…
kyrax
  • 1,192
  • 3
  • 13
  • 29
4
votes
2 answers

Android parcel, stored in memory or on disk? How to store on disk

I see parcel and serializable being used kind of interchangeably, or at least un-intuitively in the same context. Can you clarify some things for me? are parcel's persistent storage (on the disk) or stored in memory only do I need serializable to…
CQM
  • 42,592
  • 75
  • 224
  • 366
3
votes
2 answers

Make a custom java object Parcelable in Android

I am trying to send an object of type MyCustomObject to another activity via an intent. I know, to make the class Parcelable, I should do public class MyCustomObject implements Parcelable, but I am not sure how custom object arrays work in…
Raunak
  • 6,427
  • 9
  • 40
  • 52
3
votes
1 answer

Parcel: external CSS (Syncfusion Spreadsheet) present in watch, but not in build

I have a weird behavior involving parcel and Syncfusion Spreadsheet component. Unfortunately, I think it might be specific to both parcel and/or Syncfusion's component, so it might be tricky figuring out. I have a React application with the…
Dawid Sibiński
  • 1,657
  • 3
  • 21
  • 40
3
votes
2 answers

I keep getting this error "Uncaught referenceError: require is not defined " anytime i build my frontend to interact with my backend with parcelV2

I am using parcel V2.7.1 so that i can interact my frontend script with my backend express app. I imported axios which is an npm package, but anytime i but anytime i run parcel and build I get and error message on the browser console stated Uncaught…
3
votes
0 answers

JavaScript Parcel Error - Uncaught (in promise) Error: Cannot find module 'gkKU3'

I learning JavaScript, and I trying to use Parcel and separate my code with MVC architecture. I have problem with import class from my createAccView.js. Error in console is: Uncaught (in promise) Error: Cannot find module 'gkKU3' at newRequire…
mirnes99
  • 51
  • 3